Workflow Inputs

Workflows can take inputs directly from the application that hosts the workflow.

Workflow inputs are different than 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.

Types of Workflow Inputs

There are two types of workflow inputs:

Hosting Methods

Some host applications support different methods of hosting workflows. The table below lists the most common methods of hosting workflows and the types of inputs they support (design-time or run-time).

Common methods of hosting workflows that take inputs

Host Application

Hosting Method

Supports

Design-Time

Inputs

Supports

Run-Time

Inputs

Run-Time Capability

VertiGIS Studio 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.

VertiGIS Studio 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.

ArcGIS Web AppBuilder

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.

Configure a Host Application to Pass Inputs to a Workflow

The way you configure the inputs depends on the hosting method and the type of inputs the workflow takes. In general:

For information about how to configure inputs in a host application, refer to the section for your chosen host in Host and Run Client Workflows.

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

      VertiGIS Studio Web

      Feature Actions menu

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

      Context menu

      Access the geometry as: $getWorkflowInputs1.inputs.context

      VertiGIS Studio 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.