Cannot renderer gp service results

4409
5
08-29-2015 10:40 PM
ModyBuchbinder
Esri Regular Contributor

Hi
all

Here: http://server.arcgis.com/en/portal/latest/use/widget-geoprocessing.htm  there is good explanations how to symbols the results that are coming from GP service.

The renderer tab always says that the geometry is unknown.

I got a BUG on this from esri but I remember it does work for me in the past.

Does anybody using it and how?

Thanks

Mody

0 Kudos
5 Replies
XanderBakker
Esri Esteemed Contributor

I suppose your GP service yields a FeatureSet, right? When you define the parameters of the tool, are you using an existing featureclass to define the schema of the output? The other option could be to write to the scratch workspace and (output will be featureclass rather than a featureset) and you are able to assign a layerfile to the resulting featureclass and switch the option "MapService" of the GP service on.

ModyBuchbinder
Esri Regular Contributor

Hi

I am creating a new feature class. In my desktop run (before publish) I created the new feature classe in my scratch workspace.

My understanding is that assign a lyr file to gp results in desktop tool does not affect the gp service.

Thanks

Mody

0 Kudos
XanderBakker
Esri Esteemed Contributor

That is correct, but enabling the option "view result with map service" does affect the result. It will create a MapService with the same name as the GP service and the GP widget will zoom to the resulting geometry, while I have noticed that it doesn't (always?) do that when you output graphics.

Geoprocessing service settings: Parameters—Documentation (10.3 and 10.3.1) | ArcGIS for Server

0 Kudos
JianWang3
New Contributor III

If the geometry of GP output is unknown,  you should not check the option "Add result as operational layer". Then the result will be added as a GraphicsLayer.

ModyBuchbinder
Esri Regular Contributor

I found a solution (or really a work around).

Everything works when you publish a GP service from model and not python.

You just put your python tool inside a model, expose all parameters of the python tool as model parameter, then run and publish.

All the menus in WAB works and let you renderer the results.

Strange

Mody