Routing Geoprocessing Task
Hello All,
I am using a geoprocessing tool that finds the shortest route between two points (selected by user) on a street network (Works fine in ArcMap). I published it as geoprocessing service via ArcGIS Server, and then put it in a workflow so I can find the shortest route in a web app. When putting it in the workflow and entering the geoprocessor URL it asks me for three parameters:
1- Input stops (First location in the screenshot): I use the output geometry from CaptureGeometry Activity that precedes this geoprocessing activity: I use New GPFeatureRecordSetLayer("Stops", geometry1)
2- Route parameter which has a GPString type, and here I used a new GPString variable (gPstring1).
After running the workflow and choosing the points in the web app, an error that says: The geoprocessor operation did not complete successfully (Shown below with screenshots). In addition, a route layer is added to the app.
What might be the issue here?
Any help is appreciated.
1-
/customer/servlet/servlet.FileDownload?file=00P6000000eltkaEAA
2-
/customer/servlet/servlet.FileDownload?file=00P6000000eltrSEAQ
3-
/customer/servlet/servlet.FileDownload?file=00P6000000em23qEAA
4-
/customer/servlet/servlet.FileDownload?file=00P6000000elu5JEAQ
5-
/customer/servlet/servlet.FileDownload?file=00P6000000elzNzEAI
-
Sorry, I don't have a solution but I am having similar trouble.
Captured geometry, created a new GPFeatureRecordSetLayer from the geometry by New GPFeatureRecordSetLayer("gpfrsl", geometry), and used it as the sole input
GPFeatureRecordSetLayer parameter for a GP service. GP service fails to run without returning any workflow or ArcGIS Server errors.It runs fine by submitting a JSON GPFeatureRecordSetLayer representation via the REST endpoint, as does running the script directly with a hard-coded feature set, as well as substituting a string input parameter instead.
Running 10.0 sp3
0 -
Ok, I think I've figured out where I was going wrong. The name property of the GPFeatureRecordSetLayer must match the name of the input parameter in the GP service (not the display name).
E.g. Parameter: Work_Area = New GPFeatureRecordSetLayer("Work_Area", featureSet) or New GPFeatureRecordSetLayer("Work_Area", geometry).
Unless I've missed something, the documentation doesn't make this clear.
I hope this helps
0 -
It has been a best practice to always use the suggested input paramater by clicking the ? next to the input dialog in the workflow. This should prefill the required values for the geoprocessing task. Simply substitute your geometry variable.
0 -
Dear Rob and Erik,
Thank you in advance for your valuable input, I've totally changed my approach by using route task activity (which is a workflow avticity that takes the route URL) instead of a geoprocessing tool, and it worked well, I'll try your solution and compare between the two approaches.
Thank you again!
Hani
0 -
Do you have any idea about displaying driving directions for the route in Geocortex? This is documented with this (https://support.geocortex.com/SupportForums/Thread.aspx?thread=57469&mid=2&pageid=0&ItemID=20) thread .
0 -
Hi Hani...did you ever find a solution to display driving direction for the route? We are trying to accomplish the same thing. 0 -
Hi Lisa,
It looks like you already found it, but for anyone else going down this path, please see the comment from Amanda in this article:
https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&criteria=ALLQUESTIONS&id=9066000000007UcAAI
Thanks,
Aaron Oxley0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
7 kommentarer