Running Process Chains

A process chain defines a sequence of processes that are scheduled to wait in the background for an event. These processes can trigger a separate event that can, in turn, start other processes. When you monitor a process chain in Redwood Server, the process chain is displayed like a Chain.

When a process of a process chain reaches the status Error, you have the possibility to start just the erroneous process, its parent or the parents' parent, see the Restarting Process Chains section for more information.

Note: It is not possible to use Redwood Server to balance the load of process chains across SAP application servers. As far as scheduling is concerned, you can only influence the parent job. You can, however, restart certain child jobs.

Sending Spool Files to Financial Closing Cockpit

You can make all output of the process chain available in Financial Closing Cockpit (FCc) by specifying the parameter SAP_APPSAPI_CHAIN_GET_OUTPUT.

This parameter accepts two values:

  • A - to be set on the parent Process Definition of the process chain; will force all output to be available in FCc.
  • M - to be set on the parent Process Definition and the child Process Definition of which you want the output.

Monitoring Process Chains

Note: Monitoring Process Chains requires the ProcessServerService.SAP.XBPVariant license key.

You can configure Redwood Server to monitor process chains started from within SAP, they are displayed like Chains and allow you to restart them if you meet the prerequisites for restarting process chains.

See Monitoring Process Chains for more information.

Importing Process Chains

You use the following definitions to import process chains:

Process Definition Use
SAP_BW_ImportProcessChains Used to import process chains, optionally with its definition.
SAP_BW_ImportProcessChainDefinition Used to import the definition of an already imported process chain; you run this to update the definition in Redwood Server when the process chain in SAP has been modified.SAP_BW_ImportProcessChains ParametersSAP_BW_ImportProcessChainDefinition Parameters

SAP_BW_ImportProcessChains Parameters

Tab Parameter Description Direction Data Type Default Expression Values
Parameters SAP_SYSTEMS SAP System InOut String

Parameters PCHAIN_NAME Technical Name of SAP BW Process Chain In String

Parameters PCHAIN_TEXT Description of SAP BW Process Chain In String

Parameters MAX_COUNT Maximum Count In Number

Parameters IMPORT_CHAIN_DEFINITION Import Process Chain Definition? In String N Y, N
Parameters CREATE_JOBDEFS Create a Job Definition? In String N Y, N
Parameters DROP_OLD_SELECTION Drop Old Matching Values? In String Y Y, N
Parameters TEST_RUN Test run? In String N Y, N
Parameters CCMS_JOB_DEFINITION CCMS Process Definition In String

Parameters CLIENT Target Client; the client the process will use. In String

Generation Settings NAME Name of Generated Job Definition In String

Generation Settings JOBNAME_GENERATION Use name as In String

Generation Settings APPLICATION Application In String

Generation Settings PARTITION Partition In String

Generation Settings OVERWRITE Overwrite Existing Job Definitions? In String Y Y, N
Generation Settings CHAIN_RESTARTABLE Make Processes Restartable If Errors Occur? In String F F (Failed) A (All) N (Not restartable)
Generation Settings SYNCHRONOUS Synchronous Run? In String N Y, N
Generation Settings SIMULATE Simulate Run? In String N Y, N
Generation Settings NOPLAN No Plan? In String N Y, N
Job Output Parameters SHOWLOG Retrieve Job Log? In String Y Y, N
Job Output Parameters SHOWSPOOL Retrieve Spool Lists? In String Y Y, N
Job Output Parameters SHOWAPPLLOG Retrieve Application Logs? In String N Y, N
Job Output Parameters IGNORE_APPL_RC Ignore Application Return Code? In String Y Y - Ignore return code N - Use system default U - Use return code

SAP_BW_ImportProcessChainDefinition Parameters

Parameter Description Direction Data Type Default Expression Values
SAP_SYSTEMS SAP System In String

PCHAIN_NAME Technical name of the SAP BW Process Chain In String

DROP_OLD_SELECTION Drop old selection? In String Y Y, N

Custom CCMS Definition

You duplicate the SAP_CcmsJob Process Definition and customize the new definition to suit your needs. Note that you should not delete the SAP Job Name and SAP Job Count parameters, these are required.

