【问题标题】:Flowable: how to pass parameters to listenerFlowable:如何将参数传递给监听器
【发布时间】:2019-03-21 10:44:55
【问题描述】:

我是 Flowable 的新手,所以我有一个问题。我想将一些标志传递给我的听众。 bpmn 部分如下所示:

<startEvent id="start" flowable:async="true">
        <extensionElements>
            <flowable:executionListener event="start" class="my.dummy.listener.DummyListener" />
        </extensionElements>
    </startEvent>

提前谢谢你

【问题讨论】:

    标签: java flowable


    【解决方案1】:

    ExecutionListener 有方法void notify(DelegateExecution execution)。通过DelegateExecution#getCurrentFlowElement,您可以访问整个startEvent 流元素。从那里你可以得到任何扩展元素。这意味着为了传递参数,您需要定义自己的扩展元素,然后在侦听器中使用它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-21
      • 2021-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多