Setting the Retention Period for Processes
Every process definition that is to be deleted automatically needs to have a keep clause. The keep clause defines how many processes or how long processes will be kept in the system. You may retain processes per (parameter value combination), system, user, or per date. You can further limit processes retention by status. The default is to keep all processes.
Incorrect or inefficient retention strategies can cause process accumulation-related issues such as poor performance and/or file system saturation. Please contact Redwood Support Services if you are in doubt about the efficiency of your strategy.
Processes per Primary Key
At least one process definition parameter must be marked as Part Of Key. The system will keep <n>
processes per parameter value (combination); only parameter values of parameters with the Part Of Key property will be taken into account. The keep clause processor maintenance process that is scheduled in the background will delete the oldest job(s) once the clause has been exceeded. This strategy is useful for generic process definitions such as a copy of the SAP_AbapRun process definition, for example; you specify the program to be run in a parameter so each parameter combination defines a different process.
Processes per System
This is the most trivial keep strategy. The oldest process will be deleted by the keep clause processor maintenance process that is scheduled in the background once the keep clause has been exceeded.
Processes per User
This strategy allows you to keep a number of processes per user; the oldest process will be deleted by the keep clause processor maintenance process once the keep clause has been reached.
Maximum age of Processes
This strategy allows you to keep processes for a period of time. The keep clause processor maintenance process that is scheduled in the background will delete all processes for which the keep has expired.
All Processes indefinitely
This is the most trivial keep strategy and should only be used when you have other strategies in place for process deletion, such as the Active Archive module. The difference between this keep clause setting and the default behavior is that processes with this keep clause are not counted towards the ratio of processes without a keep clause; see the Retention Warning section below.
Partition-wide and System-wide Keep Clause
You can set partition-wide and system-wide keep clause defaults by creating or editing <Partition>.System_Defaults_Partition
and/or GLOBAL.System_Defaults_System
process definitions. The process definitions are also used to configure default restart behavior; see Controlling Global and Partition Restart Behavior for instructions on how to create them.
Keep Force
When you enable Keep Force for a process which has a parent, the process definition will be kept according to its keep clause if the keep clause of its parent is shorter. When the parent of a process with Keep Force has been deleted, the process will no longer be considered as having had a parent. If Keep Force is false, which is the default, then process definitions that have a parent will not be deleted according to their own keep clause, but to that of their parent. Keep Force has no effect on manually deleting a process or chain, that is, when you delete the parent, all child processes and chain processes will always be deleted as well. Keep Force also has no effect on processes which have a shorter keep clause than their parent.
Statuses
You can exclude processes in a specific status from the keep clause using the DefaultKeepStatus registry entry. Processes that have been excluded from the keep clause are kept forever. If this registry entry is not set, processes in all final statuses adhere to the keep clause. The registry entry takes a succession of status codes, note that no spaces, commas or semi-colons should be used; the order is not relevant.
Status codes for final status
A
- CanceledC
- CompletedE
- ErrorK
- KilledU
- Unknown
Example value: KAUE
Keep Processes In Status
The Keep Processes In Status is used to keep processes in other statuses for another duration.
For example, you need keep processes in status A,E,K,U
for 15 days, to give you time to troubleshoot any issues, processes in status C
(Completed) are to be kept 12 months.
You specify Processes for 12 Months
in the Keep field, and A,E,K,U for 15 Days
in the Keep Process In Status field.
KeepExpiration Field on the Job Table (Model)
You set the KeepExpiration
field of a process to override the keep clause specified on the process definition of the process.
Retention Warnings
Redwood Server allows you to specify retention limits which, when reached, will display a warning. The default limits are:
100 000
processes (and chains, steps, chain processes) in Redwood Server10 000
new processes (and chains, steps, chain processes) over a period of 24 hours80%
of process definitions without a specific keep clause
The warning is displayed if 80%
of non-system process definitions do not have a keep clause set and either the maximum number of processes has been reached ( 100 000
) or the number of new processes over a period of 24 hours reaches 10 000
.
You can specify your own criteria using the retention registry entries.
See Also
JobChain JobDefinition ProcessDefinition