Question & Answer
Question
How to change the Intermediate Message Event (IME) Correlation ID value AFTER IME has been "started"?How to change BPD instance variable?How to use Move Token API?
Answer
On Demand Consulting
Author: Mikhail Zilbergleyt
Summary
You have a running instance, which is blocked on an IME event. You realize that due to some error, the correlation id value configured for this IME is wrong.
You need to change the correlation ID for the IME to match the event.
Audience:
BPM Administrators
BPM Developers
Solution:
First you need to change the value of the BPD Variable, which is mapped to the Correlation Id on the IME.
In version 8.5.6+, there is a REST API which can be used to perform this operation.
https://www.ibm.com/support/knowledgecenter/en/SSFTDH_8.5.7/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_process_instanceid_variable_name_put.htm
In version prior to 8.5.6 the only option is to use evaluate java script rest API:
https://www.ibm.com/support/knowledgecenter/en/SSFTDH_8.5.5/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_process_instanceid_put_evaluate_a_javascript_expression.htm
Note: for this API to work the 100Custom.xml should have the following directive:
<common merge="mergeChildren">
<enable-javascript-execution merge="replace">true</enable-javascript-execution>
</common>
Second you need to re-initialize the IME. This can be done by moving the token on the IME step back to the same step.
To find the token call the REST API to retrieve details of a process instance. For example: https://adminib-m006uls:4022/rest/bpm/wle/v1/process/1509?parts=diagram
Look in the response in the diagram/steps[] find the step with the name equals to the IME name and type: event in your Process.
For example:

Record the TokenID in this case '2' and the ID attributes of the step.
Once you get this information execute the Move Token REST API. The Step ID would be the Target argument of the URL.
Author: Mikhail Zilbergleyt
Summary
You have a running instance, which is blocked on an IME event. You realize that due to some error, the correlation id value configured for this IME is wrong.
You need to change the correlation ID for the IME to match the event.
Audience:
BPM Administrators
BPM Developers
Solution:
First you need to change the value of the BPD Variable, which is mapped to the Correlation Id on the IME.
In version 8.5.6+, there is a REST API which can be used to perform this operation.
https://www.ibm.com/support/knowledgecenter/en/SSFTDH_8.5.7/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_process_instanceid_variable_name_put.htm
In version prior to 8.5.6 the only option is to use evaluate java script rest API:
https://www.ibm.com/support/knowledgecenter/en/SSFTDH_8.5.5/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_process_instanceid_put_evaluate_a_javascript_expression.htm
Note: for this API to work the 100Custom.xml should have the following directive:
<common merge="mergeChildren">
<enable-javascript-execution merge="replace">true</enable-javascript-execution>
</common>
Second you need to re-initialize the IME. This can be done by moving the token on the IME step back to the same step.
To find the token call the REST API to retrieve details of a process instance. For example: https://adminib-m006uls:4022/rest/bpm/wle/v1/process/1509?parts=diagram
Look in the response in the diagram/steps[] find the step with the name equals to the IME name and type: event in your Process.
For example:

Record the TokenID in this case '2' and the ID attributes of the step.
Once you get this information execute the Move Token REST API. The Step ID would be the Target argument of the URL.
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSQTW3","label":"IBM On Demand Consulting for Hybrid Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]
Was this topic helpful?
Document Information
Modified date:
22 March 2019
UID
ibm10771855