Status Handlers

Status Handlers let you control what happens when a Step in a Chain Definition reaches a particular status. You can use Status Handlers to deal with error conditions in a variety of ways.

To configure Status Handlers, select a Chain or Step in the Chain Editor and use the controls on the right.

There are two types of Status Handlers.

  • Status Handlers at the Step level are called Step status handlers. If a Step does not define a Status Handler that matches a given status, RunMyJobs looks for a match in the Default status handlers.
  • Status Handlers at the Chain level are called Default status handlers. A Status Handler defined at Chain level acts as default for a Step. A Default status handler is are overruled by any triggered Step status handler. Note that if you want to use chain-level Status Handlers, you must disable Request restart by default for the Chain.

Note: At most one Status Handler fires for each iteration of a Step.

You can configure Status Handlers to respond to the following states.

  1. A Completed Status Handler executes only if all Chain Processes in the Step have reached the status Completed, Skipped, or Ignored.
  2. A Canceled Status Handler executes if the Step contains at least one Chain Process with the status Canceled.
  3. An Error Status Handler executes if the Step contains at least one Chain Process with the status Error.
  4. A Killed Status Handler executes if the Step contains at least one Chain Process with the status Killed.
  5. An Unknown Status Handler executes if the Step contains at least one Chain Process with the status Unknown.
  6. If no other Status Handler executes, an Otherwise Status Handler executes.

Configuring a Status Handler

To configure an individual Status Handler, click in the corresponding field. A menu displays.

Note that some of the options in this menu include both Current and Master options. If you choose the Current version of something, RunMyJobs will restart the Chain or Chain process as it was defined when the process was originally submitted. If you choose the Master version of something, RunMyJobs will restart the Chain or Chain Process as it is currently defined, regardless of how it was defined when it was originally submitted. The Master options give you a chance to correct any problems with a definition before you restart it.

The options for configuring a Status Handler are as following for each status.

  • None: Do nothing.
  • Continue: Continue with the next Step (if any) as if the current Step or the Chain reached status Completed.
  • Request Restart: Attempt to restart the Step or Chain. For more information, see Request Restart.
  • Go to: Go to another Step or to the end of the Chain. Choose a specific Step or Go to End of Chain. If you choose Go to End of Chain, the options are:
    • Mark chain Error: Puts the Chain into an Error status.
    • Mark chain Completed: Puts the chain into a Completed status.
  • Restart: Attempts to restart the Step or Chain.

    • Step

      • Restart Step Current: Restart the Step.
      • Restart Step Master: Restart the latest version of the Step.
    • Step Delayed
      • Restart Step Delayed Current: Restart the Step after a delay.
      • Restart Step Delayed Master: Restart the latest version of the Step after a delay.
    • Failed Processes

      • Restart Failed Processes Current: Restart the Chain Processes that reached status Error.
      • Restart Failed Processes Master: Restart the latest version of the Chain Processes that reached status Error.
    • Chain

      • Restart Chain Current: Restart the Chain.

      • Restart Chain Master: Restart the latest version of the Chain.

  • Ignore Chain Default: Ignores the Chain's default Status Handler for this status and uses the system default Status Handler for the status (if any).

Note: You can change the order of Status Handlers can be changed via RedwoodScript. However, any Status Handler coming after Otherwise will be ignored.

Note: If a Chain Process has already reached status Skipped and previous iterations in the same Chain never reached Completed, you can use the Otherwise Status Handler to control what happens next.

Note: Restart Behavior is used to control when a Submit Frame should be interrupted and its recurrence stopped. By default, final states resume the recurrence of a Submit Frame.

Note: Status Handlers do not fire for manual actions on the upper-most processes of a Chain. For example, Status Handlers do not execute when an Operator cancels or kills the Chain.

Tip: Step-level Status Handlers are not evaluated for disabled or skipped Steps. If you want to use a precondition and Status Handlers (to match Otherwise), set the precondition on all of the Process Definitions in the Step individually, rather than on the Step itself.

Request Restart

When you set a Status Handler to Request Restart, an Operator Message is generated, allowing an Operator to decide how to react to the request. If an Operator right-clicks on that Operator Message and chooses Reply, the following dialog box displays.

Note that the options in this dialog box are dynamic. Different options display, depending on what you select for Action and Restart. They can also vary depending on the version of the Chain Definition the Chain uses.

The following table lists the available combinations of Request Restart options for the Master version of a Chain Definition.

Selections Description

Action: Abort Chain

Chain Status: Completed

Clicking OK will cause the Chain to stop executing, and set the status of the Chain to Completed.

Action: Abort Chain

Chain Status: Error

Clicking OK will cause the Chain to stop executing, and set the status of the Chain to Error.

Action: Continue

Handle as if: Completed

Clicking OK will cause the Step to be reprocessed as if all processes had gone to status Completed.

Action: Continue

Handle as if: Error

Clicking OK will cause the Step to be reprocessed as if some processes had gone to status Error.

Action: Restart

Restart: Chain from Start

When: Restart Immediately

