用两个启动消息实施JBPM流程

发布于 2025-02-07 15:59:58 字数 905 浏览 2 评论 0原文

我正在尝试使用JBPM和Business Central Workspace来实施业务流程(部分显示)。业务流程是没有错误的,但是当我部署它时,行为不是预期的。

从特定上讲,我要获得的行为如下:

  1. 当收到温度或二氧化碳消息时,该过程开始(不可能知道收到的第一个事件是温度还是二氧化碳)。
  2. 收到温度消息后,执行任务温度。
  3. 收到二氧化碳消息后,执行了TaskCo2。
  4. 之后,收到温度和二氧化碳消息,应执行任务加入。

取而代之的是,在上图中运行该过程,我获得的行为如下:

  1. 该过程在接收到温度或二氧化碳消息时开始(不可能知道收到的第一个事件是温度还是二氧化碳) 。
  2. 接收到温度消息时,执行任务温度。
  3. 执行二氧化碳消息时,Taskco2。
  4. 该过程在网关中“停止”,任务加入从未执行。

有其他方法可以获得我想要的行为吗?

我知道,如果我以这种方式修改过程

“替代业务过程”

任务加入的任务是正确执行的,但是,在我的情况下,这两个消息没有预定义的序列,因此该解决方案对我不起作用。

business process

I'm trying to implement a business process (partially shown in the figure), using JBPM and the Business Central Workspace. The business process is built without errors, but then when I deploy it, the behaviour is not the one expected.

Specfically, the behaviour that I would like to obtain is the following:

  1. The process starts when a temperature OR co2 message is received (it is not possible to know if the first event received is the temperature or the co2 one).
  2. When a temperature message is received, TaskTemperature is executed.
  3. When a co2 message is received, TaskCO2 is executed.
  4. After that both a temperature AND a co2 messages are received, TaskJoined should be executed.

Instead, running the process in the figure above, the behaviour that I obtain is the following:

  1. The process starts when a temperature OR co2 message is received (it is not possible to know if the first event received is the temperature or the co2 one).
  2. When a temperature message is received TaskTemperature is executed.
  3. When a co2 message is received TaskCO2 is executed.
  4. The process "stops" in the Gateway and TaskJoined is never executed.

Is there another way to obtain the behaviour that I want?

I know that if I modify the process in this way

Alternative Business Process

the TaskJoined is correctly executed, but, since in my case, there is no a predefined sequence for the two messages, this solution cannot work for me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一紙繁鸢 2025-02-14 15:59:58

基本上,您要求不建议使用两个信号起点。另外,我建议使用任何一个事件(在数据之上创建包装器)开始您的过程,然后跳过您在开始事件中已经收到的等待状态。

BPMN图提供: duckflow

“

Basically you're asking for two signal starting points which AIFAIK is not recommended. alternatively, i would suggest is to start your process with any one of the event (create a wrapper on top of your data) then simply skip the wait state which you have already received on start event.

bpmn diagram courtesy: duckflow

example

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文