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 — The script continues; the AE job ends normally ABEND — The script aborts; the AE job ends abnormally |
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 — The script aborts; the AE job ends abnormally IGNORE — The script continues; the AE job ends normally SUSPEND — The job remains active until a restart of the process chain or its child processes succeeds, or until the job is canceled manually |
ABEND |
| PROCESSLOGS=
(Optional) |
Controls output of the individual process logs of the process chain | Script literal | YES — Individual process logs are added to the process chain log NO — Only the process chain log is output ERROR — Individual process logs are output only when an error occurs |
YES |
| JOBLOGS=
(Optional) |
Controls output of the process logs of background jobs | Script literal | YES — Process logs of background jobs are output NO — Process logs of background jobs are not output ERROR — Process logs of background jobs are output only when an error occurs |
YES |
| LONGTEXT=
(Optional) |
Controls output of the long text (diagnostics text) of log messages | Script literal | ERROR — The long text is output only when an error occurs YES — The long text is always output NO — The long text is never output |
ERROR |
| REPLICATE=
(Optional) |
Controls replication of child processes of the process chain in the AE system | Script literal | NO — No replication takes place YES — Replicates child processes in the AE system; children are displayed in the Process Monitoring perspective and statistical records and reports are generated ALL — Replicates all child processes, including skipped ones; children are shown in the Process Monitoring perspective and statistical records and reports are generated |
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 — The spool list is not requested YES — The spool list is requested |
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 — Child process logs are written to the job report NO — Child process logs are not written to the job report |
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'