Logo
  1. Potens.io
  2. Magnus
  3. Core Tasks

Articles > Goto Task

  • BigQuery Task
  • Cloud Storage Export Task
  • Goto Task
  • Loop Task
  • Execute Workflow Task
  • Email Task

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
01.png

Add a Go-To Task

  1. Under Add Task, select the desired position from the "Add to position" drop down list, then click +Go-To.
    02.png
    03.png
  2. 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

    1. Left Expression:
      1. This defines the value from the left side.
      2. This can be a script expression or a parameter 
        04.png
      3. For parameter, select a parameter <var_parameter> from the drop down list.
      4. For script expression:
        1. Select the script language. Supported languages are JavaScript and Lua. 
          05.png
        2. Select "expression to eval" from the drop down list. 
          06.png
        3. Specify the script. 
          07.png
          • The script must be prefixed with =
          • Parameters can be used

      Operator

    2. Operator: This defines how to compare the left and right values. 
      08.png

      Right Expression

    3. Right Expression:
      1. This defines the value from the right side.
      2. This can be any string literal, parameter, or script expression.
      3. For string literal, specify the string. Examples:
        09.png
        10.png
        11.png
      4. For parameter, specify the parameter. Examples:
        12.png
        13.png
      5. For script expression, the script must be prefixed with =. Example:
        14.png

      Result Action

    4. Task on TRUE: specify where to go if the comparison outcome is true.
      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. 
        15.png
    5. Task on FALSE: specify where to go if the comparison outcome is false

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. 
16.png

Potens.io
Launch Magnus | Goliath