When a Sequence Job or Workflow Job fails in JAMS, it can be manually restarted or resubmitted or automatically retried. The details for these options are listed in Restarting, Resubmitting, and Retrying Failed Jobs.
Sequences
Manually Restarting a Failed Job within a Sequence Job
Jobs within Sequences may stop their Sequence upon failure, if the Job is in a Failure Action Task with the option set to Fail. (See below for more information.) If the released Job exists within a Sequence, the Sequence is also released from its halted state and the released Job is restarted.
- Click Monitor from the Shortcuts menu.
- Expand the Sequence to view the child Jobs.
- Right-click the failed Job and select Release.
- On the Release Job dialog, ensure Release to run again is selected.
- Set other options as needed.
- Click Ok. The released Job begins executing.
Manually Resubmitting a Failed Job within a Sequence Job
When you resubmit a failed Job within a Sequence, the Job is given a new Entry ID. In the Monitor view, it is also displayed outside the hierarchy used for the Sequence, so it appears to be a separate Job.
- Click Monitor or History from the Shortcuts menu.
- Right-click the failed Job and select Submit.
- Enter all applicable information.
- Set the Parameters as necessary.
- Click Submit Run Request. The new Job instance is created.
Automatically Retrying a Failed Job within a Sequence Job
Retry Options for Sequences
Sequences are defined as Jobs, so every recovery option available for an individual Job is available on a Sequence Job, including Minimum Completion Severity, Retry Count, and Retry Interval,
Failure Action Task within a Sequence Job
When you use a Sequence to run a task or Job, the Failure Action Task controls the behavior of the Sequence if that Job fails. A failed Job within a Sequence will cause the Sequence to enter a halted state, unless a Failure Action Task is configured.
NOTE: Any Job within the Failure Action Task will still fail based on its set Minimum Completion Severity property.
Multiple Jobs can be added into a Failure Action Task, and they are treated as a single unit. Use the options below to control the behavior of the parent Sequence Job.
Option | Definition |
Fail (Default) |
If any Job inside the Failure Action Task fails, the Sequence will fail and the status is set to Error. |
Continue |
If any Job inside a Failure Action Task fails, the Sequence continues executing the next task(s) and the final status is set to Successful. |
Configuring Retry Properties and a Failure Action Task
- Click Definitions from the Shortcuts menu.
- Right-click the Sequence Job and select Properties.
- Click the Properties tab.
- Set the Retry Count and Retry Interval options for the Sequence as desired.
-
Click the Source tab.
-
From the Tasks Toolbox, drag and drop the Failure Action task onto the diagram where Job failures should cause the Sequence Job to fail.
-
Drag and drop one or more Jobs into the Failure Action.
-
In the Properties panel, ensure the Failure Action is set as needed.
- Save and close the Sequence.
Workflows
Manually Restarting a Failed Job within a Workflow Job
- Click Monitor from the Shortcuts menu.
- Expand the Workflow to view the child Jobs.
- Right-click the failed Job and select Release.
- On the Release Job dialog, ensure Release to run again is selected.
- Set other options as needed.
- Click Ok. The released Job begins executing.
Manually Resubmitting a Failed Job within a Workflow Job
When you resubmit a failed Job within a Workflow, the Job is given a new Entry ID. In the Monitor view, it is also displayed outside the hierarchy used for the Workflow Job, so it appears to be a separate Job.
- Click Monitor or History from the Shortcuts menu.
- Right-click the failed Job and select Submit.
- Enter all applicable information.
- Set the Parameters as necessary.
- Click Submit Run Request. The new Job instance is created.
Retry Options for Workflow Jobs
A Workflow Job's Recovery options are the same as other JAMS Jobs, with Minimum Completion Severity, Retry Count, and Retry Interval. Like Sequence Jobs, Workflow Jobs will not fail unless they are configured to do so.
Jobs inside the Workflow Job
Jobs and Sequences inside a Workflow Job exist as SubmitEntry activities.
The Workflow can be configured to:
- Wait for a Job activity to complete.
- Wait after a Job activity fails.
- Continue the Workflow, even before a Job completes.
To configure Job activity options, select the Job and use the Wait and WaitAfterFailure properties.
Option | Definition |
Wait |
Does not allow the Workflow to continue past the Job activity that is waiting, until the Job activity initially completes. |
WaitAfterFailure |
Causes the Workflow to stop on the failure of the Job activity. This is a useful way to allow a Job or Sequence activity to attempt its own recovery options before the Workflow continues. |
Causing a Workflow to Fail
A Workflow will not fail based on the failure of an individual Job activity unless the Completion Action for that Job activity has either a TerminateWorkflow or Throw activity configured.
TerminateWorkflow and Throw activities are not limited to Completion Actions. They can also be configured inline with any other activity or logic that should cause a Workflow to fail. For more information, see Using the TerminateWorkflow Activity to stop a Workflow Job.
Configuring Retry Options for Workflow Jobs
- Click Definitions from the Shortcuts menu.
- Right-click the Job and select Properties.
- Click the Properties tab.
- Set the Retry Count and Retry Interval options as desired.
-
Click the Source tab to view the Workflow Editor.
-
In the Properties panel on the right, ensure the Wait and WaitAfterFailure properties are configured as needed on the Job and Sequence activities.
- Ensure the TerminateWorkflow or Throw activities are configured for situations that would cause the entire Workflow to fail. In the image below, the Workflow terminates if the Sleep60 Job fails.
- Save and close the Workflow Job.
Related Articles
Restarting, Resubmitting, and Retrying Failed Jobs
Comments