A private variable of a linked process (a BPD started by a linked process activity) belongs to that child instance, so you change it on the child instance, not on the parent.
Find the child instance id - the parent knows it through the activity's execution; the simplest is the REST execution tree of the parent, which lists the child under the linked activity:
GET /rest/bpm/wle/v1/process/{parentPiid}?parts=executionTree
-> executionTree.root.children[...].name == "Approve order" (the linked process activity), .externalActivitySnapshotID / .createdTaskIDs
GET /rest/bpm/wle/v1/process?searchFilter=... (or search by instance name: linked instances are named after the child BPD)Set the variable on the child (any BPM 8.5.x / BAW release):
PUT /rest/bpm/wle/v1/process/{childPiid}/variables
BPMCSRFToken: <token>
{ "approvalLimit": 5000, "requestor": { "name": "Ana", "id": "u123" } }The variable does not have to be exposed as business data for this call; "private" only means it is not visible in searches. If the child is currently waiting on a task, the running coach will pick the new value up the next time the task is opened (the task input was copied when the task was created, so an open coach is not refreshed).
From a script in the parent (server side) you can do the same with BPMRESTRequest; there is no JavaScript API that writes another instance's variables directly.
If the requirement is recurring (operations want to correct data), consider adding an intermediate message event to the child BPD that receives a "correction" message and maps its payload into the private variables - that keeps the change inside the model and in the audit trail.
References