jbpm - 如何指定应从 BPMN callActivity 调用哪个启动事件

标签 jbpm activiti bpmn camunda ibm-bpm

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

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 元素?

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

这是我手工编辑的 BPMN 片段来说明问题:

<?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 内讨论了这个问题 - 但决定不支持它(现状)。到目前为止,我们还没有看到现实生活中对这种结构的真正需求。这是相当深奥的,我不认为它是最佳实践。

对于用例“将现有进程实例从另一个工具迁移到 camunda”,我们使用了另一个构造来利用消息启动事件和调用事件的扩展在特定状态下启动子进程 - 这似乎更容易理解,请参阅 https://network.camunda.org/whitepaper/5

干杯 贝恩德

关于jbpm - 如何指定应从 BPMN callActivity 调用哪个启动事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30725477/

相关文章:

spring - Activiti JSF Spring

java - 如何在 Camunda-bpm 中结束流程实例?

Jboss BPEL 和 BPMN

java - Tomcat 服务器 - JBPM - 启动需要 3 小时

java - 如何从 Python 启动 jBPM 流程?

java - 从 Eclipse : Service service jboss. 部署 jbpm-console.war 未找到 ejb.default-resource-adapter-name-service

java - PostgresSqlException 与 activiti 源代码

java - 如何释放已领取的任务?

javascript - JointJS 中流的标签

java - JBPM6服务任务执行java代码