Flow Step Trigger (After, Before, Error) Flow Behavior
  • 01 Oct 2021
  • 1 Minute to read
  • Dark
    Light

Flow Step Trigger (After, Before, Error) Flow Behavior

  • Dark
    Light

Article Summary

Overview

The following document demonstrates how to use Flow Step Trigger Flow Behavior. This Flow Behavior is commonly used for Flow Debugging purposes. A Flow is created using one of these behaviors (After, Before, or Error) and applied to specified steps in another Flow.

Flow Step Trigger can be triggered Before/After step execution or if the step throws an Error.
The following example walks through the process of creating a Step Trigger Flow that is applied to a step in a different Flow.

Example

  1. From a Designer Project, select CREATE FLOW from the Global Action Bar.
  2. Select Flow, provide a Name, and click CREATE.
  3. Connect the Start step to the End step.
  4. Navigate to the Properties tab on the right; under SETTINGS > Behavior Type, select Flow Step Trigger (After)
  5. From the FAVORITE STEPS category of the Toolbox tab, add a Log Step between the Start and End steps.
  6. Select the Log Step to navigate to Properties > Setup Log > Type, select Warn from the dropdown, then change the Category to "Step Trigger".
    1. Under INPUTS > Value, click SHOW EDITOR. Configure the Merge Text Editor value by combining test input with Data in the tree on the left. Then, click SAVE. 
      Configure the Value as:

      [StepRunData.StepName] Data

      Input Values [StepRunData.InputValuesData]

      Output Values [StepRunData.OutputValuesData]

  7. Save the Flow, then close via the X at the top right.
  8. From the Designer Project, CREATE another Flow.
  9. From the Flow Designer, attach a Create Data step from Toolbox > FAVORITE STEPS, to the Start and End steps. 
  10. Navigate to the Create Data step's Properties; under DATA > Data To Create, click SHOW EDITOR.
  11. Define a String [Text] type with Name "Test". Then, Constant map the Input as "DemoTest." Click CLOSE. 
  12. Still from the Create Data step's Properties, expand TESTING AND SIMULATION, then expand Triggers.
  13. Under Triggers > After Trigger Type, select RunFlow from the dropdown. 
    Using the Store option in the Before/After/Error dropdown list saves the step execution details.
  14. PICK the Trigger Flow that was created earlier in the example. 
  15. Save and close the Flow. 



Debug 

  1. From the Designer Project, right-click the Main Flow that has the Flow Trigger assigned to it.
  2. Click Run Flow
  3. Navigate to System > Administration > System Tools > Logging
  4. Select the line item that corresponds to the Flow Step Trigger Flow to view the full Log Message




Was this article helpful?