How to catch esriJobFailed in Workflow
I tried to implement a TryCatch in the Workflow with a geoprocessing tool contained within it but couldn't find how I can catch the specific esriJobFailed result that is returned from the Geoprocessor tool. Any ideas?
Thanks
-
You won't be able to catch these errors in a Try Catch, as these can only be used to catch .NET errors, and the errors from Geoprocessing tasks are internal to the ESRI software. If you would like to check for errors or other messages from the GP Task, there will be a collection of 'GPMessage' items that are returned along with your geoprocessing results that you should be able to inspect in Workflow.
You'll see the 'Messages' output parameter on the right of the screen when you click on the 'Geoprocessor' activity. This is an optional output parameter, but if you do choose to capture the results in a variable, you can loop through and inspect them afterwards.
You can also look at your ArcGIS Server logs after running the task, and the messages should show up in there too. This might be easiest if you are just using them to debug.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar