Continuous integration for BPM / BAW = every change becomes a snapshot that a pipeline validates, installs on a test server, tests, and promotes - all through the REST APIs and twx exports. A working setup:
- Source of truth: the Process Center repository (developers work in the designer). The pipeline exports - it does not try to build twx from text. Each nightly / on-demand run: create a snapshot on the track (Operations REST or the Process Center), export it as twx, store the twx + the validation report in Git / the artifact repository, tag with the snapshot name.
- Static checks: the validation report must have zero errors (GET /rest/bpm/wle/v1/snapshot/{id}?parts=validation); naming and documentation rules with a script over the twx XML (a TWX analyzer); forbidden things (hard-coded hosts, console.log in production views, deprecated artifacts).
- Deploy to test: install the snapshot on the test Process Server (online: Process Center install API; offline: installation package + Operations REST containers/install), copy environment variables / EPVs / teams from the previous version, activate, set as default.
- Tests: REST-level tests start exposed items with input data, complete tasks with action=finish, assert variables and end states; UI tests with Playwright / Selenium for the important coaches; integration stubs (WireMock) for external systems; a small performance smoke test.
- Promote: the same twx / package goes to staging and production with approval gates; environment differences only in env vars, EPVs and Server definitions (never a rebuild).
- Feedback: results posted to the team channel; a failed validation blocks the snapshot from being promoted.
# pipeline skeleton (bash + curl, traditional BAW; on CP4BA use ZenApiKey instead of -u)
TOKEN=$(curl -sk -u $PCUSER:$PCPW -X POST "$PC/rest/bpm/wle/v1/system/login" -H "Content-Type: application/json" -d '{"refresh_groups":false}' | jq -r .csrf_token)
SNAP=$(curl -sk -u $PCUSER:$PCPW -H "BPMCSRFToken: $TOKEN" -X POST "$PC/ops/std/bpm/containers/CLM/versions?branch=Main&name=$BUILD" | jq -r .id) # create snapshot (BAW 20+)
curl -sk -u $PCUSER:$PCPW "$PC/rest/bpm/wle/v1/snapshot/$SNAP?parts=validation" | jq -e '.data.validationErrors | map(select(.severity=="error")) | length == 0' || exit 1
curl -sk -u $PCUSER:$PCPW -o CLM-$BUILD.twx "$PC/rest/bpm/wle/v1/processApps/export?snapshotId=$SNAP" # export (endpoint per release; or BPMExport)
curl -sk -u $PSUSER:$PSPW -H "BPMCSRFToken: $TOKEN2" -X POST "$PS/ops/std/bpm/containers/install" -F "file=@CLM-$BUILD.twx" # install on test
python3 tests/run_rest_tests.py "$PS" CLM $BUILD # functional testsTooling: Jenkins / Tekton / GitHub Actions for the orchestration, BPMExport / BPMImport or the Operations REST for packages, a TWX static analyzer for the checks; on CP4BA the same with Zen API keys and the Workflow Center routes (question on CI/CD on CP4BA).
References