Decision Point Nodes
Decision Point Node
See also: Switch Node
The Decision Point Node is a simple and quick way to branch the Task execution depending on the result of a test. Typically the test will involve data that has reached the Node from earlier in the Task (for example a Presence Variable value), or in some cases some other changeable value such as the current day of the week.
Decision Points are re-usable, so you can create a Decision Point and use it in as many Tasks as you please, or multiple times in the same Task. Any changes to the original Decision Point Node will affect all Tasks that use the Node, and you will receive a warning if this is a case before making changes.
Here is an example of a Task that uses a Decision Point:
In this Task, when the task execution reaches the Decision Point, it will take one of two branches depending on the result of the decision test. This particular Decision just checks to see if the current day of the week is Wednesday, and if so it goes on to execute the "Wednesday Action" path. Otherwise it will execute the "Other Days" path.
This is the most simple form of Decision, where there is a straight-forward true or false result. Other situations can be slightly more complicated and require further explanation, and we will explore those later.
Creating a Decision Node
In order to create a new Decision Node, right click in the Flow Control Elements toolbox and select "Create New > Decision Point" from the pop-up menu. You will then be presented with the following dialog box:
This is the value that you wish to test. Typically this will be a Variable, a Data Column or a function result.
This determines the type of comparison to make in order to generate the result for this Node. The options are:
- Equal To
- Greater Than
- Greater Than or Equal To
- Less Than
- Less Than or Equal To
- Between (Inclusive)
- Matches Pattern (uses regular expressions)
- Test if Null (undefined)