Select to view content in your preferred language

Geoprocessing Output

812
7
06-09-2010 01:28 PM
JoshEpperson
Emerging Contributor
I am new to geoprocessing and I am having trouble figuring out how to return data back to a web client.

I created a simple model that uses a point feature class into the "Frequency" tool.  It automatically set the output as a table in the geodatabase. There is a status field with a limited number of options and I want to know how many of each there are.  This feature class is updated daily and we want to be able to see statistical data on our web application.

I created a toolbox out of this model and created a geoprocessing service on arcgis server 9.3.

When I run the service on the server it creates a table in the database but does not return data back to the client. 

What am I missing?
0 Kudos
7 Replies
KevinHibma
Esri Regular Contributor
Josh,

You mentioned your client being a "web client", can you give more details on this?
A web app developed through the ADF, a javascript application, something else?
0 Kudos
JoshEpperson
Emerging Contributor
My web application is a Flex based application, but I haven't even tried to use the service in the application yet.  I was looking at the geoprocessing service in the REST API services directory.  The listing does not show any output parameters and when I execute it from there it does not show any output.  Which leads me into another problem.  I can only execute it once.  It creates a table in the database the first time, but if I try to run it again I get "Error 500."  The logs show an "already exists" error.
0 Kudos
KevinHibma
Esri Regular Contributor
Thanks Josh, that narrows it down a bunch. It's probably an issue in the model itself.

Could you please attach the TBX and I'll take a look?
0 Kudos
JoshEpperson
Emerging Contributor
Please see attached.
0 Kudos
KevinHibma
Esri Regular Contributor
Josh,

Changing the output path to:
%scratchworkspace%\scratch.gdb\InfoPoints_Freqency

should get around the already exist error. The %scratchworkspace% tells ArcGIS Server to handle the output, ensuring that nothing is overwritten (or nothing is attempted to be overwrote). Your results will get created at:
C:\arcgisserver\arcgisjobs\<service name>\<unique id>\scratch\scratch.gdb\InfoPoints_Frequency

You're probably already onto this, but the example here shows how results are returned to the client within the JavaScript API from a similar operation
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples/gp_zonalstats....
0 Kudos
JoshEpperson
Emerging Contributor
Almost there!

I created a new model using your recommendations and created a new test service in Arcgis Server.  An Output Parameter is now showing up, but it fails to run.  I get this error in the server log:

Executing (MyFrequency): Model %scratchworkspace%\scratch.gdb\InfoPoints_Frequency Start Time: Thu Jun 10 16:44:57 2010 Executing (Frequency): Frequency \\MyServer\Database\MyDB.mdb\MyDataset\InfoPoints D:\arcgisserver\arcgisjobs\atesttools_gpserver\jb54509f6b5f846fda78bf4e4b7d4d714\scratch\scratch.gdb\InfoPoints_Frequency StatusTxt # Start Time: Thu Jun 10 16:44:58 2010 ERROR 000319: Frequency field StatusTxt does not exist A locator with this name does not exist. Failed to execute (Frequency). End Time: Thu Jun 10 16:44:59 2010 (Elapsed Time: 1.00 seconds) Failed to execute (MyFrequency). End Time: Thu Jun 10 16:44:59 2010 (Elapsed Time: 2.00 seconds)
0 Kudos
JoshEpperson
Emerging Contributor
After playing around with it for a bit I removed the ".gdb" from the output path and was successful running it inside of arccatalog.  I am still receiving a different error on the server though:

Executing (MyFrequency): Model %scratchworkspace%\scratch\scratch Start Time: Thu Jun 10 17:15:49 2010 Executing (Frequency): Frequency \\myserver\Database\MyDB.mdb\MyDataset\InfoPoints D:\arcgisserver\arcgisjobs\atool_gpserver\j3d55ce6458de4a8b98d08e2ebe651109\scratch\scratch\scratch StatusTxt # Start Time: Thu Jun 10 17:15:50 2010 ERROR 000319: Frequency field StatusTxt does not exist Item not found in this collection. Failed to execute (Frequency). End Time: Thu Jun 10 17:15:51 2010 (Elapsed Time: 1.00 seconds) Failed to execute (MyFrequency). End Time: Thu Jun 10 17:15:51 2010 (Elapsed Time: 2.00 seconds)
0 Kudos