Skip to main content

Orchestration

Composing Jobs that depend on each other.

Most real work is several Jobs that have to happen in a particular order, or a Job whose next step depends on what the last one returned.

Sequences​

A Sequence is a type of Job whose only purpose is to run other Jobs in a specific order. It acts as a container, allowing you to group related tasks together into a single, unified flow. When you trigger a Sequence, it starts at the top and works its way down, running each step exactly as you designed it.

Tasks are not only Job submissions. A Task can transfer a file or run a script, so a Sequence can carry a small process rather than only a running order.

Tasks within a Sequence can also be grouped to run at the same time in parallel, which is how one step fans out while the rest of the Sequence stays in order.

A Sequence can hand its parameters down to the Jobs it runs, so one set of inputs drives the whole flow.

If a step fails, the Sequence halts rather than running on regardless, and you decide whether that fails the whole Sequence or it carries on without that step.

Workflows​

A Workflow is for decision logic and different execution paths. It is built in the Workflow Designer from building blocks called Activities, and it runs on Windows Workflow Foundation. JAMS extends the standard Activity set with its own, for submitting Jobs, updating Variables and other JAMS-specific tasks.

A Workflow holding more than one Activity has to nest them inside a parent container, either a Sequence or a Flowchart. The difference between those two is movement: a Flowchart can loop back to an earlier step or skip one entirely, while a Sequence only moves forward.

The Workflow Sequence activity is not the Sequence Execution Method. They share a name and nothing else. One is a container inside a Workflow, the other is the kind of Job described above.

A Workflow can also stop and wait for a person. The AskQuestion Activity sends its question to the Scheduler and holds the Workflow there until someone with Manage access answers it in the Monitor.

If the work is a straight line, use a Sequence. Reach for a Workflow when a step's outcome changes what happens next.

Events and Notifications, for reacting​

Events and Notifications react to Jobs that are running or have finished: send mail on failure, run a recovery Job, raise an event class that something else is watching for.

What sets a handler off is either how the Job finished or an event raised somewhere else. A handler can also fire when a Job starts rather than when it ends, and a single Job can carry several at once.

They are Schedule Items, so they follow the same rules as everything else on the Schedule tab, including inheritance from the Folder.

The difference is direction. A Sequence or a Workflow decides in advance what runs next. An Event responds to what actually happened. Recovery logic is usually better as an Event than as another branch, because it keeps the failure path out of the main path.