Automation Engine Script Guide > AE JCL for Applications > SAP > BW_SET_CONSTRAINT

BW_SET_CONSTRAINT

Sets the criteria for the automatic restartA restart refers to the repetition of an object's execution. This action differs from a new start in some parts. of a process chain's childA subordinate task (such as a task that runs in a workflow). processes.

Syntax

BW_SET_CONSTRAINT

[TYPE=...]
[,NAME=
...]
,FIELD=... 
[,OPERATOR=...]
,VALUE=...
,ACTION=...
[,COUNT=...]
[,DELAY=...]

Syntax

Description/Format

TYPE=

The type of child process.
Format of the value: script literal

You can also use the wildcard character * (placeholder for any number of characters).

For example: ABAP

NAME=

The name of the child process.
Format of the value: scriptA particular Automation Engine object type. literal

The wildcard charactersThese are placeholders for characters when you specify filters. ? stands for exactly one character, * for any number of 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.
Format of the value: script literal

Allowed values: STATUS, JOBLOG or PROCESSLOG

STATUS = The statusThis represents the condition of a task (such as active, blocked, generating). of the child process.
JOBLOG = Job log. Logs of the background jobAn Automation Engine object type for a process that runs on a target system..
PROCESSLOG = Process log. Logs of the child processes.

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.
Format of the value: script literal

Allowed values: EQ (default), NE, CP or NP

EQ = Equals (only for FIELD=STATUS).
.NE = Does not equal (only for FIELD=STATUS.)
CP = Contains pattern.
NP = Does not contain pattern.

VALUE=

The value that should be searched.
Format of the value: script literal

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
R = Ended with errors
G = Successfully completed
F = Completed
A = Active
P = Planned
S = Skipped at restart
Q = Released
Y = Ready
= Undefined

ACTION=

The actionActions are predefined building blocks for recurring activities. They are commonly used for managing third party systems or in deployment scenarios. that should be taken for the child process that meets the condition.
Format of the value: script literal

Allowed values: RESTART or ABEND

RESTART = Restarts the relevant child process.
ABEND = Cancels the relevant child process.

COUNT=

The number of restarts that should be made for the relevant child process (only for ACTION=RESTART).
Format of the value: number
Default value: 1

DELAY=

The time that should be waited (in minutes) between several restarts (only for ACTION=RESTART).
Format of the value: number
Default value: 1

Description

You can use this script element in order to restart child processes of process chains automatically.

This functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… 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 taskAn executable object that is running. Tasks are also referred to as activities.). 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"

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH