BW_RESTART_CHAIN
Use the BW_RESTART_CHAIN script element to continue an interrupted process chain. Once the process chain resumes, it is monitored until it ends and its log is stored in the activation report. You can also store individual process logs or background job logs.
Transaction: RSA1
Syntax
BW_RESTART_CHAIN ID=...,LOGID=...[,NOFOUND=...][,ERROR=...][,PROCESSLOGS=...][,JOBLOGS=...][,LONGTEXT=...][,REPLICATE=...][,GET_SPOOL=...][,COLLECTLOGS=...]
Parameters
| Parameter | Description | Format | Allowed Values | Default Value |
|---|---|---|---|---|
| ID= | Technical name of the process chain | Script literal | n.a. | n.a. |
| LOGID= |
25-digit log ID of the process chain run to continue. Tip: Use PREP_PROCESS_REPORT to retrieve the log ID from an AE job report. |
Script literal | n.a. | n.a. |
| NOFOUND=
(Optional) |
Handling if the process chain cannot be found | Script literal |
|
NORMAL |
| ERROR=
(Optional) |
Handling if the process chain ends abnormally. This parameter is useful for restarting process chains or their child processes; the job does not end, so processing in a parent object such as a workflow can continue. | Script literal |
|
ABEND |
| PROCESSLOGS=
(Optional) |
Controls output of the individual process logs of the process chain | Script literal |
|
YES |
| JOBLOGS=
(Optional) |
Controls output of the process logs of background jobs | Script literal |
|
YES |
| LONGTEXT=
(Optional) |
Controls output of the long text (diagnostics text) of log messages | Script literal |
|
ERROR |
| REPLICATE=
(Optional) |
Controls replication of child processes of the process chain in the AE system | Script literal |
|
NO |
| GET_SPOOL=
(Optional) |
Controls whether the spool list of the started job is requested. When YES, the spool list is stored as a text file in the directory defined by the Download_dir= parameter ([GLOBAL] section) of the SAP Agent INI file. The filename is structured as follows: <SAP job count>_<step number>_<spool number>.txt. The file is also registered as job output in the AE job. For more information, see Agent SAP and Registered Job Output. |
Script literal |
|
NO |
| COLLECTLOGS=
(Optional) |
Controls whether reports of activated child processes are written to the job report. By default, reports of replicated child processes are available in both the job report and the child process task. Use NO to avoid storing this information twice. | n.a. |
|
YES |
Important Considerations
The reports of child processes are not available if you specify NO for both the REPLICATE and COLLECTLOGS parameters.
Examples
The following example checks, in a post-script, whether the ZSBB1 process chain was interrupted by examining the error number. If so, the 25-digit log ID is saved to a variable.
: SET &HND# = PREP_PROCESS_REPORT (,,PLOG, '*U2004111*', 'COL=DELIMITER', "DELIMITER =@'@")
: SET &LOGID# = ''
: PROCESS &HND#
: SET &LOGID# = GET_PROCESS_LINE (&HND#,4)
: ENDPROCESS
: IF &LOGID# <> ''
: PUT_VAR VARA.CHAINS, 'ZSBB1', &LOGID#
: ENDIF
A subsequent job reads the log ID from the variable and restarts the process chain to continue processing.
: SET &LOGID# = GET_VAR (VARA.CHAINS,ZSBB1)
BW_RESTART_CHAIN ID='ZSBB1',LOGID='&LOGID#',ERROR='ABEND',NOFOUND='NORMAL'