How do I pass arguments for a workflow in the viewer launch url?
I am trying to specify arguments for a workflow that I am inlcuding in the luanch url of a silverlight viewer. But the admin guide only shows the workflowID as the parameters for runworkflow in the url. How do I inlcude arguments?
I need to create a feature hyperlink in one map which opens another map, running a workflow that has an argument of the name of the feature in the first map, from where the hyperink was triggered. So I need to use a field token in the launch url wherever I can put arguments for a workflow. But I can not find documentation about arguments in workflow parameters for launch urls.
Thank you!
-
Hi Rob,
Assuming you have already created the argument in the workflow designer all you would have to do is to specify it in the url using the following format as an example.
http://maps.waterloo.ca/runWorkflow=WorkflowName&Argument={FieldToken}
Provided the argument named Argument is declared in you workflow this value will be populated by the field token of the feature when opened.
-Warren
0 -
Hi Warren,
Thanks for help. I am first trying to test this by populating the argument in the url manually.
So using an example argument value and site url:
The string I want to be assigned to the argument is: BH-01-A
The url (fake url) is: http://prj.geosyntec.com/SilverlightViewer/Viewer.html?ViewerConfig=http://prj.geosyntec.com/Geocortex/Essentials/REST/sites/Test_Site/viewers/Test_Site_Silverlight/virtualdirectory/Config/Viewer.xml
So then with your format, the url would be:
Using this format always results in an error, however I've also tried using a question mark instead of the slash before the runworkflow command (which doesn't give an error but still doesn't run the workflow properly) and also I've tried single and double quotes around the values of the workflowname and arguments, but no luck so far. For example:
Any ideas?
Thanks!
0 -
Hi Rob,
I think you're getting close. In order to clarify and add some detail to my initial response you'll need to ensure that the argument name you wish to use (in my original post I referenced "Argument") but it could be anything. For instance in one of my workflows I create a link into a GCX viewer so that our work order system can interface with GCX and find a work order on a map. This workflow references an input work order ID which I declare in my workflow (below).
/customer/servlet/servlet.FileDownload?file=00P6000000elzqmEAA
Then when adding my workflow to the I am prompted by manager to populate this argument (which I leave blank since it will be populated by a field token).
/customer/servlet/servlet.FileDownload?file=00P6000000eltxoEAA
Finally, I configured a hyperlink from the work order system to GCX using the following format (this can also link out of GCX into another viewer in your case):
/customer/servlet/servlet.FileDownload?file=00P6000000eluHeEAI
Hopefully this helps,
Warren
0 -
d'oh! Of course, my bad - the argument had to use the actual argument name. That was an oversight on my part. Now that I'm using the correct argument name, it is working beautifully, thanks!
By the way, if you fill out the argument value in the rest manager when it prompts you for it, does that work as a default and get overridden when that argument is based via url? Sometimes it would be handy to put in a placeholder there for when the map is opened without specifying an argument, but of course you wouldn't want that to trump an argument sent in the url.
cheers!
0 -
For your last question the answer is yes.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare