This tutorial demonstrates how to use the Flow Step Trigger Flow Behavior. This Flow Behavior is commonly used for Flow debugging purposes. There are three types of this Flow Behavior: After, Before, and Error. A Flow is created using one of these behaviors and applied to specified steps in another Flow; it can be triggered Before/After step execution or if the step throws an Error.
This example will walk through the process of creating a simple Step Trigger Flow that applies to a step in another Flow. Begin in a Designer Folder and select the Create Flow button in the bottom Action Bar. Select the Default template and name this Flow Trigger Flow, then click Create.
From a Designer Project, select CREATE FLOW from the Global Action Bar.
Select Flow, provide a Name, and click CREATE.
Connect the Start step to the End step.
Navigate to the Properties tab on the right; under SETTINGS > Behavior Type, select Flow Step Trigger (After).
From the FAVORITE STEPS category of the Toolbox tab, add a Log Step between the Start and End steps.
Select the Log Step to navigate to Properties >Setup Log > Type, select Warn from the dropdown, then change the Category to "Step Trigger".
Under the Inputs section for this step, change Value to use a mapping type of Merge HTML Text. Click Show Editor and when the Merge Text Editor appears, expand the Step Run Data on the left side. Hover over a piece of data in this list and use the plus icon to insert it into a message on the right. Configure the message with the following parameters, then save and close the Trigger Flow.
Configure the Value as:
Input Values [StepRunData.InputValuesData]
Output Values [StepRunData.OutputValuesData]
The configuration of the Log step in this example is explored in the GIF below.
Save the Flow, then close via the X at the top right.
From the Designer Project, CREATE another Flow. Select the Default template and name this Flow Main Flow, then click Create.
From the Flow Designer, attach a Create Data step from Toolbox > FAVORITE STEPS, to the Start and End steps.
Navigate to the Create Data step's Properties; under DATA > Data To Create, click SHOW EDITOR.
Define a String [Text] type with Name "Test". Then, Constant map the Input as "DemoTest." Click CLOSE.
From the Create Data step's Properties, expand TESTING AND SIMULATION, then expand Triggers.
Expand the After Trigger Type drop-down list and select RunFlow. When the After Trigger Flow box appears, select Pick and choose the Trigger Flow created earlier.
Using the Store option in the Before/After/Error drop-down list saves the step execution details.
The Main Flow is now complete. Save and close the Flow.
From the Designer Project, right-click the Main Flow that has the Flow Trigger assigned to it.
Click Run Flow.
Navigate to System > Administration > System Tools > Logging in the Decisions Studio to view the most recent logged data.
Select the line item that corresponds to the Flow Step Trigger Flow to view the full Log Message as exemplified in the below screenshot. The details include the message that was configured with the Log Step in our Flow that uses the Flow Step Trigger behavior type.