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.
Retrieving Spool Output, Logs, and Application Logs in Other Formats
The FL_SHOWSPOOL
, FL_SHOWLOG
, and FL_SHOWAPPLLOG
parameters override the standard SHOWSPOOL
, SHOWLOG
, and SHOWAPPLLOG
parameters, respectively. The EnableFLParameters registry entry allows you to enable or disable these parameters (defaults to true
, enabled ). The available formats depend on the version of the target AS ABAP; see Spool Output for more information.
Example
You wish to retrieve the spool in PDF, XLSX, and Text. You set the FL_SHOWSPOOL
parameter to PDF;XLSX;Text
.
You wish to retrieve the application log in PDF and Text. You set the FL_SHOWAPPLOG
to PDF;Text
.
You wish to retrieve the application log entries in PDF and XLS format for External ID``12345678910
, Object
set to ZBO, Program
set to ZBO_VALPO
, furthermore, you want the entire application log in text. You set FL_SHOWAPPLOG
to PDF:ZBO,,12345678910,ZBO_VALPO;XLS:ZBO,,12345678910,ZBO_VALPO;Text
.
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
- Navigate to "Definitions > Processes".
- Choose Submit from the context-menu of process definition SAP_BW_ImportProcessChains.
- Select the BI or BW SAP system to import the process chains from.
- 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. - 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
- Navigate to "Definitions > Processes".
- Choose Submit from the context-menu of process definition SAP_BW_ProcessChainRun.
- Select the SAP System name of the BW system in the SAP System parameter.
- Select the process chain to start.
- 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
- Navigate to "Definitions > Processes".
- Choose Submit from the context-menu of process definition SAP_BW_ImportProcessChains.
- Select
BSP
from the SAP System. - Fill
EXAMPLE_PCHAIN
into the Technical Name of SAP BW Process Chain (PCHAIN_NAME
) parameter. - Select Yes for parameter Import Process Chain Definition? (
IMPORT_CHAIN_DEFINITION
). - Select Yes for parameter Test Run? (
TEST_RUN
). - 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. - Once the process has reached status Completed, inspect its
stdout.log
file. - The output file must contain:
Importing process chain EXAMPLE_PCHAIN
, this indicates that it would have imported the requested process chain. - 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. - Resubmit the process, set the Test Run? parameter to No this time.
Start BW process chain EXAMPLE_PCHAIN on SAP system BSP
- Navigate to "Definitions > Processes".
- Choose Submit from the context-menu of process definition SAP_BW_ProcessChainRun.
- Select BSP in the SAP System parameter.
- Select EXAMPLE_PCHAIN in the Technical Name of SAP BW Process Chain (
NAME
) parameter. - 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.