Introduction

The Case Instruction is used for conditrional processing of jobs and other instructions in a workflow.

  • The instruction extends the JS7 - If Instruction.
  • The Case Instruction can be used with
    • repeated Case-When Instructions
    • a single Case-Else Instruction.

The feature is introduced with  JOC-1943 - Getting issue details... STATUS

FEATURE AVAILABILITY STARTING FROM RELEASE 2.7.3

Workflow Instruction: Case, Case-When, Case-Else

Download Workflow Example (upload .json): pdiConditionalResultCase.workflow.json

The basic structure when using the instruction includes:

Case
    When <predicate> Then ... When-End
    When <predicate> Then ... When-End
    Else ... Else-End
Case-End

Explanations:
  • The outer Case and Case-End Instruction block holds any inner instructions.
  • The inner Case-When Instructions are used with a predicate, i.e. an expression that evaluates to true or false.
    • The instruction implements a Case-When and Case-When-End block holding any other instructions.
    • Any number of Case-When Instructions can be added to a Case Instruction.
    • More than one Case-When Instruction's predicate can evaluate to true and will trigger included jobs and instructions being executed.
  • The Case-Else Instruction optionally can be used as the last instruction inside the Case Instruction.
    • The instruction implements a Case-Else and Case-Els-End block holding any other instructions.
    • A single Case-Else Instruction can be used.
  • Case Instructions can be nested. An inner Case-When Instruction or Case-Else Instruction can include other Case Instructions.

Configuration View

The Case Instruction is displayed like this in the Configuration view:

Execution View

The Case Instruction is displayed like this in the Workflows view.



  • No labels