Test
The Test activity is a Flow control activity. It allows you to enable transitions based on specified conditions.
Configure the Test activity
Follow these steps to configure the Test activity:
-
Add a Test activity to your workflow.
-
By default, the Test activity presents a simple boolean test. If the condition defined in the “True” transition is met, this transition activates. Otherwise, a default “False” transition activates.
-
To configure the condition associated with a transition, click the Open personalization dialog icon. Use the expression editor to define the rules required to activate this transition. You can also use event variables, conditions, and date/time functions. Learn how to work with event variables and the expression editor.
Additionally, modify the Label field to personalize the transition’s name on the workflow canvas.
-
Add multiple output transitions to a Test activity. To do this, click the Add condition button and configure the label and associated condition for each transition.
-
During workflow execution, each condition is tested sequentially until one of them is met. If none of the conditions are met, the workflow continues along the path of the Default condition. If no default condition is activated, the workflow stops at this point.
Example
In this example, different transitions activate based on the number of profiles targeted by a Build audience activity:
- If more than 10,000 profiles are targeted, an email message is sent.
- For 1,000 to 10,000 profiles, an SMS is sent.
- If the targeted profiles fall below 1,000, they are directed to a “do not contact” transition.
To achieve this, the vars.recCount
event variable is used in the “email” and “sms” conditions to count the number of targeted profiles and activate the appropriate transition.