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

Last Updated: 06/29/2018 Introduced in Version: 4.0

This tutorial demonstrates how to use Flow Step Trigger Flow Behavior in Decisions. This Flow Behavior may be used for Flow debugging purposes. There are 3 types of such Flow Behavior: After, Before, and Error. The Flow with one of these behaviors is applied to the step in another Flow and can be triggered Before/After step execution or if step throws an Error.

Example:

In this example we are going to build a simple Flow Step Trigger Flow and use it on a step in different Flow.

We begin in the Designer Folder with clicking Create Flow on the Actions Panel. In the resulting pop-up window we Name the Flow. 

Then, from the Properties panel under Settings > Behavior Type drop-down list we pick one of Flow Step Trigger types:

  • After: Flow triggered after Step execution
  • Before: Flow triggered before Step execution
  • Error: Flow triggered if Step throws an Error

In this example we pick Flow Step Trigger (After).

In Flow Designer we add Log (Fast) step from All Steps [Catalog] > Flow Management category.

Then, we connect outcome from Log (Fast) step to the End Step in our Flow, and select Log (Fast) step to configure data mapping.

In this example we are going to configure Constant Debug level Input. Next, we Ignore all logs except log 01. For log 01 Input we set Text Merge.Plain Mapping Type and click Show Editor. 

In Merge Text Editor we use Step Run Data to compose our log message. Mention, Step Run Data is available in all Flow Step Trigger Flow types and contain information about the Step execution. When finished, we can click Ok to save and continue.

In Merge Text Editor we use Step Run Data to compose our log message. Mention, Step Run Data is available in all Flow Step Trigger Flow types and contain information about the Step execution. When finished, we can click Ok to save and continue.

Next, we locate log Category Input, set Text Merge.Plain Mapping Type, and click Show Editor.

In the Merge Text Editor we use data from Step Run Data to compose our log Category. Then, click Ok to save and continue.

This completes our Flow. We save the Flow and close Flow Designer.

Back in the Designer Folder we click Create Flow on the Folder Actions Panel. Then, we Name the Flow and click CREATE to proceed to the Flow Designer.

 

In the Flow Designer we add Create Data step from the Favorite Steps category.

Next, we click Show Editor under Data Definitions for Create Data step.

In the Data Definitions we add some simple data and click Close to save and continue.

Then, we locate Testing and Simulation options for Create Data step. Under Triggers options we can see Before Trigger Type, After Trigger Type and Error Type. Here we can add our Flow Step Trigger Flows. Also, for each type we have 3 options:

  • None: do nothing
  • Store: save step execution details
  • Run Flow: use Flow Step Trigger Flow to do what we need

We pick Run Flow under After Trigger Type.

Next, using Flow Picker we pick our Trigger Flow and click PICK to continue.

This completes our Main Flow. We click Debug Flow on the top panel of the Flow Designer.

 

If we navigate to System > Administration > System Tools > Logging Folder in the Portal we should  see that our Log about Create Data Step execution in Main Flow is saved under Debug level.

Additional Resources