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.
There are two types of workflow inputs:
▪Design-Time Inputs: Inputs whose values are defined in the host application's configuration.
For example, you could use a design-time input to pass the URL of a geoprocessing service to a workflow that performs geoprocessing. Because you know the service's URL in advance, you can configure it when you configure the application.
▪Run-Time Inputs: Inputs whose values are determined when the workflow runs. Run-time inputs provide contextual data for the workflow to operate on, such as the feature selected by the user or the map location clicked by the user.
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.
The way you configure the inputs depends on the hosting method and the type of inputs the workflow takes. In general:
▪VertiGIS Studio Applications: VertiGIS Studio applications have a variety of menus and other methods to host workflows.
•Design-Time Inputs: The most common way to host a workflow that takes design-time inputs is the I Want To menu. Design-time inputs are configured in the menu item.
The Sandbox allows you to define test values for design-time inputs. See Run a Workflow in the Sandbox for instructions.
•Run-Time Inputs: To host a workflow that takes run-time inputs, you must use the method provided by the host application for that purpose. For example, to pass the currently selected feature to the workflow, you would use a Feature Actions menu. Feature Actions menus are designed to pass the currently selected feature to workflows. Other methods of hosting workflows do not have this capability.
▪Web AppBuilder: In Web AppBuilder, design-time inputs are configured in the widget that runs the workflow.
Web AppBuilder does not support run-time inputs.
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.
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.