Test test
The Test activity is a Flow control activity. It allows you to enable transitions based on specified conditions.
Configure the Test activity test-configuration
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 will be activated. Otherwise, a default “False” transition will be activated.
-
To configure the condition associated to a transition, click the Open personalization dialog icon. Use the expression editor to define the rules required to activate this transition. You can also leverage event variables, conditions, and date/time functions. Learn how to work with event variables and the expression editor
Additionally, you can modify the Label field to personalize the transition’s name on the workflow canvas.
-
You can 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 workflows stops at this point.
Example example
In this example, different transitions are activated 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 do this, the vars.recCount
event variable has been leveraged in the “email” and “sms” conditions to count the number of targeted profiles and activate the appropriate transition.