Clicking OK will restart the Step immediately. All processes from the Step will be restarted, including those that finished in status Completed.

Action: Restart

Restart: Chain from Start

When: Hold Restarted Step

Clicking OK will cause the Chain to restart from the first Step. This first Step will be Held to allow for further modifications, this Step must be released before execution will continue.

Action: Restart

Restart: Entire Step

When: Restart Immediately

Clicking OK will restart the Step immediately. All processes from the Step will be restarted, including those in status Completed.

Action: Restart

Restart: Entire Step

When: Hold Restarted Step

Clicking OK will cause the Step to be restarted, and set to status Held to allow for further modifications, this Step must be released before execution will continue. All processes from the Step will be restarted, including those in status Completed.

Action: Restart

Restart: Errored Processes in Step

When: Restart Immediately

Clicking OK will restart the Step immediately. Only processes that finished in status Error from the previous run are restarted, all other processes in the Step are set to status Skipped.

Action: Restart

Restart: Errored Processes in Step

When: Hold Restarted Step

Clicking OK will restart and hold the Step, allowing for further modifications. This Step must be released before execution will continue. Only processes that finished in status Error in the previous run will be restarted.

The following table lists the available combinations of Request Restart options for Chains of non-Master Chain Definitions.

Selections Description

Action: Abort Chain

Chain Status: Completed

Clicking OK will cause the Chain to stop executing, and set the status of the Chain to Completed.

Action: Abort Chain

Chain Status: Error

Clicking OK will cause the Chain to stop executing, and set the status of the Chain to Error.

Action: Continue

Handle as if: Completed

Clicking OK will cause the Step to be reprocessed as if all processes had gone to status Completed.

Action: Continue

Handle as if: Error

Clicking OK will cause the Step to be reprocessed as if some processes had gone to status Error.

Action: Restart

Restart: Chain from Start

When: Restart Immediately

Definition: Use Old Definitions

Clicking OK will restart the Step immediately. The processes will be restarted using the definitions that were current when the Chain was submitted. All processes from the Step will be restarted, including those that finished in status Completed.

Action: Restart

Restart: Chain from Start

When: Restart Immediately

Definition: Use Updated Definitions

Clicking OK will restart the Step immediately. All processes from the Step will be restarted using new definitions, including those in status Completed.

Action: Restart

Restart: Chain from Start

When: Hold Restarted Step

Definition: Use Old Definitions

Clicking OK will cause the Chain to restart from the first Step. This first Step will be set to status Held to allow for further modifications, this Step must be released before execution will continue. The processes will be restarted using the definitions that were current when the Chain was submitted.

Action: Restart

Restart: Chain from Start

When: Hold Restarted Step

Definition: Use Updated Definitions

Clicking OK will cause the Chain to restart from the first Step. This first Step will be set to status Held to allow for further modifications, this Step must be released before execution will continue. The processes will be restarted using the new definitions.

Action: Restart

Restart: Entire Step

When: Restart Immediately

Definition: Use Old Definitions

Clicking OK will restart the Step immediately. All processes from the Step will be restarted, using the definition that was current when the Chain was submitted, including those in status Completed.

Action: Restart

Restart: Entire Step

When: Restart Immediately

Definition: Use Updated Definitions

Clicking OK will restart the Step immediately. All processes from the Step will be restarted using new definitions, including those in status Completed.

Action: Restart

Restart: Entire Step

When: Hold Restarted Step

Definition: Use Old Definitions

Clicking OK will restart and hold the Step, allowing for further modifications. This Step must be released before execution will continue. All processes from the Step will be restarted, using the definition that was current when the Chain was submitted, including those in status Completed.

Action: Restart

Restart: Entire Step

When: Hold Restarted Step

Definition: Use Updated Definitions

Clicking OK will cause the Step to be restarted, and set to status Held to allow for further modifications, this Step must be released before execution will continue. All processes from the Step will be restarted using new definitions, including those in status Completed.

Action: Restart

Restart: Errored Processes in Step

When: Restart Immediately

Definition: Use Old Definitions

Clicking OK will restart the Step immediately. Only processes that finished in status Error from the previous run are restarted, using the definition that was current when the Chain was submitted, all other processes in the Step are set to status Skipped.

Action: Restart

Restart: Errored Processes in Step

When: Restart Immediately

Definition: Use Updated Definitions

Clicking OK will restart the Step immediately. Only processes that finished in status Error from the previous run are restarted, using the new definition, all other processes in the Step are set to status Skipped.

Action: Restart

Restart: Errored Processes in Step

When: Hold Restarted Step

Definition: Use Old Definitions

Clicking OK will restart and hold the Step, allowing for further modifications. This Step must be released before execution will continue. The processes will be restarted using the definitions that were current when the Chain was submitted. Only processes that finished in status Error in the previous run will be restarted.

Action: Restart

Restart: Errored Processes in Step

When: Hold Restarted Step

Definition: Use Updated Definitions

Clicking OK will restart and hold the Step, allowing for further modifications. This Step must be released before execution will continue. The processes will be restarted using the new definitions. Only processes that finished in status Error in the previous run will be restarted.