Versions Compared

Key

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

...

Read more on this feature in the order and job chain documentation.

Job Chain Patterns

Forward Dependency Patterns

Job chains represent a sequence of jobs that implements forward dependency.

Job chain with single end nodes for success and failure

  • The jobs within the job chain will result in a unique successful end state or otherwise will use the same end state for failure.
  • Each job would immediately cause the job chain to be completed in case of error.

...

Flowchart
Job1 [label="Job 1",fillcolor="lightskyblue"]
Job1_successful [shape=diamond,label="execution successful?",fillcolor="white"]
Job2 [label="Job 2",fillcolor="lightskyblue"]
Job2_successful [shape=diamond,label="execution successful?",fillcolor="white"]
Job3 [label="Job 3",fillcolor="lightskyblue"]
Job3_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess [label="End state: success",fillcolor="palegreen"]
EndStateError [label="End state: error",fillcolor="lightcoral"]
 
Job1 -> Job1_successful
Job1_successful -> Job2 [label=" yes "]
Job1_successful -> EndStateError [label=" no "]
Job2 -> Job2_successful
Job2_successful -> Job3 [label=" yes "]
Job2_successful -> EndStateError [label=" no "]
Job3 -> Job3_successful
Job3_successful -> EndStateSuccess [label=" yes "]
Job3_successful -> EndStateError [label=" no "]

Job chain with multiple end nodes for success and failure

  • The jobs will use a common end state in case of success and individual end states for failure
  • Each job would immediately cause the job chain to be completed in case of error.

...

Flowchart
Job1 [label="Job 1",fillcolor="lightskyblue"]
Job1_successful [shape=diamond,label="execution successful?",fillcolor="white"]
Job2 [label="Job 2",fillcolor="lightskyblue"]
Job2_successful [shape=diamond,label="execution successful?",fillcolor="white"]
Job3 [label="Job 3",fillcolor="lightskyblue"]
Job3_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess [label="End state: success",fillcolor="palegreen"]
EndStateError1 [label="End state: error 1",fillcolor="lightcoral"]
EndStateError2 [label="End state: error 2",fillcolor="lightcoral"]
EndStateError3 [label="End state: error 3",fillcolor="lightcoral"]
 
Job1 -> Job1_successful
Job1_successful -> Job2 [label=" yes "]
Job1_successful -> EndStateError1 [label=" no "]
Job2 -> Job2_successful
Job2_successful -> Job3 [label="yes"]
Job2_successful -> EndStateError2 [label=" no "]
Job3 -> Job3_successful
Job3_successful -> EndStateSuccess [label=" yes "]
Job3_successful -> EndStateError3 [label=" no "]

Job chain with individual successor nodes

  • The jobs are organized in a way that in case of error a job node is skipped an processing is continued with a later job node.
  • This sample represents the usage of a job for error handling of previous jobs.

...

Flowchart
Job1 [label="Job 1",fillcolor="lightskyblue"]
Job1_successful [shape=diamond,label="execution successful?",fillcolor="white"]
Job2 [label="Job 2",fillcolor="lightskyblue"]
Job2_successful [shape=diamond,label="execution successful?",fillcolor="white"]
Job3 [label="Job 3",fillcolor="lightskyblue"]
Job3_successful [shape=diamond,label="execution successful?",fillcolor="white"]
EndStateSuccess [label="End state: success",fillcolor="palegreen"]
EndStateError [label="End state: error",fillcolor="lightcoral"]
 
Job1 -> Job1_successful
Job1_successful -> Job2 [label=" yes "]
Job1_successful -> Job3 [label=" no \n continue with Job 3 "]
Job2 -> Job2_successful
Job2_successful -> Job3 [label=" yes "]
Job2_successful -> EndStateError [label=" no "]
Job3 -> Job3_successful
Job3_successful -> EndStateSuccess [label=" yes "]
Job3_successful -> EndStateError [label=" no "]

Nested Job Chain Pattern

  • Two Job Chains B and C are integrated into a Job Chain A for sequential processing.
  • Job Chain A starts Job Chain B and waits for completion. 
  • Once Job Chain B has terminated then Job Chain A is continued and starts Job Chain C.
  • After completion of Job Chain C the processing of Job Chain A is continued.

...

Flowchart
JobA1 [label="Job A1",fillcolor="lightskyblue"]
JobA2 [label="Job A2",fillcolor="lightskyblue"]
JobA3 [label="Job A3",fillcolor="lightskyblue"]
JobB1 [label="Job B1",fillcolor="orange"]
JobB2 [label="Job B2",fillcolor="orange"]
JobB3 [label="Job B3",fillcolor="orange"]
JobC1 [label="Job C1",fillcolor="lavender"]
JobC2 [label="Job C2",fillcolor="lavender"]
JobC3 [label="Job C3",fillcolor="lavender"]
 
JobA1 -> JobB1 [label=" start job chain B "]
JobA1 -> JobA2 [label=" skip job chain B "]

JobB1 -> JobB2 -> JobB3
JobB3 -> JobA2 [label=" continue job chain A "] 

JobA2 -> JobC1 [label=" start job chain C "]
JobA2 -> JobA3 [label=" skip job chain C "]
 
JobC1 -> JobC2 -> JobC3
JobC3 -> JobA3 [label=" continue job chain A "] 

Split & Sync Job Chain Pattern

  • Two Job Chains B and C are executed in parallel and are controlled by the initiating Job Chain A.
  • The initiating Job Chain A splits execution into two Job Chains B and C.
  • The execution of Job Chain B and C is synchronized and Job Chain A is continued.

...