Workflow Inputs

Workflows can take inputs from the application that hosts the workflow. There are two types of inputs:

Do not confuse workflow inputs with user inputs. User inputs are gathered from the user by the running workflow using forms or prompts. Workflow inputs are provided to the workflow by the application that runs the workflow.

Configure a Host Application to Pass Inputs to a Workflow

Some host applications support different methods of hosting workflows. The way you configure the inputs depends on how the workflow is hosted and what type of inputs the workflow takes:

The table below lists the most common methods of hosting workflows and the types of inputs they support.

Common methods of hosting workflows that take inputs

Host Application

Hosting Method

Supports

Design-Time

Inputs

Supports

Run-Time

Inputs

Run-Time Capability

Geocortex Web

I Want To menu

 

Toolbar

 

Feature Actions menu

Passes the currently selected feature.

Context menu

Passes the map location (point geometry) clicked by the user.

Geocortex Mobile

I Want To menu

 

Taskbar

 

Feature Actions menu

Passes the currently selected feature.

Geocortex Viewer for HTML5 *

I Want To menu

 

Toolbar

 

Feature Actions menu

Passes the currently selected feature via the {{context}} token.

Map Context menu

Passes the map location (point geometry) clicked by the user via the {{context}} token.

Hyperlink

Passes different types of data via replacement tokens, especially field tokens and object tokens.

Web AppBuilder for ArcGIS

Widget

 

*  The Geocortex Viewer for HTML5 has additional context menus that can be used to run workflows. For information, see Types of Context Menu in the Geocortex Viewer for HTML5 administrator help.

For information about how to configure inputs in the host application, refer to the section about hosting:

Use a Workflow's Inputs in the Workflow

To use a workflow's inputs in the workflow:

  1. Add a Get Workflow Inputs activity to the workflow to get the inputs that are passed into the workflow.

    You will use the activity's inputs output—$getWorkflowInputs1.inputs—to access the inputs. The inputs output has a property for each input that was passed into the workflow.

  2. Access the inputs.

    Before you access an input, validate it using an If activity with the following condition:

    =getWorkflowInputs1.inputs["name"] == undefined

    The name that you use to access an input depends on the type of input:

    • Design-Time Inputs: The name that you use in the workflow is the same as the name that you use in the host application.

      For example, if you configure two inputs called geoprocessor and distance in the host application, then you can access the inputs in the workflow as follows:

      $getWorkflowInputs1.inputs.geoprocessor
      $getWorkflowInputs1.inputs.distance

      You can use any valid name you want. Names can contain letters, numbers, and underscores (_). They cannot contain spaces or special characters.

    • Run-Time Inputs: The way you access run-time inputs in a workflow depends on the host application and method.

      The table below summarizes how to access run-time inputs passed using the most common hosting methods.

      You cannot pass run-time inputs from Web AppBuilder apps.

      How to access run-time inputs using the most common hosting methods

      Host Application

      Hosting Method

      Access Run-Time Inputs

      Geocortex Web

      Feature Actions menu

      Access the array of features as: $getWorkflowInputs1.inputs.context

      Context menu

      Access the geometry as: $getWorkflowInputs1.inputs.context

      Geocortex Mobile

      Feature Actions menu

      Access the array of features as: $getWorkflowInputs1.inputs.context

      Geocortex Viewer for HTML5 *

      Feature Actions menu

      Access the feature as: $getWorkflowInputs1.inputs["name"]
      where name is the name you used for the input in the menu item's configuration. **

      Map Context menu

      Access the geometry as: $getWorkflowInputs1.inputs["name"]
      where name is the name you used for the input in the menu item's configuration. **

      Hyperlink

      Access the input as: $getWorkflowInputs1.inputs["name"]
      where name is the name you used for the input in the hyperlink's configuration. **

      *    The Geocortex Viewer for HTML5 has additional context menus that can be used to run workflows that take run-time inputs. For information, see Types of Context Menu in the Geocortex Viewer for HTML5 administrator help.

      **   You can use any valid name you want. Names can contain letters, numbers, and underscores (_). They cannot contain spaces or special characters.