BW_SET_CONSTRAINT
Sets the criteria for the automatic restart of a process chain's child processes.
Syntax
BW_SET_CONSTRAINT
[TYPE=...]
[,NAME=...]
,FIELD=...
[,OPERATOR=...]
,VALUE=...
,ACTION=...
[,COUNT=...]
[,DELAY=...]
Syntax |
Description/Format |
---|---|
TYPE= |
The type of child process. You can also use the wildcard character * (placeholder for any number of characters). Example: ABAP |
NAME= |
The name of the child process. The wildcard characters * and ? (placeholder for a character of your choice) can also be used. |
FIELD= |
The location in which the value (parameter VALUE) should be searched. STATUS = The status of the child process. Warning! Note that you can only search in the process log and the job log if this setting has been specified for the activated or restarted process chain (script element BW_ACTIVATE_CHAIN / BW_RESTART_CHAIN, parameter JOBLOGS / PROCESSLOGS). |
OPERATOR= |
The operator for the condition. EQ = Equals (only for FIELD=STATUS). |
VALUE= |
The value that should be searched. The following values (corresponding to the RSPC_STATE domain definition in the SAP system) can be used for checking the states of the child processes: X = Aborted |
ACTION= |
The action that should be taken for the child process that meets the condition. Allowed values: RESTART or ABEND RESTART = Restarts the relevant child process. |
COUNT= |
The number of restarts that should be made for the relevant child process (only for ACTION=RESTART). |
DELAY= |
The time that should be waited (in minutes) between several restarts (only for ACTION=RESTART). |
You can use this script element in order to restart child processes of process chains automatically.
This function determines a criterion which is composed of the condition that should be checked (such as querying a particular status) and an action that should be taken (such as canceling the task). The defined action is executed in all child processes to which these conditions apply.
Examples
The following example defines a restart criterion in which all canceled child processes of ABAP type whose names start with RSM are automatically restarted up to three times in an interval of 5 minutes.
BW_SET_CONSTRAINT NAME="RSM*",VALUE="X",OPERATOR="EQ",ACTION="RESTART",TYPE="ABAP",DELAY="5",COUNT="3"
The following definition causes all ABAP child processes whose names start with RSM to be canceled if the background job's log includes the term error.
BW_SET_CONSTRAINT NAME="RSM*",VALUE="error",OPERATOR="CP",ACTION="ABEND",TYPE="ABAP",DELAY="5",COUNT="3",SOURCE="JOBLOG"