Switch task
The Switch task contains two sequences of tasks.
Based on conditions specified as properties of a Switch task, it causes only one of its task sequences to be performed. After the task sequence has been performed, the task after the Switch task is performed. The Switch task is much like the traditional If statement.

The sample workflow in the figure begins by creating a record. If the create task is successful, the record is modified and is then used for an action item created by the User Action task. If the create task is not successful, the workflow ends in failure.
The switch task in the figure includes more than its palette shape. It also marks the point where two alternate task sequences converge. You can select the switch task itself to view its properties.

The contents of the Switch task form is a condition that is either true or false. If the condition is true when a switch task is performed, the task sequence attached to the green circle is performed. If the condition is false, the task sequence attached to the red square is performed.
The Swap action swaps the positions of the green circle and the red square, while leaving the task sequences where they are. After a Swap action, the task sequence that was attached to the green circle is attached to the red square and the task sequence that was attached to the red square is attached to the green circle.