Problem Executing messageEventRecieved Boundary Events

#1

Hello,

I am hoping someone could help me troubleshoot and point me in the right direction with the following issue:

I am using Activiti Eclipse BPMN 2.0 Designer (Eclipse) and i have a scenario where i will have multiple tasks open at the same time under the same process instance id…my goal is to cancel the call activities / user tasks and for only the process instance that i am on. (I am interfacing with Collibra). I started down the route of using signals to cancel my activities but since they are defined as global (Because i had sub processes and cross BPMN files), they were cancelling ALL tasks even across process instances…not what i am looking for. So i started down the route of looking into message events and having message boundary events that i could call (because they are process id dependent) and then i could cancel the activity…The image below shows an example of what i am trying to do…I am trying to engage the message event to cancel the call activity. Any thoughts or next direction would be appreciatted. The example highlights that i will have multiple open user tasks and i want to kill all open besides the one i just executed and move on in the process. I know i get the execution by the proper name and it exists…i must be missing something somewhere.

My code to execute the call to the message (in script task highlighted in image)


import org.flowable.engine.runtime.Execution
import org.flowable.engine.RuntimeService

List executions = runtimeService.createExecutionQuery()
.messageEventSubscriptionName(“Cancel Message”)
.list();

for(Execution item in executions){
loggerApi.info("ID: " + item.getId())
loggerApi.info(“ProcessID:” + item.getProcessInstanceId())
loggerApi.info(“Root Process ID:” + item.getRootProcessInstanceId())

idVal = item.getId().toString()

runtimeService.messageEventRecieved("Cancel Message",idVal)

}


The error i get:
2019-05-09 14:54:19.373 [workflowExecutor-2] WARN o.f.e.i.b.b.ScriptTaskActivityBehavior – Exception while executing scripttask3 : problem evaluating script: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: org.flowable.engine.impl.RuntimeServiceImpl.messageEventRecieved() is applicable for argument types: (java.lang.String, java.lang.String) values: [Cancel Message, 271ea5ea-46d6-4a00-b029-44884ed44a17]
Possible solutions: messageEventReceived(java.lang.String, java.lang.String), messageEventReceived(java.lang.String, java.lang.String, java.util.Map)
2019-05-09 14:54:19.378 [workflowExecutor-2] ERROR o.f.j.s.i.a.DefaultAsyncRunnableExecutionExceptionHandler – Job e363528c-b08a-4ce9-b65c-73bf63a8bcaf failed
org.flowable.common.engine.api.FlowableException: problem evaluating script: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: org.flowable.engine.impl.RuntimeServiceImpl.messageEventRecieved() is applicable for argument types: (java.lang.String, java.lang.String) values: [Cancel Message, 271ea5ea-46d6-4a00-b029-44884ed44a17]
Possible solutions: messageEventReceived(java.lang.String, java.lang.String), messageEventReceived(java.lang.String, java.lang.String, java.util.Map)

image