This operation updates process instance metadata using administrative access. Use this operation when an administrative script needs to change process instance metadata outside the normal user scope. If you don't need the elevated privileges, use Update a Process Instance's Metadata without them instead.
The base request is:
updateProcess(processInstanceId, updateProcessPayload)
Use UpdateProcessPayload to specify the metadata to update for the process instance.
The following example updates the name, description, and business key:
const updateProcessPayload = {
name: 'Updated order review',
description: 'Updated by script',
businessKey: variables.businessKey
};
variables.process =
new RuntimeProcessInstanceAdminService()
.updateProcess(
variables.processInstanceId,
updateProcessPayload
);
In this example:
- name: 'Updated order review' specifies the new name of the process instance.
- description: 'Updated by script' specifies the new description.
- businessKey: variables.businessKey specifies the business key to associate with the process instance.
- updateProcess(...) updates the specified process instance with the metadata provided in UpdateProcessPayload.