Skip to main content

Running Server Side Workflow via REST Endpoint

Comments

6 comments

  • Ryan Cooney

    Hi Andrew,

     

    Yes, your approach sounds correct.

     

    Also, we will be providing documentation of the Workflow Server REST API in an upcoming version (similar to what we do for Printing and Reporting). In the mean time you can load the attached swagger.json file into any Swagger editor (like https://editor.swagger.io/) to see a preliminary version of the documentation.

     

    --Ryan

    0
  • Andrew Kesterton

    Great thanks Ryan for your reply.

     

    Good to see in Swagger that the API that it will accept webhooks directly from Survey123 (this is what we are doing at the moment but via Integromat). That will really help us being able to link the two together 😀

    0
  • Ken Lyon

    @Andrew Kesterton? You can run a server workflow from a survey123 webhook now, although I think we've not yet documented it. It was added in v5.15 (April 2020)

     

    Here's a brief summary of the steps:

     

    1. Create and save an empty server workflow
    2. Sign in to https://survey123.arcgis.com/surveys and create a new survey.
    3. Edit the Settings of the survey.
      1. Add a webhook.
      2. Set the "Payload URL" to `https://server/geocortex/workflow/service/webhook/survey123/{workflowId}?foo=bar` where `{workflowId}` is the ID of your server workflow. Querystring parameters are optional.
      3. Enable the "Portal info" event data (required for secured workflows), and any other event data you like.
    4. Save and publish the survey
    5. Open the live survey
    6. Open the browser's dev console
    7. Complete the survey
    8. Notice the webrequest to the webhook endpoint in the network traffic
    9. Modify your server workflow to do something useful with the workflow inputs. For example, use `$getWorkflowInputs1.inputs.body` with the Write File activity to write the "body" input to a file. There is also a "queryString" input.
    10. Rerun the workflow and observe that the body contains the event info from the webhook request from Survey123.
    11. Disable the "Portal info" event data and confirm that now the workflow must be shared with everyone.

     

    0
  • Berend Veldkamp

    Ken Lyon Where can we find the swagger documentation for the workflow server rest api? I'd expect it to be here, but can't find anything.

    1
  • Ken Lyon

    Berend Veldkamp If you have an on-prem installation, it's here:
    https://<your-server>/vertigisstudio/workflow/service/specification

    1
  • Claire Inbody

    Hello - I am following this youtube video. I got this to work in 2021 but now with a new version of worklow and reporting its failing to work and my portal version changed to 11.1. Do you know if this still can work? 

    https://www.youtube.com/watch?v=seQiQ1uz3jc

    Reporting Version 5.21.2

    Workflow Version 5.35.0

    Thanks,

    Claire

    0

Please sign in to leave a comment.