【问题标题】:Camunda flow with rabbitmq control asynchronous带有rabbitmq控制异步的Camunda流
【发布时间】:2020-03-26 18:43:53
【问题描述】:

大家好,我正在使用 camunda 工作流和 rabbitmq 开发微服务应用程序。我的问题是我不知道如何停止流量并继续发送兔子消息。

我有这个简单的流程:

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 {

}

我需要实现当我启动流程时评估规则服务任务并通过rabbitmp向micorservices发送AMQP消息的行为。然后流程应该等待响应或一些事件通知逻辑完成,它可以继续通知服务任务和那里一样。

当我开始流时它不等待并且它完成并且我不知道如何停止它,它必须通过从服务到兔子的异步请求。 请问有什么建议吗? 谢谢

【问题讨论】:

    标签: spring rabbitmq camunda


    【解决方案1】:

    您需要使用消息接收事件来等待 BPMN 中的响应 (https://docs.camunda.org/manual/7.12/reference/bpmn20/events/message-events/#message-intermediate-catching-event)

    您可以在此示例中看到:https://github.com/berndruecker/camunda-spring-boot-amqp-microservice-cloud-example/ - “等待货物发货”任务确实在等待 RabbitMQ 上的响应。

    【讨论】:

    • 非常感谢,在我写完这个主题后,我找到了你的例子。我完全按照您编写的服务任务解决了这个问题,但是在每个任务之后我添加了消息中间抛出事件。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-06-10
    • 1970-01-01
    • 2018-06-28
    • 2013-07-12
    • 2012-11-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多