How to configurate a step to run JTXSteps.ExecuteURL, such as a web GPtool? Any examples or detailed documentation for reference? Thanks!
It is possible to configure ExecuteURL step to access a GP service. The URL should look like:
https://[server name].[domain]/arcgis/rest/services/[GP service name]/GPServer/Create%20New%20Jobs/submitJob
When you execute the URL, it will open the GP service page in a new browser window. You will need to enter the input parameters and manually run the GP tool. You can also include the parameter values in the url if you want to pre-define them.
https://[server name].[domain]/arcgis/rest/services/[GP service name]/GPServer/Create%20New%20Jobs/submitJob?para1=value1¶2=value2¶3=value3&f=html
However if you would like to better interact with GP tools, the more common way is to configure a step of ExecuteGPTool or LaunchGPTool. Note that the GP tools can be made available on server but a GP service is not currently supported. The GP tool can be copied to the server and only works if the tool belongs to the user.
You can determine which way you would like to go with and I would like to provide more details.
Thanks for the quick reply!
I tested two web services in a step of workflow manager. One is a Buffer service of our own and the other is a web printing service from AGOL.
When I run the step I got the error message as below:
How to fix this issue? Thanks!
I tested your two urls by configuring the step as "Launch URL" and was able to open the service page in the browser without any error. Please check if the url is valid as well as WMX logs to see if errors got thrown. Also have you configured any other arguments such as Proxy server?
ExecuteURL step can automatically run GP service if the service is published as "Synchronous" as Execution Mode. A sample URL would be like:
You can check the Execution Type in the service REST endpoint, i.e. Execution Type: esriExecutionTypeSynchronous
The first URL in the two samples that you provided is an "Asynchronous" service. It requires you to submit a job to kick off the run of the GP service. Thus you can not use ExecuteURL to kick off the run automatically. Like I mentioned in the last message, execute the URL will only open the service page and you need to manually submit the job.
The second URL seems to be "Synchronous". When you configure the URL, you can include the pre-defined parameter values in the url, especially the required parameters. It would be helpful to test the url in a browser to make sure the GP service running successfully. ExecuteURL step will run the GP silently and you will not see any output message directly.
However, I noticed that the two services you use are both secured service. Whoever executes the URL step will need to have the access to your GP service. Or you will need to add token in the end of the url but this is not very common and recommended.
I can open the Buffer tool in a Web App. The interface looks like as below
I add the url to the job step as below
The arguments is : /url:https://webbgis.esri.se/arcgis/rest/services/FortV/GPBuffer/GPServer/Buffer/Create%20New%20Jobs/submitJob
Then I got the error message.
Anything I have missed in the arguments? Do I suppose to have the same interface window open as I do in the WAB when I run this step?
Thanks so much for your support!
Your configuration looks ok and I tried myself and do not see the error. I also noticed that the service is set to public now so we should be able to run it without prompt of credentials.
Another way to test it is to change your step type from ExecuteURL to Launch URL as following. See if the step can open a browser window.
The reason we use ExecuteURL step type is to avoid opening the browser to show the response. So I wouldn't expect to see the window as you saw in WAB. But it should run in the background without error.
Also check your WMX logs. It should be located at C:\ProgramData\ESRI\WMX\[product version]\Logs.
I expect to run the GPtool service and open the interface window, then populate the parameter such as buffer distance, input feature, output feature/ directory etc. is it possible to do this in WM?
As you said that the GPtool service could be pre-configurated with all the needed parameters. Does this mean all the parameters are fixed and cannot be changed in the step?
When I use the step LaunchURL I only get an opened window as below: not the tool interface window.
By the way, the error message was disappeared after I installed “ArcGIS_Desktop_BackgroundGP_106_161696.exe” which was deleted a week ago, it was then caused some other issue in WM.
If you include pre-defined parameter values in your URL, the GP tool will be running with it. Parameters can be also entered when executing the step. You will need to use the step LaunchURL instead of ExecuteURL. LaunchURL will open the url in the browser and allow you to enter the inputs.
I noticed that you are using 10.6 and that is the version I have tested too. I cannot reproduce the error you saw by using the URL you provided. I did not run “ArcGIS_Desktop_BackgroundGP_106_161696.exe” individually in my environment though. So it could be relevant. If you provide me more info such as how you set up your machine, I can try to reproduce this error.
Thanks for your help. We will check this issue later when we get more time.
Retrieving data ...