...
To change the value of varTaskStatus variable, drop a Code shape from the ADVANCED group in left panel onto the workspace.
Click the Code shape and fill fx input on the top of the workspace as
Code Block | ||
---|---|---|
| ||
:varTaskStatus: := :enumStatusSUCCESS: |
The task always will be marked as SUCCESS
Others examples:
For a task translator:
If you set value of the Code shape as
Code Block | ||
---|---|---|
| ||
:varTaskStatus: := :enumStatusFAILED: |
The task will always be FAILED
...
But if status is FAILED you must set the description of the error to the TSR message will be full.
To do it add to the Code shape next code
...
Below is an example of using status of a task as condition of a Decision shape.
Decision shape is available on the left panel in GATEWAYS group
The shape has two branches TRUE and FALSE. To set the condition property, click the shape and set condition property in the right panel.
The status of a task is stored in TASK_[name_of_a_task]_STATUS variable
...
- if test_task_translator status is SUCCESS then task_translator_true will be executed
- if test_task_translator status is FAILED then condition of Decision shape will be FALSE and Decision_1 shape will be executed
The Decision_1 shape has the following condition :TASK_test_task_translator_STATUS: = 'FAILED'
...