Skip to main content

What format are Arguments given for 'Run Essentials Workflow'

Comments

18 comments

  • Stefan Schweigert

    Hello Ryan,

     

    There will be a sample workflows site for the majority of the available workflow activities soon which includes this activity. As an example, multiple parameters can be input like this to the Arguments parameter:

    ={

      "envelope": $displayform1.state["GeometryPicker1"].value.geometry[0].getExtent(),

      "name": "Stefan"

    }

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Hi Ryan,

     

    Just thought I'd add a really simple example you can test with:

     

    Run Essentials Workflow activity's Arguments:

    ={

      "inNumber": 5

    }

     

    Essentials 4.x Workflow:

    4xWorkflow

     

    Then back in the original workflow, show the output using an Alert activity with:

    ="Result: " + $runessentialsworkflow1.result["outNumber"]

    0
  • Permanently deleted user

    Thanks Amanda, Your example worked for me...

     

    except: I had an 'Alert' in my essential 4.x workflow which doesn't work.

    "Unable to run workflow

    '<wf5_url>'.

    [WF: activity error] Error running Essentials Workflow activity. "

     

    Is that a bug? or can the 4.x workflows run via wf5 only do certain activities?

     

    Ryan.

     

    0
  • Stefan Schweigert

    Hi Ryan,

     

    If this error appears upon immediately running the workflow, it could be that your workflow is secured in Essentials in a way that is inaccessible to to the Designer (e.g. unable to access token). You'd need to take a look at the network traffic in Fiddler to see what the response from the REST endpoint is.

     

    What is more likely the issue is that you are trying to run a client-side activity; only server-side activities can be run within the WF4 workflow. You can however pass the results of the WF4 workflow to the WF5 workflow by using an Out Argument, then access the value through $runessentialsworkflow1.result["nameOfArgumentInWF4"], using your argument name, and display an Alert there.

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Yes, I was running an alert (client-side). Thanks for the info.

    0
  • Permanently deleted user

    Hi Stefan & Amanda,

     

    I am trying to achieve the same but I am getting this following error

    "[WF: activity error] Invalid parameters supplied to Essentials Workflow activity. Unexpected parameters: inNum".

     

    where "inNum" is the input argument to the Essentials Workflow WF4

     

    Is something I am missing here?

     

    Thanks in advance.

    vm.

    0
  • Permanently deleted user

    Hi Venkat,

     

    It's a bit hard to troubleshoot without seeing both workflows. Can you confirm that the argument "inNum" on your example matches on both sides? Ie,

    Workflow 4:

    • Has an argument called inNum
    • inNum's argument "direction" is "In"

    Workflow 5:

    • You're using inNum in for the "Arguments" property on Run Essentials Workflow. eg ={"inNum": 5}
    • The type of input you're sending matches the workflow 4 argument's type. Eg, int32 if you're sending a value of 5, or string if you're sending a string value like "test".
    0
  • Permanently deleted user

    Hi Amanda,

     

    Thanks for the reply.

    Actually I did a mistake in essentials workflow side, I added 'inNum' and 'outNum' as variables and configured in WF4 instead adding them as Arguments. Now I corrected that by adding them as arguments and configured in WF and that error no longer shows up, but I am getting another error in WAB server console saying 'Argument Error, options.body'. I don't know what else I am missing in here.

     

    0
  • Permanently deleted user

    Hi Amanda,

     

    Any update on the error I am getting. I have attached an .zip file containing the both workflows along with error image.

     

    Thank you.

    Venkat.

    0
  • Permanently deleted user

    Hi Venkat,

     

    I hadn't realized that you were running it from a WAB application, that's likely part of the issue. I'd expect it would be something like an issue involving the proxy that WAB uses. I'll see if I can find someone that's configured the activity to work on WAB before

    0
  • Permanently deleted user

    Hi Amanda,

     

    Thank you for the reply.

    I really need to use WAB instead use of GVH?, I am requesting any example passing parameter from WAB through WF5 widget which invoking WF4 present in geocortex essentials site accepting these parameters, process further and send result back to WAB.

     

    Thank you

    Venkat.

    0
  • Permanently deleted user

    Hi Venkat,

     

    I can confirm I see the same issue on my end when running WAB and Essentials on separate servers. I sat down with one of our developers today to look into this. It looks like the proxy that WAB uses does not handle CORS POST requests in a way that will allow the web request out to the Essentials workflow url to work.

     

    In order to fix this issue, we could

    • find a safe way to configure WAB's proxy to whitelist the Essentials server or otherwise allow the request to work
    • find a safe way to replace WAB's default proxy with another one that will work
    • Add a workaround in a future version of Workflow/Essentials

     

    Esri support might potentially be able to help with one of those first two options (I haven't had any luck on my end), but the third would have to be something that we do for a future version. I've raised the issue for consideration as bug-18665.

    The other option would be host your WAB application on the same server as Essentials to potentially avoid the need for CORS/proxied requests in the first place.

    0
  • Permanently deleted user

    Hi Amanda,

     

    Thank you for so much research you have done on your end.

     

    Regards.

    vm.

    0
  • Permanently deleted user

    Thanks @Stefan Schweigert? for pointing out the Essential Workflow should not include any client-side activity. That's the one got me for couple of hours. It would be nice if a note about this could be add to the Run Essential Workflow help.

    0
  • Stefan Schweigert

    Thanks for the suggestion Jack, I'll create an issue for our docs team to take a look at.

    0
  • Permanently deleted user

    BTW, could anyone point out the proper way to send (1) dictionary object and (2) featureset from WF5 to WF4 via argument? And more importantly, how do I convert it back to dictionary / featureset in WF4. thanks

    0
  • Permanently deleted user

    Hi Jack,

     

    All that's needed is for the Essentials workflow arguments' types to match the values coming from the arguments on the RunEssentialsWorkflow activity. If they can be converted they will be. I've attached an example with a featureset and dictionary.

    0
  • Permanently deleted user

    I just spent a hot minute figuring out the client-side issue myself, by which I mean an embarrassingly long amount of time. I suspected that this might have been my problems and even looked for documentation in the help doc and verbose logging, figuring that the word "client" would at least make an appearance if this were the issue and then proceeding to strip away my essentials workflow until there was nothing there but a hard-coded log activity left. Please, @Stefan Schweigert? , have the docs team prioritize this one for the next guy.

     

    For those here needing to run an essentials workflow asynchronously from wf5, put it in the site and use the viewer command RunWorkflowWithArguments.

    0

Please sign in to leave a comment.