如何指定应从BPMN call调用哪个开始事件 [英] How to specify which start event should be called from a BPMN callActivity

查看:132
本文介绍了如何指定应从BPMN call调用哪个开始事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自 http://www.omg.org/spec/BPMN/2.0 .2 / PDF 第238页:


如果该流程用作全局流程(可调用的流程,则$ b可以从其他流程的调用活动中调用$ b),并且有多个
无启动事件,那么当流程从
父流程转移到全局流程时,只有全局流程的$ b之一$ b启动事件将被触发。可以扩展传入呼叫活动对象的序列
流的targetRef属性,以将
标识为适当的开始事件。

If the Process is used as a global Process (a callable Process that can be invoked from Call Activities of other Processes) and there are multiple None Start Events, then when flow is transferred from the parent Process to the global Process, only one of the global Process’s Start Events will be triggered. The targetRef attribute of a Sequence Flow incoming to the Call Activity object can be extended to identify the appropriate Start Event.

如何扩展targetRef属性?
不一定是有效的IDREF吗?
也许这意味着应该使用自定义属性扩展sequenceFlow元素?

How does one go about extending the targetRef attribute? Doesn't it have to be a valid IDREF? Maybe they mean the sequenceFlow element should be extended with a custom attribute?

有没有这样的扩展示例?
现有的BPMN工具支持吗?

Are there any examples of such an extension? Do existing BPMN tools support it?

这里是我手工编辑的BPMN代码段,以说明问题:

Here is a BPMN snippet that I hand-edited to illustrate the question:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">
  <process id="p1" name="Process 1" isExecutable="false" processType="Private">
    <sequenceFlow id="startAflow" sourceRef="start" targetRef="A"/>
    <sequenceFlow id="callActivityFlow" sourceRef="A" targetRef=" !? WHAT_GOES_HERE ?! "/>
    <startEvent id="start" name="Start">
      <outgoing>startAflow</outgoing>
    </startEvent>
    <task id="A">
      <incoming>startAflow</incoming>
      <outgoing>callActivityFlow</outgoing>
    </task>
    <callActivity id="call" calledElement="p2">
      <incoming>callActivityFlow</incoming>
    </task>
  </process>
  <process id="p2" name="Process 2" isExecutable="false" processType="Private">
    <sequenceFlow id="start2Aflow" sourceRef="start1" targetRef="2A"/>
    <sequenceFlow id="start2Bflow" sourceRef="start2" targetRef="2B"/>
    <startEvent id="start1" name="Start">
      <outgoing>start2Aflow</outgoing>
    </startEvent>
    <task id="2A">
      <incoming>start2Aflow</incoming>
    </task>
    <startEvent id="start2" name="Start in middle of process">
      <outgoing>start2Bflow</outgoing>
    </startEvent>
    <task id="2B">
      <incoming>start2Bflow</incoming>
    </task>
  </process>
</definitions>


推荐答案

我们实际上在camunda中讨论了这个问题-但决定不支持(现状)。到目前为止,我们还没有看到对这种结构的真正需求。

We actually discussed this issue within camunda - but decided to not support it (status quo). We haven't seen the real need for this construct in rea-life so far. It is quite esotheric and I wouldn't consider it best practice.

对于用例将现有proicess实例从另一种工具迁移到camunda,我们使用了另一种构造方法特定状态的子流程,利用消息启动事件和呼叫活动扩展-似乎更容易理解,请参见 https://network.camunda.org/whitepaper/5

For the use case "migrate existing proicess instancess from another tool to camunda" we used another construct to start sub processes in a specific state leveraging message start events and an extension on the call activity - that seems much more understandable, see https://network.camunda.org/whitepaper/5

欢呼
伯恩德

这篇关于如何指定应从BPMN call调用哪个开始事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