Message Correlate is not working properly

Hi
i have tried to create below BMN when i tried executing control is not coming to recever event , could you please look once


code:
execution.getProcessEngineServices()
.getRuntimeService()
.createMessageCorrelation(“test”)
.processInstanceId(execution.getProcessInstanceId())
.correlateAll();

But control is not coming in PosteventRequestDelegate class when i ytrying to trace no error is coing

BPMN Message events can’t be sent from within the same process instance.

What functionality are you trying to accomplish, maybe i can help you find a better symbol to use.

1 Like

Hi Niall,

Thanks for response , i am trying to trigger one event before complete process , in the subprocess “PosteventReoprtDelegate” class i do have logic for maintain matrices and insert into the DB for reporting purpose, in the subproess i am taking the all variable from execution and preparing payload to insert into the DB