【问题标题】:Camunda integration with camunda-bpm-camel community edition drops exchange property set between routesCamunda 与 camunda-bpm-camel 社区版的集成删除了路由之间的交换属性集
【发布时间】:2020-07-31 18:45:53
【问题描述】:

将 Camunda 与 Apache Camel Community Edition 集成,并面临在服务任务二中访问时,上图中的服务任务一中设置的 Exchange 属性被丢弃的问题。两个服务任务都在调用${camel.sendTo('direct:one')}${camel.sendTo('direct:two')} 显然,似乎只有在直接端点之间路由时才会保留交换属性,但在这种情况下,属性会被删除。

Route1 和 Route2

@Override
    public void configure() throws Exception {
        from("direct:one")
                .bean(SomeClass.class, "someMethod")
                .to("http4://localhost:8002/one")
                .bean(SomeClass.class, "someMethod")
    }

@Override
    public void configure() throws Exception {
        from("direct:two")
                .bean(SomeClass.class, "someMethod")
                .to("http4://localhost:8002/two")
                .bean(SomeClass.class, "someMethod")
    }

Here in the image one can see the camel sendTo endpoint

【问题讨论】:

    标签: apache-camel camunda


    【解决方案1】:

    虽然您正在发送到直接端点,但我认为将创建新的交换,因为每个路由都与单独的服务任务连接。您可以通过记录每个路由的 exchangeId 来确认这一点。在每条路线中,只需添加一个.log("${exchangeId}")。由于属性是交换的一部分,而不是消息的一部分,因此它们会丢失。您可以尝试在标题中设置您的数据并检查。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-15
      • 1970-01-01
      • 1970-01-01
      • 2018-06-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多