I have two process definitions: FIRST REVIEW and SECOND REVIEW. Both of them should have a possibility to be canceled by the user at any time, that’s why I’ve created an Event cancellation subprocess in FIRST REVIEW:
It is triggered by the Message Correlation call, this is how it looks like:
{
messageName: 'StartCancelSubprocess',
processInstanceId: "FIRST_REVIEW_PROCESS_INSTANCE_ID",
processVariables: {
cancellationType: {
value: 'manual',
type: 'String'
},
canceledBy: {
value: 'User',
type: 'String'
}
}
}
For the FIRST REVIEW process definition, it works perfectly - it interrupts the main process flow and goes into the cancelation subprocess, where the process ends.
But if I’m trying to call the same cancelation subprocess (which is located in FIRST REVIEW diagram) from the SECOND REVIEW process definition, it throws the following error:
message: “org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘StartCancelSubprocess’: No process definition or execution matches the parameters”
Are there any solutions to how such situations may be handled? Or I need to create a similar Event cancel subprocess in the SECOND REVIEW process definition. I’ve added both diagrams as an example.
REVIEW_1.bpmn (2.7 KB) REVIEW_2.bpmn (2.7 KB)
