Hoppa till huvudinnehållet

How to pass value(s) to startup workflow on URL(?)

Kommentarer

8 kommentarer

  • Stefan Schweigert

    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
  • Permanently deleted user

    Hi Stefan,

    Thanks for that but I I have tried all that and all GetworkflowInputs gives me is ?input1Value using your example.

    0
  • Stefan Schweigert

    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
  • Stefan Schweigert

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    Ah thanks, I suspected something like Ryan's 'hack?' could work.

    0
  • Permanently deleted user

    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
  • Peter Haddrill

    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&param1=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

Du måste logga in om du vill lämna en kommentar.