How to pass value(s) to startup workflow on URL(?)
Hi,
I have http://devgeo/Html5Viewer/index.html?viewer=Site.Viewer
And I need to pass a value to the defined Startup workflow on the URL.
So I was envisaging adding this to the end of the URL "&locationid=4444" but it just does not recognise it.
I have tried with it "locationid" in the workflow parameters, but it only ever report the value in the patameters.
-
Hi Robert,
In order to add a startup workflow parameter, you'll need to edit the *.json.js file and add the "inputs" configuration, with the name of the input parameter listed below. Within the associated workflow, you'll use a "Get Workflow Inputs" activity to access that input value.
Our online documentation also has information about other options for providing input parameters.
"moduleName": "WorkflowHost",
"libraryId": "http://localhost/workflow/dist/hosts/gvh/loader.js!",
"configuration": {
"startup": [
{
"url": "https://latitudegeo.maps.arcgis.com/home/item.html?id=9b925a1d54f140bf84c321fefe5fe121",
"inputs": {
"input1": "input1Value"
}
}
]
}
Thanks, Stefan
0 -
Hi Stefan,
Thanks for that but I I have tried all that and all GetworkflowInputs gives me is ?input1Value using your example.
0 -
Yes, the value that is defined within the viewer configuration is what will be returned by that activity. You can also define multiple input values.
0 -
It is not currently fully implemented, the ability to use a URL parameter as an input for a Workflow 5 workflow. Ryan has provided a 'hack' here: https://communities.geocortex.com/s/ideas#087f2000000fxaKAAQ
0 -
Oh sorry to be clear. What I am wanting is a value is passed on the launching URL?. In your example input1 is hardcoded to be input1Value. well it seems to be when I did it.
0 -
Ah thanks, I suspected something like Ryan's 'hack?' could work.
0 -
Hi @Robert Potter?. Were you able to fully develop this workflow? If so, do you have any tips/tricks? I'm trying to do something similar and I'm having a hard time getting started. Thanks.
0 -
You could use the "Get Application Info" activity instead of Parse URL or Get Workflow Inputs. Any parameters added to the viewer launch url are captured in the urlParameters property in the Get Application Info activity's output.
For example;
Viewer url
https://your.server.com/Html5Viewer/index.html?viewer=site.gvh¶m1=Your Value
Retrieve the "Your Value" or whatever value specified for that parameter.. by using the below syntax in activity inputs.
=$appInfo1.info.app.urlParameters.param1
The workflow can be added to Html5 viewer to run on startup. You don't have to set any Workflow Inputs.
0
Please sign in to leave a comment.
Comments
8 comments