Can you describe how a job chain works?
Job Chains are either created using the JobScheduler Object Editor (JOE), or using API methods in individual programs:
- The individual jobs in the job chain are created along with the job chain. Every position in the job chain is assigned a state and a job.
- An Order is then created - i.e. a simple token that is assigned a state in a job chain (normally the beginning of a job chain). Optionally an order has a payload consisting of parameters that are processed by the jobs. When an order is added to the job chain, it is enqueued by JobScheduler according to the state of the order. The job assigned to this position then carries out the order. Additionally, each position in a job chain has a successor state and an error state. JobScheduler changes the state of an order after each job in the job chain has been processed. If the job step was successful, JobScheduler sets the successor state; otherwise it sets the error state.
- The order then moves to another position in the job chain as defined by the new state.
Jobs within a job chain can be executed in multiple processes to handle parallel processing of orders.