0 votes
995 views
in REST API by

1 Answer

0 votes
by (30.6k points)

"Business data" here means the process instance's variables (and the exposed business data that the search index shows). Update them with the process variables resource of the classic REST API, or the task data actions while a task is open:

# 1. instance variables (any running instance; full replacement of each variable you name)
PUT /rest/bpm/wle/v1/process/2072.123/variables
Content-Type: application/json
BPMCSRFToken: <token>
{ "order": { "number": "ORD-42", "status": "APPROVED", "customer": { "id": "c1", "name": "Ana Perez" } }, "approver": "jdoe" }

# read first (to modify in place)
GET /rest/bpm/wle/v1/process/2072.123?parts=data
# 2. task data (a task's input/output variables; updates the instance when the task completes)
PUT /rest/bpm/wle/v1/task/2078.456?action=setData&params={"order":{...}}&parts=data
# 3. complete a task with output data in one call
PUT /rest/bpm/wle/v1/task/2078.456?action=finish&params={"decision":"APPROVED","comment":"ok"}
# 4. BAW 21+ Process REST v2: the instance's "actions" list shows set_data when the caller may change data (see /bpm/docs of your level for the call)

The exposed business data used by searches (the "business data" columns in Process Portal) is updated automatically by the engine when the underlying variable changes through any of these calls - there is no separate API for it. Rules: send whole variables (the engine does not merge partial objects), keep types consistent with the business object, and obtain the CSRF token first on BAW 20+ / CP4BA. Server-side from a script the same is BPMRESTRequest (question 3127); inside the flow use data mapping (question 3160).

References

Related questions

0 votes
1 answer 762 views
0 votes
1 answer 1.9k views
0 votes
1 answer 2.1k views
0 votes
1 answer 1.0k views
0 votes
1 answer 1.2k views
0 votes
1 answer 2.2k views
0 votes
1 answer 2.2k views
asked May 15, 2016 in REST API by BPM Tips Admin (21.5k points)
0 votes
1 answer 825 views
0 votes
1 answer 2.9k views
0 votes
1 answer 2.5k views
0 votes
1 answer 823 views
0 votes
1 answer 1.6k views
0 votes
1 answer 942 views
0 votes
1 answer 1.5k views
0 votes
1 answer 1.4k views
0 votes
2 answers 3.2k views

723 questions

807 answers

98 comments

4.9k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...