Modeling easy messaging

Hey, you guys.

I play with messaging and can’t get it done.

I want to send a message to a subprocess, create a human task, and continue the parent workflow after the subprocess is complete. But it’s not working. I think it’s easy to solve, but I’ve been trying for two days and I don’t get it.


MessageStart.bpmn (11.1 KB)

thank you for your help

Martin

It’s not possible to send a message from a process to itself - it’s against the BPMN standard. the message must leave the scope to be picked up. You should instead use the conditional even to trigger the even subprocess.

1 Like

Escalation event would also be appropriate.

1 Like

Thank you for your Answer. Perhaps you can show me how i have to model to start a workflow with message ?
I tryed :

${execution.getProcessEngineServices().getRuntimeService().startProcessInstanceByMessage(“Message_34i2p5l”).correlateWithResult()}

in a Intermediate Throw Event

and catch it in a other Workflow

but getting this exception

Cannot submit task form 5f953c0d-6b0e-11e8-907f-00155df8203f: Error while evaluating expression: ${execution.getProcessEngineServices().getRuntimeService().startProcessInstanceByMessage(“Message_34i2p5l”).correlateWithResult()}. Cause: org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘Message_34i2p5l’: No process definition matches the parameters

MessageReciver.bpmn (3.1 KB)
MessageStart.bpmn (11.1 KB)

One issue that you have is that your MessageReceiver.bpmn uses a intermediate message event instead of a Message Start Event.

Best
Felix

1 Like

Thank you. Now it work

1 Like