how can i receive this message on the order-receive message start event, do I need to start a new process instance for the seller pool, ? I had also tried the same using the bpmnProcessId of the seller pool, but it didnt worked I got the following error then
processing failed; nested exception is io.camunda.zeebe.client.api.command.ClientStatusException: Command ‘CREATE’ rejected with code ‘INVALID_STATE’: Expected to create instance of process with none start event, but there is no such event] with root cause
I m using spring-zeebe-starter client of version 8.0.7 with Zeebe 8.0 cluster
When using a message start event leave the correlation key blank ("").
Furthermore, make sure that messageName in your publishMessageCommand is the same as specified in your BPMN process model. If both conditions hold, the buyer process should instantiate your seller’s process.
Each process/pool should be contained in a separate model.
It is not necessary to start the seller process explicitly - this is done automatically when the message event is received.
But now the problem is order-accepted service worker is called twice for each message publish from order-create . I am not sure why iam getting the message twice for each flow instance.
quite strange that only order-accepted service worker is behaving abnormally, the order-hold and oder-update service tasks are getting called correctly based on the conditions. Please see the below code for the order-accepted service worker
@ZeebeWorker(type = “order-accepted”, autoComplete = true)
public void orderAccepted(final ActivatedJob job, @ZeebeVariable Integer resultValue1) {
System.out.println(
"Order accepted message data from the process variables: "
+ resultValue1);
}
sometimes this will call twice, some times this wont even called, but the other order-update and order-hold will be called correctly.