Trigger Message Intermediary Catch Event Programmatically

Hello there,

I have a process where I have to trigger message intermediary catch event programmatically. Does anyone knows how to do it?

Here is my PTP.bpmn (32.5 KB)

P.S. I’m new to camunda so I don’t have experience.

Thank you in advance.

Are you tiggering it from an external source or from another process?

@Niall I’m triggering it from external source.

In that case you should use the Rest API.
Specifically correlate message

Thank you @Niall.

When I receive data in my database from external source I have to trigger this message event. Can you tell me more about processInstanceId. How can I know which exactly processInstanceId to provide by REST API?

You should avoid using the process instance id when trying to send a message. Instead you should give a process a business key (Which is an ID relevant to the business logic which you can assign).

Then you should use that key to correlate back to the process instance you want to send a message to.

I will try that. Thank you very much!