Controlling Global and Partition Restart Behavior
Restart behavior is used to react to the final status of the process, see Restart Behavior for information on restart behavior. These settings can be specified globally and for a particular partition by creating special process definitions. You configure restart behavior on the Process Status tab of a process definition or chain definition.
The process definition for the system-wide default settings is named System_Defaults_System and resides in the GLOBAL partition.
The process definition for the partition-level settings is named System_Defaults_Partition and resides in the partition of the queue of the processes that you wish to specify the restart behavior for.
The only properties that can be set on these special process definitions are:
- Description - can only be set at creation-time in the ui.
- Documentation - can only be set at creation-time in the ui.
- Process Status
- Object-level security
note
These process definitions are special and you cannot submit them or modify any other properties. Their sole purpose is to allow you to specify restart behavior settings at various levels.
Global and Partition-Wide Restart Behavior
The Restart Behavior can be set on the process definition-level, chain definition-level, partition-wide, and system-wide. To set the Restart Behavior partition or system-wide, create a process definition named as follows:
<partition>.System_Defaults_Partition
- governs the Restart Behavior for the<partition>
of the queue in which the process run.GLOBAL.System_Defaults_System
- governs system-wide Restart Behavior.
note
The process definition will silently be turned into a special System process definition. The only settings you are allowed to change on these special process definitions are on the Security, Retention, and Process Status tabs.
The system processes the restart behavior in the following order, the first match is used:
- Process Definition or chain definition of process or chain.
<Partition of process definition>.System_Defaults_Partition
.GLOBAL.System_Defaults_System
.- Built-in defaults.
Procedure
Creating system-wide default restart behavior settings:
- Navigate to "Definitions > Retention".
- Choose Create System_Defaults_System definition from the context-menu.
- On the Process Status tab, select your desired restart settings.
- Choose Save & Close.
Creating partition-level default restart behavior settings:
- Navigate to "Definitions > Processes".
- Choose System_Defaults_Partition from the context-menu.
- On the Process Status tab, select your desired restart settings.
- Choose Save & Close.
Example
You want killed processes in the Finance partition to be restartable on request:
- Navigate to "Definitions > Processes".
- Choose System_Defaults_Partition from the context-menu.
- On the Process Status tab, select Request Restart for the On Killed property.
- Choose Save & Close.
You forgot to set the description at creation-time or would like to change the description of the process definition System_Defaults_System.
Navigate to "Scripting > Shell" and use the following code:
{
//Get the process definition
JobDefinition jDefinition = jcsSession.getJobDefinitionByName("System_Defaults_System");
//Set the description
jDefinition.setDescription("System-wide Restart Behavior");
jcsSession.persist();
}
You forgot to set the description at creation-time or would like to change the description of the process definition System_Defaults_Partition in the Finance partition:
Navigate to "Scripting > Shell" and use the following code:
{
//Get the partition and JobDefinition
Partition partition = jcsSession.getPartitionByName("Finance");
JobDefinition jDefinition = jcsSession.getJobDefinitionByName(partition, "System_Defaults_Partition");
//Set the description
jDefinition.setDescription("Restart Behavior for the Finance partition");
jcsSession.persist();
}
See Also
JobChain JobDefinition ProcessDefinition