Versions Compared

Key

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

...

Code Block
languagejs
titleExamples for predicates
variable('aString') matches "(?i)x.*" //true if the value of variable('aString') starts with "x" or "X" (case insensitive)
variable('aString') matches ".*x.*"   //true if the value of variable('aString') contains "x"
variable('aString') == "x"            //true if the value of variable('aString') equals "x"
variable('aNumber').toNumber == 42    //true if the value of variable('aNumber') equals "42"
variable('aBoolean').toBoolean        //true if the value of variable('aBoolean') equals "true"

...



Explanations:

  • Return Codes come in two flavors:
    • for shell jobs the return code corresponds to the operating system 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:


     
    • For the above workflow example 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.

...