I know how to complete a waiting “Receive Task” for a message via REST API.
I understand it from the REST
Correlate a Message | docs.camunda.org
But I can only send a message to break the waiting status on “Receive Task”, what if I want to send something which will notify that the process started asynchronously is failed and in that case complete the “Receive Task” but stop the process after that.
I have one approach: Send some status (with SUCCESS or FAILED as per the task result) and then use it in an XOR gate to stop the process in case of FAILED status received. Any other option?
Hi @Himanshu_Singh,
you can attach another interrupting message boundary event to your receive task:
If you correlate the “service failed” message, the receive task will be canceled and the process instance continues with the “Repair infrastructure” task: Message Events | docs.camunda.org
Hope this helps, Ingo
1 Like
Thanks for the reply @Ingo_Richtsmeier !
Is it possible to have 2 boundary events to one receive task?
In that case:
I will use one boundary event for Message Boundary Event to notify the Failure status and end the process.
and second boundary event for Timeout the Receive Task in case it does not receive the response message within specified time.
Hi @Himanshu_Singh,
yes, you can attach as many boundary events as you like.
Hope this helps, Ingo
2 Likes