You add additional parameters, control how the process files are retrieved and in which format, and/or add RedwoodScript actions to the definition.

Restarting Process Chains

Note: Monitoring Process Chains requires the ProcessServerService.SAP.XBPVariant license key.

The following Process Definitions allow you to start, represent and restart process chains in your BI or BW system.

Process Definition Use
SAP_BW_Process Represents a process chain
SAP_BW_ProcessChainRun Used to start a process chain
SAP_CcmsJob Represents a process Chain Process

See Restarting Process Chains for more information.

Starting Process Chains with Direct Scheduling in SAP

When you want to schedule process chains in Redwood Server which have Direct Scheduling in SAP enabled, make sure the option Immediate start is selected. If the Date/Time is selected and if the time is in the past, the start of the Chain will fail. Note that it will also fail if you try to start it from SAPGui. You need to change the process chains to use either the Start Immediate option or change them to Start Using Meta Chain or API.

Transient Errors

By default, Redwood Server will put processes that return an error into status Error; Redwood Server has no means to determine if an error is transient or not.

The IgnoreError registry entry has been introduced to allow you to specify a list of errors that Redwood Server will ignore while the job is active in the SAP system.

Prerequisites

  • An RFC connection has been established between the central Redwood Server and a BI or BW system, as outlined in Connecting to SAP Systems.

Procedure

Import Process Chains from your remote SAP system

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of Process Definition SAP_BW_ImportProcessChains.
  3. Select the BI or BW SAP system to import the process chains from.
  4. Specify the technical name or description of the process chain to import in the Technical Name of SAP BW Process Chain (PCHAIN_NAME) or Description of SAP BW Process Chain (PCHAIN_TEXT) parameters, respectively; leaving these fields empty will import all process chains.
  5. Specify any other parameters, as required.

Tip: If you do not want to import all process chains and do not know the exact technical name or description of a process chain, submit the import with the Technical Name and Description parameters empty and Test Run set to Yes; you will find all process chains in the output of the import Process Definition. Since you performed a Test Run, no process chains will have been imported.

Start a BW process chain

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of Process Definition SAP_BW_ProcessChainRun.
  3. Select the SAP System name of the BW system in the SAP System parameter.
  4. Select the process chain to start.
  5. Choose Submit to schedule the job.

Example

The following examples use an SAP BW system named BSP and a process chain named EXAMPLE_PCHAIN to illustrate importing and running a process chain. Note that a process chain must first be imported before it can be run.

Import Process Chain EXAMPLE_PCHAIN, with its definition, from SAP system BSP

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of Process Definition SAP_BW_ImportProcessChains.
  3. Select BSP from the SAP System.
  4. Fill EXAMPLE_PCHAIN into the Technical Name of SAP BW Process Chain (PCHAIN_NAME) parameter.
  5. Select Yes for parameter Import Process Chain Definition? (IMPORT_CHAIN_DEFINITION).
  6. Select Yes for parameter Test Run? (TEST_RUN).
  7. Choose Submit Summary on the left-hand side, select Monitor process definition 1234 (you will most certainly have a different Process Definition ID than 1234); choose Submit.
  8. Once the process has reached status Completed, inspect its stdout.log file.
  9. The output file must contain: Importing process chain EXAMPLE_PCHAIN, this indicates that it would have imported the requested process chain.
  10. The output file must contain: Generating job definition EXAMPLE_PCHAIN for process chain EXAMPLE_PCHAIN, this indicates that it would have imported the definition of the requested process chain.
  11. Resubmit the process, set the Test Run? parameter to No this time.

Start BW process chain EXAMPLE_PCHAIN on SAP system BSP

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of Process Definition SAP_BW_ProcessChainRun.
  3. Select BSP in the SAP System parameter.
  4. Select EXAMPLE_PCHAIN in the Technical Name of SAP BW Process Chain (NAME) parameter.
  5. Choose Submit.

Tip: When you set the parameter Create a Definition? (CREATE_JOBDEFS) to Yes on SAP_BW_ImportProcessChains during import, a Process Definition will be created in Redwood Server for that process chain. You submit this directly instead of using Process Definition SAP_BW_ProcessChainRun and having to fill in all the parameters.

See Also