Host and Run Workflows in ArcGIS Experience Builder
This procedure assumes you have already downloaded and deployed the widget that allows you to host and run workflows from Experience Builder apps.
See Prepare the Workflow Widget for ArcGIS Experience Builder for more information.
The following steps are required to host and run workflows in Experience Builder:
Configure a Widget to Run the Workflow
The steps to configure a widget to run the workflow include the following:
Add a Workflow to the Widget
To add a workflow to the widget:
-
In Experience Builder, configure the app that will run the workflow.
-
In the left toolbar, click Insert to open the Insert Widget panel.
-
Drag and drop the Workflow widget from the toolbar onto the canvas.
-
In the widget Configuration panel on the right, you can customize the widget icon and label. The label is used as a tool-tip for the widget in the running app.
For best results, the icon should be 24 x 24 pixels. Other sizes are adjusted to fit. The supported file formats are PNG, GIF, and JPEG.
-
Click Select Workflow.
The Select Workflow window opens for you to navigate to the workflow you want to assign to the widget.
If you created the workflow, it will be listed on the My Content tab. If the workflow is shared with you, it will be in My Organization, and/or ArcGIS Online, depending on how it is shared.
Example of ArcGIS Online tab showing workflows
-
Locate and select the workflow.
-
Click Open.
-
Save the app.
Add Data to the Widget
If your workflow requires a map or access to a data source:
-
If you are configuring a Map widget to run the workflow, select the Map widget from the drop-down list.
-
If your workflow uses Experience Builder data sources:
-
Click Set Data Sources
-
In the flyout panel, expand the map or feature service to see a list of related data sources.
-
Click the data source(s) you want to use.
Example of a widget configured with multiple data sources.
-
Configure Widget Behavior
There are a number of different settings you can use to change the behavior of the widget.
-
Show Form Title: If enabled, shows the title of the active form at the top of the widget.
-
Start Operation: Change how the widget will start the workflow. There are a number of different options:
-
Start: The workflow runs when the app has loaded.
-
Click: The workflow runs every time the Workflow icon is clicked.
-
Open: The workflow runs when its container (e.g., Widget Controller, Sidebar) is open.
-
Event: The workflow only runs when a "start-workflow" event or an action is fired from another widget.
The "start-workflow" event, Message, and Data Actions all work regardless of start operation. The Event option should only be chosen if you do not want to run the widget directly.
-
-
Show Icon: Show the Workflow icon when a form is not being displayed.
If the Click start operation is chosen, this option is permanently enabled.
Add Parameters to the Widget
If the workflow takes one or more inputs, continue with the steps below.
To add parameters to the widget:
-
Click Configure Parameters > Add Parameter.
-
In the Parameter Name field, enter the name that you use to access the input in the workflow.
-
In the Parameter Value column, enter the input's value.
The value must be a string. You do not need to use quotes around the string.
-
Repeat this step to add as many inputs as the workflow requires.
-
Save the app.
Configure Message Action Workflows
You can use Message Action Workflows to run workflows from other widgets.
To configure Message Action Workflows:
-
Click Add Message Action Workflow.
The Select Workflow window opens for you to navigate to the workflow you want to use via a Message Action.
-
Locate and select the workflow.
-
Click Open.
-
Repeat this step to add as many Message Action Workflows as you need.
-
Configure Message Actions in other widgets in your app.
Map widget example:
-
Click on the Map widget.
-
At the top of the Map widget settings, click Action.
-
Click Add a trigger.
-
Choose a trigger.
-
Under the Widgets heading, click Workflow
If you have changed the title of your Workflow widget it will appear here as the new title instead.
-
Click Run Workflow.
-
Choose the workflow you would like to run.
The drop-down list contains the primary workflow configured with your widget as well as all message action workflows configured with your widget.
-
Add any parameters that you would like to include with the message action.
These will only be provided to the workflow when it is run as a message action.
Message actions automatically add the message data as workflow inputs.
The Map widget has two: Extent changes, and Record selection changes. Other widgets can have other message actions. You can see a full list of message actions here.
-
-
Save the app.
Run the Workflow
Run the Workflow from the Widget
To run the workflow from the widget:
-
Run the app.
-
If the start operation was configured as Start the workflow will run automatically.
-
Otherwise, click the widget to run the workflow.
The location of the widget depends on the app's theme and the administrator's configuration.
Run the Workflow from Another Widget
To run the workflow from another widget:
-
Run the app.
-
Using a widget that is configured with a Message Action Workflow, trigger the action.
For example: If you configured the Map widget with an Extent Change trigger, pan the map to run the workflow.