Geoprocessing Service results retained from ArcGIS

2603
5
Jump to solution
10-23-2015 11:10 AM
JamesCrandall
MVP Frequent Contributor

I have a simple geoprocessing model that performs a SelectByLocation operation on two feature classes (both are registered with ArcGIS server).  Running the model in ArcGIS 10.2.2 produces the expected result, no errors, no problems!  However, after publishing this service and setting a Geoprocessing widget (Web AppBuilder App) to point to this service, the selection results are always the same as what they are prior to publishing when originally ran in ArcGIS 10.2.2

Am I missing a simple output setting or something?

The Land Acquisition (2) output is always the same result (the selected features from when the model is originally ran).

model.png

0 Kudos
1 Solution

Accepted Solutions
KevinHibma
Esri Regular Contributor

You need an input parameter. As is, your model is hardcoded to do the same thing over and over.

I'm not sure if you want to select your Land Acquisition or your SDE data - either way, when the model is run that same data is always acted against. If you want to provide a sort of interactive selection against one of those layers, you'll need to make the selecting features a feature set and turn it into a parameter.

See this for understanding parameters: Creating model parameters—Help | ArcGIS for Desktop

This is a generic select (by attribute) example for GP Services: Geoprocessing service example: Selecting data—Sharing geoprocessing workflows | ArcGIS for Desktop

View solution in original post

5 Replies
KevinHibma
Esri Regular Contributor

You need an input parameter. As is, your model is hardcoded to do the same thing over and over.

I'm not sure if you want to select your Land Acquisition or your SDE data - either way, when the model is run that same data is always acted against. If you want to provide a sort of interactive selection against one of those layers, you'll need to make the selecting features a feature set and turn it into a parameter.

See this for understanding parameters: Creating model parameters—Help | ArcGIS for Desktop

This is a generic select (by attribute) example for GP Services: Geoprocessing service example: Selecting data—Sharing geoprocessing workflows | ArcGIS for Desktop

JamesCrandall
MVP Frequent Contributor

Thanks Kevin -- that makes sense.

Follow up question: would the Geoprocessing widget be smart enough to pass in that Feature Set?  What I mean is, will I be required to add some additional JavaScript modification to be able to pull the Selecting Features into that input Feature Set parameter that the model requires?

Thanks again for your input!

0 Kudos
KevinHibma
Esri Regular Contributor

You say widget, so I assume you're using the WebAppBuilder (WAB)?

If so, yes, it is smart enough. If your input parameter is setup as an interactive feature set (like you draw a box inside ArcMap), then when you use the WAB - GP widget against the GP Service you've made, it is smart enough to provide an interactive draw option in the web app itself. So no extra code required.

JamesCrandall
MVP Frequent Contributor

Oh I see what you mean.  Yes, that works however the user requirements are to select features that intersect (or fall inside of) the selected feature.  That is, the user does not want to have to draw anything.  The required process workflow is:

1. Enhanced Search Widget makes selection by attribute on layer 1.

2. Click Geoprocessing widget to select the features in layer 2 that fall inside or intersect the selected feature of layer 1.

So, I'd need to be able to pass in that selected feature from 1. into the Feature Set as in input parameter.

Thanks again!

0 Kudos
JamesCrandall
MVP Frequent Contributor

Kevin -- your OP that I marked as the correct answer does work for me.  I missed/skipped over the widget asking for the input Feature Set parameter.  Once I re-published the model with that Feature Set as parameter, it shows up in the Geoprocessing widget workflow.  I was simply expecting it to just work without additional user input.

0 Kudos