我如何在 jBPM 中表示并发操作,其中任何操作都可以结束流程?

发布于 2024-09-04 11:38:30 字数 705 浏览 8 评论 0原文

举个例子:许可证必须由两名律师和一名工程师审查。如果这三个中的任何一个拒绝它,则该过程进入“拒绝”结束状态。如果三者都授予许可,则进入“授予”最终状态。所有三名审查员可以同时进行审查,也可以按任意顺序进行审查。

一旦一位工程师授予了它,它就不应该可供工程师检查;一旦两名律师审查完毕,就不应该再提供给律师;一旦一名工程师和两名律师检查完毕,它应该进入既定的最终状态。

我最初的想法是,要么我有一个过于复杂的状态转换图,“相同的”中间状态多次重复,要么我携带(外部)状态与过程{boolrejected; int 工程师SignoffId; int Lawr1SignoffId; int Lawr2SignoffId}。

或者类似的东西?如果是这样,工程师的拒绝如何终止“律师”中的子流程?

START->FORK->Engineer->Granted?---------------->Y->JOIN-->Granted
          |->Lawyers-->Granted?->by 2 lawyers?->Y---^
                  ^                          |
                  |--------------------------N 

jBPM 对此问题的标准答案是什么?您能给我指出此类答案的示例或文档吗?

谢谢。

An example: a permit must be examined by two lawyers and one engineer. If any of those three reject it, the process enters a "rejected" end state. If all three grant the permit, it enters a "granted" end state. All three examiners may examine simultaneously, or in any order.

Once one engineer has granted it, it shouldn't be available to be examined by an engineer; once two lawyers have examined it, it shouldn't be available to lawyers; once one engineer and two lawyers have examined it should go to the granted end state.

My initial thinking is that either I have a overly complicated state transition diagram, with "the same" intermediate states multiply repeated, or I carry (external) state with the process { bool rejected; int engineerSignoffId; int lawyer1SignoffId; int lawyer2SignoffId}.

Or something like this? If so, how does the engineer's rejection terminate the subprocess that is in "Lawyers"?

START->FORK->Engineer->Granted?---------------->Y->JOIN-->Granted
          |->Lawyers-->Granted?->by 2 lawyers?->Y---^
                  ^                          |
                  |--------------------------N 

What's the canonical jBPM answer to this? Can you point me to examples or documentation of such answers?

Thanks.

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

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

发布评论

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

评论(1

匿名的好友 2024-09-11 11:38:30

好吧,我不确定我是否正确理解了您的用例,但让我尝试一下。

被拒绝的最终状态很简单——你可以有很多,也可以有一个,这并不重要。如果进程达到结束状态,则进程结束。拒绝了。故事结束:
http://docs.jboss.com/jbpm/v4/userguide/html_single/ #end

现在,创建三个人工任务以供验收。一名应分配到工程师候选组,另外两名应分配到律师候选组。一旦一个人接受了一项任务(即分配给自己),其他人就不能接受该任务。
http://docs.jboss.com/jbpm/v4/userguide/html_single/ #task

所有人工任务应在最后合并,并让一个节点等待所有并发路径才能继续。即:以正确的重数连接:
http://docs.jboss.com/jbpm/v4/userguide/html_single/ #decision

我不确定您使用的是哪个 JBPM 版本,但是如果您使用 JBPM 5,这当然在 BPMN 2.0 中也是可能的。

Well, I'm not sure if I get your use case properly but let me try.

The rejected end states are easy - you can have many of them or one, it doesn't matter. If the process hits an end state, the process ends. Rejected. End of story:
http://docs.jboss.com/jbpm/v4/userguide/html_single/#end

Now, make three human tasks for acceptance. One should be assigned to engineer candidate group and two others to lawyers candidate group. Once a person takes a task (i.e. assigns to himself) it can't be taken by anybody else.
http://docs.jboss.com/jbpm/v4/userguide/html_single/#task

All the human tasks should be then merged at the end with a node waiting for all concurrent paths in order to continue. I.e.: join with correct multiplicity:
http://docs.jboss.com/jbpm/v4/userguide/html_single/#decision

I'm not sure which JBPM version are you using but this of course is also possible in BPMN 2.0, in case you use JBPM 5.

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