Is {{context}} supported by RunWorkflowByUrlAndInputs?
Is {{context}} supported by RunWorkflowByUrlAndInputs? For instance if I run a workflow from the map's context menu? It looks as if the literal text "{{context}}" is passed. But maybe I'm overlooking something. This is my command parameter:
{
"url": "https://my_org.maps.arcgis.com/home/item.html?id=the_guid",
"inputs": {
"geometry":"{{context}}"
}
}
-
Hi Berend,
The {{context}} replacement token is supported, but there's a catch. It doesn't work if it is nested more than one level deep in your JSON snippet. The good news is that the RunWorkflowByUrlAndInputs command has some extra logic to work around this. You can flatten the "inputs" object like this and it will work:
{ "url": "https://my_org.maps.arcgis.com/home/item.html?id=the_guid", "geometry":"{{context}}" }You can read more about running workflows from menus here: https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/run-workflows-in-gvh.htm#Use_a_Context_Menu_Item_to_Run_a_Workflow_with_Inputs%3FTocPath%3DRun%2520Workflows%7CRun%2520Workflows%2520in%2520the%2520Geocortex%2520Viewer%2520for%2520HTML5%7CRun%2520a%2520Workflow%2520with%2520Inputs%7C_____2
--Ryan
0 -
Hi Ryna, Thanks for your reply. It seems to be a documentation issue, in one place parameters are nested (within inputs), in another they are flattened. I already filed a support case for this. Berend Veldkamp Senior GIS developer T +31 88 811 58 18 M +31 6 13 27 16 34 berend.veldkamp@sweco.nl Sweco Nederland B.V. De Holle Bilt 22 3732 HM De Bilt T +31 88 811 66 00 Commercial register 30129769 www.sweco.nl [cid:image002.png@01D43EAD.3CE67EB0] 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare