1
votes

Hello guys i am working on microservices application using camunda workflow and rabbitmq. My problem is that i don t know how to stop flow and continue with rabbit message.

I have this simple flow : enter image description here

public class RulesDelegate implements JavaDelegate {

@Override
public void execute(DelegateExecution delegateExecution) throws Exception {

}

public class NotificationDelegate implements JavaDelegate {

@Override
public void execute(DelegateExecution delegateExecution) throws Exception {

}

I need to achieve behaviour that when i start flow it comes to evaluate rules service task and send AMQP message through rabbitmp to micorservices. Then flow should wait for response or some event notice that logic is complete and it can continue to Notification service task and same there.

When i start flow it not waiting and its finished and i don t know how to stop it, it have to by async request from service to rabbit. Any advice please? Thank you

1

1 Answers

1
votes

You need to use a message receive event to wait for a response in BPMN (https://docs.camunda.org/manual/7.12/reference/bpmn20/events/message-events/#message-intermediate-catching-event)

You can see that in this example: https://github.com/berndruecker/camunda-spring-boot-amqp-microservice-cloud-example/ - the "wait for goods shipped" task does exactly wait for a response on RabbitMQ.