gpt4 book ai didi

java - Spring Activiti 网关

转载 作者:太空宇宙 更新时间:2023-11-04 13:24:14 32 4
gpt4 key购买 nike

我对 Spring 和 Activiti 都是个菜鸟,所以这应该是一个很大的问题。如果我的问题结构不佳或其他什么问题,我提前道歉。

这是我的 Activity 图的一部分:

enter image description here

首先要做的事情:

在服务任务“创建笔记本电脑请求”中,应用程序将保存到数据库。这工作得很好。

在用户任务“批准请求”中,processInstanceId 也会保存到数据库中。

然后,网关进来了。

所以,首先:

  1. 我使用了正确的网关吗?这样,如果响应为"is",则将采用两条"is"路径?
  2. 为了简单起见,假设yesno 路径都通向结束任务。我应该在哪里放置监听器/类,以及在其中放置什么?有某种示例模板吗?也许现在只需要一个基本的“真”或“假”就可以了。
  3. 最后,我在网上看到,要使两条路径汇聚到一个任务,它必须经过网关 - 尽管并非总是如此。什么时候合适?

谢谢!

最佳答案

来自用户指南:

The functionality of the inclusive gateway is based on the incoming and outgoing sequence flow:

fork: all outgoing sequence flow conditions are evaluated and for the sequence flow conditions that evaluate to true the flows are followed in parallel, creating one concurrent execution for each sequence flow. join: all concurrent executions arriving at the inclusive gateway wait in the gateway until an execution has arrived for each of the incoming sequence flows that have a process token. This is an important difference with the parallel gateway. So in other words, the inclusive gateway will only wait for the incoming sequence flows that will be executed. After the join, the process continues past the joining inclusive gateway.

因此,要回答您的问题,您需要研究该方案的 xml 表示形式。

定义包容性网关需要一行 XML:

<inclusiveGateway id="myInclusiveGateway" />

但实际行为( fork 、加入或两者)是由连接到包容性网关的序列流定义的。

如果您愿意,您可以阅读manual 8.4.3.包容性门户。非常有用。

关于java - Spring Activiti 网关,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32808142/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com