Run Workflow from JSON Hyperlink - not working
I've been successful in running a workflow from the I-want-to-menu that I exported as JSON and placed in my Geocortex site directory. However, when trying the same from a hyperlink in the feature description, the path to load the URL is combined into a new path that the viewer cannot find.
Instead of loading http://test.vic.gov.au/... the viewer tries to load
http://test/Html5Viewer/url=http://test.vic.gov.au/...
Which setting do I need to change to point to the correct directory or is there a better directory to place the workflow in ?
See details below. Thank you. Helen
I-want-to-menu (working):
RunWorkflowByUrl
{
"url": "http://test.vic.gov.au/Geocortex/Essentials/REST/sites/mysite/viewers/Viewer/VirtualDirectory/Resources/Workflow5/test2.json",
"inputs": "{{context}}"
}
Feature description hyperlink (not working)
<a href="command:RunWorkflowByUrl?url=http://test.vic.gov.au/Geocortex/Essentials/REST/sites/mysite/viewers/Viewer/VirtualDirectory/Resources/Workflow5/test2.json">CLICK HERE</a>
[error]: 10:35:03.398: Unable to load workflow 'url=http://test.vic.gov.au/Geocortex/Essentials/REST/sites/mysite/viewers/Viewer/VirtualDirectory/Resources/Workflow5/test2.json'. Unable to load http://test/Html5Viewer/url=http://test.vic.gov.au/Geocortex/Essentials/REST/sites/mysite/viewers/Viewer/VirtualDirectory/Resources/Workflow5/test2.json?dojo.preventCache=1512948903376 status: 404
-
If placed in a virtual directory of IIS, I can access the JSON from a webbrowser, but triggered from the feature description, the viewer searches again without success in http://test/Html5Viewer/url=http://url to virtual directory
0 -
Hello,
Running workflows from a virtual directory is not the recommended method for executing saved workflows. Could you please submit an idea to support this ability?
When configuring a workflow in a feature description which exists in AGOL, this is the syntax you can use, including providing inputs to the workflow:
<a href="command:RunWorkflowByUrlAndInputs?url=https%3A%2F%2Flatitudegeo.maps.arcgis.com%2Fhome%2Fitem.html%3Fid%3D592543d8f91e4d0d954fc9d8ca7b4e8e&input1={OBJECTID}&input2={Zip}&geom={$Geometry}">Run</a>
Thanks, Stefan
0 -
Hi Stefan
I'm already using that syntax, but in my environment, we can't use ArcGIS Online to host the Workflow . We have to host the JSON and call it from a hyperlink. So where in my Geocortex or Webserver directory do I place the JSON for the hyperlink to find it? At the moment, it looks like the hyperlink places the IIS Geocortex viewer virtual directory at the beginning of the URL, but then can't interpret the url parameter?
Thank you,
Helen
0 -
Hello Helen,
I checked with one of our developers and this process should already be supported to run JSON using this method. Our documentation outlines the syntax here: https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/run-workflows-in-gvh.htm#Use_a_Hyperlink_to_Run_a_Workflow_with_Inputs%3FTocPath%3DRun%2520Workflows%2520in%2520the%2520Geocortex%2520Viewer%2520for%2520HTML5%7CRun%2520a%2520Workflow%2520with%2520Inputs%7C_____1
I haven't tried configuring workflows to execute using this process, so I will give it a try and relay my findings.
Thanks, Stefan
0 -
That would be great if you could give it a try - I had found this documentation, but the examples, I think, either use the hyperlink/AGOL combination or the menu button/JSON combination, never the hyperlink/JSON combination.
Thank you,
Helen
0 -
Hi Helen,
You have the correct command configuration however you'll need to use the RunWorkflowByUrlAndInputs command instead.
Thanks, Stefan
0
Please sign in to leave a comment.
Comments
6 comments