Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Boolean values come in two flavors: true and false.

Workflow Instruction: If

Use Case: Return Code Checking



Explanations:

  • Return Codes come in two flavors:

...

    • for shell jobs the return code corresponds to the OS exit code.
    • for any other job types the return code is provided by the respective job indicating success or failure.
  •  The job definition specifies which return codes indicate success or failure:
    • Image Added
    • For the above workflow example the job1 considers return codes 0,1,2,3,4 signaling success and any other return codes indicating errors.
  • Therefore a return code > 0 does not necessarily indicate failure but can be used, e.g. for workflow control, to indicate which jobs should be executed next.
  • If a given return code is not present with the list of successful return codes then the order will be considered being failed. However, if the return code is available with the list of successful return codes then an If Instruction can check the return code value and can continue with specific jobs if the If Instruction evaluates to true or to false.

Use Case:

  • x

Return Value Checking


Image Added


Explanations:

  • Return values are different from return codes as they do not indicate success or failure of a job but instead return variables and values indicating the processing result of a job, e.g. the number of records from a database table that have been processed by a job.
  • Such return values can be used to implement conditional processing. An If Instruction can evaluate the respective return value and determine what jobs to execute next.

Use Case: Variables Checking


Image Added


Explanations:

  • Technically this use case is not too different from the above checking of return values. However, the focus is not on a specific job but on specific values of variables.
  • Consider that order variables can be modified by users when adding an order. The above example therefore checks an order variable to decide which job to start a workflow for.
  • In addition the same type of checks can be performed with any step in a workflow.