Select to view content in your preferred language

Scene Layers association with Feature Layers Broken

1460
5
08-04-2022 01:10 PM
NileshValwaikar
Occasional Contributor

Greetings,

we are using arcgis enterprise 10.8.1 and recently our portal got crashed and was not able to recover. so we had to install it fresh. ESRI team helped us to do that by unfederating the servers and than refederating it back.

Doing so we were able to get all the published service's back into our portal contents but we noticed that the scene layers were no longer associated with its corresponding feature layer.  If we try to perform any action on the scene layer we get an error in console "SceneLayer queries are not available without an associated feature layer".

Moreever these same layers which were earlier shown as 'Scene Layer (hosted)' are now shown as just 'Scene Layer' in portal contents.

Because of this we cannot see the Manage Cache for Scene Layers, without this option any new changes in the underlying featureclass will Not get reflected in the scene layer.

the count of these scene layers is around 1300+ (all in 3d multipatch), hence publishing them again is a huge task for us.

Is there a way to reassociate these scene layers with its feature layers, any alternative tool or workflow will do.

 

Regards,

NileshV

 

0 Kudos
5 Replies
Andrew--Johnson
Esri Regular Contributor

For this particular issue I would recommend reaching out to technical support so they can screenshare with you and troubleshoot better over an official case https://support.esri.com/en/ 

thanks,

Andrew

0 Kudos
NileshValwaikar
Occasional Contributor

esri technical team is also looking into it but so far no solution available with them too.

I posted here coz if someone has faced the same problem  and was able to find a solution to this than it would help us to resolve this issue faster. 

I found one link  https://developers.arcgis.com/python/guide/managing-your-content/  which mentions a method called 'add_relationship' , I am not sure what it does and whether it will solve my problem.

I don't have much expertise in python but will study this api and will try it on one of my scene layer and check if i can get the association back.

https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.add_relations...

Regards,

NileshV

0 Kudos
Andrew--Johnson
Esri Regular Contributor

I would request the support analyst pull in a technical lead who can then follow up with someone on the ArcGIS Enterprise development team. This seems like a pretty rare scenario which the ArcGIS Python API may not be designed to resolve. That's why I would recommend getting an official response through the case rather than here.

thanks,

Andrew

NileshValwaikar
Occasional Contributor

Greetings Andrew,

just an update on this issue. I was able to reassociate the scene layers to its respective feature layers using a tedious workaround, Luckily for me i also had the old portal contents and database directory.

Below are the Steps I did to Reassociate 3D Scene Layers with Feature Layers..

1) Get the OLD SceneLayer Item ID - This is required to copy the missing file contents and metadata
Prepared a CSV with Layer Title, Old Item ID, New Item ID

2) Get the Existing SceneLayer and Related FeatureLayer Item ID
Prepared a CSV with Layer Title, SceneLayer Item ID, FeatureLayer Item ID

3) Updated the reserved__type_keywords in current database as 'Hosted Service' - Done Globally

4) Created a Python Script to Add the Relationship using the csv in #2
feat_item.add_relationship(rel_item= scene_item, rel_type= 'Service2Service')
scene_item.add_relationship(rel_item= feat_item, rel_type= 'Service2Data')
5) Stopped the Portal Service

6) Created a Python script to copy the Contents using csv #1 from Old Backup having old Item ID to Current Contents location with Current Item ID.
Copied all files and folders like metadata, thumbnail and publishParameters.json from old contents to new contents

7) Started the Portal Service

😎 Logged into portal admin and executed the Full Reindex.

Than when i opened the Portal Home page and checked the Scene Layers it were Showing as 'Scene Layer (Hosted)' as opposed to earlier just the 'Scene Layer'. Also within the layers settings page the Manage cache option was now available.  

Tested few layers in our end application and the query task etc are now working fine.

I have attached the snapshot of before and after.

Regards,

NileshV

0 Kudos
Andrew--Johnson
Esri Regular Contributor

Thanks for the update and glad to hear everything is back up and running as it should be!

regards,

Andrew

0 Kudos