Success Arrow
Overview
The Success (green) arrow represents a stems from a parent object (for example, Condition, Sub-Workflow, Task, Process) in a workflow and will continue to the next downstream object upon successful execution of the parent. See Flow Control Arrows for more details.
Examples
The following examples illustrate the use a Success arrow.
Example 1 - Triggering conditions
When an event takes place or when a condition occurs, it is treated as a success. In the example below, a Schedule event is set to trigger at 12:00 AM. When the time period occurs, it is marked as a success, thus, the workflow will take its course and follow the Success arrow towards Task 1. Upon successful completion of Task1, execution of Task 2 commences. If any task fails, by default, the workflow will also be marked as failed and execution will come to a halt at the object that failed.
Example 2 - Conditional branching
Flow control arrows allow conditional branching to take place by determining a workflow’s progress depending on specific events or conditions that transpire. The sample workflow below illustrates exception handling by way of conditional branching at its simplest form. A workflow executes along the path of any arrow containing the value equaling that of the previous object. Therefore, if Task1 completes successfully, execution follows the path containing the Success arrow and runs Task 2 on Agent 2. If Task1 fails, execution follows the path containing the Failure arrow and runs Task 3 on Agent 3 instead.
Example 3 - Multi-executions
Success arrows allow multiple executions to take place simultaneously, either on the same agent or separate agents. This is an ideal way to speed up workflow execution or offload processor intensive tasks to other computers. The example below displays two Success arrows stemming from a Schedule event set to trigger at 12:00 AM. When the clock strikes 12:00 AM, Task 1 assigned to Agent 1 and Task 2 assigned to Agent 2 runs simultaneously.
Example 4 - "Or" condition
Multiple Success arrows can be linked to a single object. In the sample workflow below, Success arrow stems from two triggering conditions and linked to a single task. In this scenario, Task 1 runs when File Y exists in Folder Z "or" when an update is performed on the database (also known as an OR condition).
Example 5 - Evaluations linked to Success arrow
Along with a Result Arrow, an Evaluation object can also be followed by a Success arrow. This is because Evaluation objects treat a TRUE/YES result as a Success and a FALSE/NO result as a Failure. As shown in the example below, the Evaluation object evaluates 5=5, which, of course, evaluates to TRUE. Therefore, the workflow follows the path of the Success arrow which runs Task 1 on Agent 1.
Additional notes
There are some basic practices to follow when using arrows to link from one object to another:
- The Result arrow should only be used to link from an Evaluation object to other objects because only the Evaluation object can provide an answer (that is, the result) to a question (that is, the evaluation).
- Along with a Result Arrow, an Evaluation object can also be followed by a Success or Failure arrow. This is because Evaluation objects treat a True Result as a Success and a False Result as a Failure.
- Do not use a Failure arrow to link from event objects (for example, Schedule and Key events). Only the Success arrow should be used to link from events to other objects because events are designed primarily to trigger workflow execution. Unlike conditions, events lack behavioral properties that allow it fail.
- If a condition is used as a triggering object at the start of a workflow, it should only be linked to a Success arrow and not a Failure arrow. This is because the Behavior tab settings of a triggering condition is set to Wait for condition and Indefinitely. In other words, it will wait for the specified condition to occur indefinitely, therefore, has no possibility to fail.