Overview
Data is being extracted, but a decision needs to be made depending on the output. If the result is one value then a different sequence of processing needs to happen than if it is another value. For example, if certain data is returned then the workflow needs to exit and not run the rest of the process. Or, if values are too low or a certain value is present there should be a way to exit the workflow with a failure. In order to meet the needs of this decision making Magnus provides Go-To Task.
Magnus features Go-To Task to provide decision making branches in the Workflow
Go-To Task allows evaluating of two expressions and branching to specific tasks based on the result.
Evaluations include mathematical (i.e. Greater than) and string options (i.e. Contains).
Expressions include parameters, assigned values, and scripting (Javascript, Lua).
Results can move to next task, exit workflow, fail workflow, or move to a specified task.
Front Panel
Add a Go-To Task
- Under Add Task, select the desired position from the "Add to position" drop down list, then click +Go-To.
- Go-To Task compares two values: value from the left side and value from the right side. It then directs the flow of execution based on the outcome (true/false) of the comparison.
Left Expression
- Left Expression:
- This defines the value from the left side.
- This can be a script expression or a parameter
- For parameter, select a parameter <var_parameter> from the drop down list.
- For script expression:
- Select the script language. Supported languages are JavaScript and Lua.
- Select "expression to eval" from the drop down list.
- Specify the script.
- The script must be prefixed with =
- Parameters can be used
- Select the script language. Supported languages are JavaScript and Lua.
Operator
- Operator: This defines how to compare the left and right values.
Right Expression
- Right Expression:
- This defines the value from the right side.
- This can be any string literal, parameter, or script expression.
- For string literal, specify the string. Examples:
- For parameter, specify the parameter. Examples:
- For script expression, the script must be prefixed with =. Example:
Result Action
- Task on TRUE: specify where to go if the comparison outcome is true.
- next-task: go to the next task
- exit-workflow: exit the workflow
- fail-workflow: fail the workflow
- A specific task: to specify a specific task to go to, select the task ID from the drop down list.
- Task on FALSE: specify where to go if the comparison outcome is false
- Left Expression:
1. next-task: go to the next task
2. exit-workflow: exit the workflow
3. fail-workflow: fail the workflow
4. A specific task: to specify a specific task to go to, select the task ID from the drop down list.