Starting a process with a receive message task

Hello

I’ve modeled the following process starting with a receive Task as the first task.process_started_with_receive_task.bpmn (20.9 KB)

I’m trying to start the process using the rest API
POST /rest/engine/default/message

{“messageName”: “ReceiveCreateTopicMessage”

the rest response I get says

Cannot correlate message ‘ReceiveCreateTopicMessage’: No process definition or execution matches the parameters

Is it possible to start the process this way ?
What am I doing wrong ?

Regards

Why are you using this end point?

/rest/engine/default/message

I’m assuming from
https://docs.camunda.org/manual/latest/reference/rest/message/post-message/
that I can call my receive message task this way
is this correct ?

On another workflow I can start a process sucessfuly with the following
POST /rest/engine/default/process-definition/key/my_key/start

If I remove /default
POST /rest/engine/message
I get a 404 error

You might be using the wrong endpoint, assuming you haven’t customized things, If you’re using the Springboot distro the rest endpoint is

localhost:8080/rest/

If you’re using another distro the endpoint is:

localhost:8080/engine-rest/

So you just need to add your call to the end of one of the above depending on which you use

I’m using the springboot version
the /rest endpoint is OK

Still getting the same error

“POST /rest/message HTTP/1.1”
“Content-Length: 66]”
“Content-Type: application/json”
“Host: localhost:9443”

“{“messageName”: “ReceiveCreateTopicMessage”,“resultEnabled”: true}”

"HTTP/1.1 400 "
“Content-Type: application/json”
“{“type”:“RestException”,“message”:“org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘ReceiveCreateTopicMessage’: No process definition or execution matches the parameters”}”

Can you upload your model?

process_topic_kafka_vludo_4.bpmn (17.1 KB)

The problem is with our model.
If you want to start a process with a message you need to use a message start event to be begin the process.

I now get a 200 from the REST API
Thanks for your feedback

1 Like