Using WebMap from Organisation in ModelBuilder as Input Map and share Model as Web Tool

1007
11
07-12-2023 01:51 AM
BeckerGIS
New Contributor II

Hey guys,

i have build a Model (named "KML Export"), that allows the user to export selected Objects of Layers to KML-Files.

The Process is: Input Map -- Iterate Layers -- If selection exists -- Layer to KML -- Output

This works totally fine in my local ArcGIS Project, but only than i select my WebMap form my Organisation which i have imported to my local Project.

I shared my Model with one of my Coworkers and he said "Maybe because you referenced a local map from your project". But its technically the same Map(?!). 

When i use the WebMap directly from my organisation as Input Map in my Model with our Organisation URL the Model "turns grey", so all Functions are dead, because the Input Map will not be accepted (?!).

The Thing is, i want to share my Model as a Web Tool for my Organisation in ArcGIS Portal, and then use it as a Widget in a WebApp. So the User can Export KML Files of selected Features directly from the Portal/WebApp.

I tried to share my "totally fine local working model" and i created a Widget with my new Geoprossing Tool "KML Export". I selected my Features and started the export then only "execultion failed" showed up.

I think, it doesnt work because i referenced a local Map form my Project and so i tried to change it to the server connection string (URL) of the Web Map of  the Organisation WebMap, but then the Model doesnt work anymore. 

Do i miss something? Do i have to set my server settings directly in my model? But how? And and do i have to set the Output to "memory" or "in_memory"?

Thanks for your help!

Best regards 

Daniel

Tags (1)
0 Kudos
11 Replies
ShitijMehta
Esri Regular Contributor

Yes the map is not supported. when published in. It will become constant. Cannot equate map to a web map. 
Here is what you might want to try. 
Add iterate multivalue - add all input feature classes as path or layers to it. Publish as web tool with input to multivalue as a user defined and try. 
For this tool we can mix Raster and Features.

Let me know if this work.

0 Kudos
BeckerGIS
New Contributor II

Sorry for my late response, i was on Vacation. 

Iterate Multivalue is working as input! I published the new model with Iterate Multivalue as input and added it as WebTool in my WebApp. Now the execution seems to work and iam getting no longer the "Execution failed error". But in the output iam only getting a link ("URL to our company server"/server/rest/directories/arcgisjobs/kmlexportsimple_gpserver/ja529e06d8f1e4b65b1d461d5ed4b6b40/scratch/OUTPUT_LAYER_LayerToKML_20231020124801.kmz) (KMZ_Output Screenshot).

The output is set as a user defined parameter . But i cant set the output location. And the output file is named OUTPUT_LAYER_LayerToKML_20231020124801.kmz . "20231020124801" is the timestamp of my last kmz-output from the model in ArcGIS Pro.

How can i set the output location to a folder on our server?

The actual model is displayed in the "KMZ_Model-Screenshot".

Thank you very much for your help.

Best regards

Daniel

 

0 Kudos