bw_create_process_chain
Create SAP BW/4HANA process chains by specifying steps and edges, including DTP loads, DSO activation, decisions, and collectors, with optional activation after creation.
Instructions
Create a Process Chain (RSPC) via the BW/4HANA Cockpit REST API. Builds the chain model from a list of steps and edges, creates it with a trigger-only skeleton, then updates it with the full model in a single operation. Optionally activates after creation. The TRIGGER (Start) node is implicit (node index 0) and must not be listed in steps. DTP_LOAD and generic referenced steps use bIsReference=true; ADSOACT and ADSOREM use inline variants. Collectors (AND, OR, XOR) require no extra fields beyond their type. Edge status defaults: neutral for edges whose source is TRIGGER or a collector; positive for all others. For two-step DTP loading always use bw_create_dtp first; this tool builds the process chain around existing DTPs. Supported step types: DTP_LOAD (DTP load), ADSOACT (DSO data activation), ADSOREM (DSO request cleanup), CHAIN (start a local sub-chain, verified), DECISION (branch on a decision variant, requires the variant field), and collectors AND / OR / XOR; the start trigger is implicit. A generic referenced-step path (any process type string plus an object name, bIsReference=true) is available and verified for DTP_LOAD and CHAIN; for other types it may work but is untested. Other inline-configuration process types (for example program execution, OS command, attribute change run) are not supported in this version. Edges support on-success (positive) and unconditional (neutral) links; on-error (negative) links are accepted in the schema but not emitted by default. DECISION branch edges: set sub_status to the branch EVENTNO ("01"=THEN/JA, "02"=ELSE/NEIN) — such edges are always positive. Create the referenced decision variant first with bw_create_decision_variant. To start the chain on an event instead of immediately, pass trigger_event (start type "E").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Process chain technical name, uppercase, max 30 characters (e.g. "CHAIN_NAME"). | |
| edges | Yes | Directed edges connecting steps. Use the step id or the literal "TRIGGER" for the start node. Status defaults: "neutral" when the source is "TRIGGER" or a collector (AND/OR/XOR); "positive" otherwise. For a branch edge out of a DECISION node, set sub_status to the branch EVENTNO ("01"/"02"); such edges are forced to "positive". | |
| steps | Yes | Ordered list of steps. The TRIGGER (Start) node is implicit at index 0 — do not include it here. Each step has a caller-chosen id used for edge wiring. Step types: DTP_LOAD (requires dtp field), ADSOACT (requires datastores array), ADSOREM (requires remDatastores array), CHAIN (requires object = sub-chain name), DECISION (requires variant = decision variant name), AND / OR / XOR (collector, no extra fields), or any other BW process type (requires object field). | |
| activate | No | If true, activate the chain immediately after creation. Default false. | |
| infoarea | Yes | InfoArea to file the chain under (e.g. "AREA_NAME"). | |
| description | Yes | Short description / label for the process chain. | |
| trigger_event | No | Optional event start-condition for the trigger (start type "E"). Omit for the default immediate start (start type "I"). |