alf
March 15, 2019, 1:27pm
1
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
Niall
March 15, 2019, 1:31pm
2
Why are you using this end point?
/rest/engine/default/message
alf
March 15, 2019, 1:36pm
3
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
Niall
March 15, 2019, 1:54pm
4
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
alf
March 15, 2019, 2:52pm
5
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”}”
Niall
March 15, 2019, 2:53pm
6
Can you upload your model?
alf
March 15, 2019, 3:02pm
7
Niall
March 15, 2019, 3:17pm
8
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.
alf
March 15, 2019, 4:15pm
9
I now get a 200 from the REST API
Thanks for your feedback
1 Like