Orchestration Jobs

What is an Orchestration Job?

An Orchestration Job is a Job whose sole responsibility is to orchestrate the execution of other Jobs, that is, to execute a Job, wait for it to finish, execute the next Job on successful completion, or handle errors should the Job fail.

If you have not already done so, take the opportunity to read the tutorial My First Framework Job.

By now, you should have learned that the general structure of a Framework Job is: –

MyJob->MyJobProcess->MyJobDoSomething

You created these Jobs from the Template Jobs, made minimal changes to MyJob and MyJobProcess, only telling them which Jobs they should call next.

MyJobDoSomething is the Job that does your work.

Do I need Orchestration Jobs?

As we know, the simplest Framework Job is: –

MyJob->MyJobProcess->MyJobDoSomething

For much of you work, things are more complex than this, and you’re going to break your work down in to a number of child Jobs.

Each of your child Jobs will have been derived from Job: TemplateChild, and this is also true for your orchestration Jobs.

You may have a single orchestration Job, or you may have multiple orchestration Jobs, if your work is complex. You may also be using checkpointing within your orchestration, if you need to restart failed Jobs at specific failure points.

The following screenshot shows the top-level orchestration Job from our Salesforce Data Migration Framework.

As you can see, work is broken down in to a series of seven steps, ranging from data acquisition through to data loading. Each of these steps is an orchestration Job that, for example, orchestrates each of the data acquisition tasks. Checkpointing is used throughout, to ensure that a complex and potentially long-running process can be restarted from any sensible point of failure.

Job: TMigrateOrchestrate
Job: TMigrateOrchestrate