RunWorkflowWithArguments from Feature Description hyperlink with layer tokens
I'm trying to figure out how (and if) you can make a workflow execute with arguments from the Feature Long Description that include Layer and Map Service tokens. I've seen a number of posts on this but nothing has helped me yet.
I've tried a number of experiments including:
<a href="command:RunWorkflowWithArguments?workflowId=Metadata&args= {LayerId} " >See metadata for {LayerDisplayName} layerid = {LayerId} and map service id = {MapServiceId} </a>
For the above I see that the link text shows the correct layer id and map service id but the workflow gets passed nothing.
<a href="command:RunWorkflowWithArguments?workflowId=Metadata&args=0" >See metadata for {LayerDisplayName} layerid = {LayerId} and map service id = {MapServiceId}</a>
Fo the above I see that the link text shows the correct layer id and map service id and the workflow gets passed 0 (which is correct but obviously not what I really want to acheive).
I've tried various other combos of wrapping the token in a single quotes and " but nothing has helped.
I am using the HTML 5 Viewer 2.4.1 and Essentials 4.3.1
Any insight would be appreciated. Thanks.
As an aside, what I really want to do is use use a Layer hyperlink but these are not supported for the HTML5 viewer according to the admin guide.
As a workaround, I tried modifying the LayerActions menu (in the Menu module) in the viewer config file (Desktop.json.js). I was able to add a workflow but I could only get it to be enabled if I used 'RunWorkflowById' but not 'RunWorkflowWithArguments' -- it is disabled. Is this kind of thing possible with RunWorkflowByWithArguments? I'd need to pass the layer id and map service id and I doubt that I can use tokens here.
is disabled:
{
"text": "View Metadata",
"description": "View Metadata",
"iconUri": "Resources/Images/Icons/arrow-right-alt-24.png",
"command": "RunWorkflowByWithArguments",
"commandParameter": "workflowId=Metadata&args=xyz",
"hideOnDisable": false
}
works but is not what I really need:
{
"text": "View Metadata2",
"description": "View Metadata2",
"iconUri": "Resources/Images/Icons/arrow-right-alt-24.png",
"command": "RunWorkflowById",
"commandParameter": "Metadata",
"hideOnDisable": false
}
-
This may be a dumb question, but is there an input argument in your workflow which is named "args"?
Here is a similar hyperlink that I use. My workflow takes an argument called "InPIN".
<a href="command:RunWorkflowWithArguments?workflowId=Workflows-ParcelDataReport&InPIN={PIN}">Run Property Detail Report</a>
0 -
Yes I do have that input argument called 'args'. I had 2 arguments originally (layerid, mapserviceid) but slimmed it down to 1 for troubleshooting.
If I use a FIELD token it will work -- which is, I think, what you have. For a Layer token it won't work (but it will display in the hyperlink text). And in my second example, when I hard code a value, it will get passed to the workflow.
Thanks for the response though.
0
Please sign in to leave a comment.
Comments
2 comments