我正在尝试建立一个基于事件的网关模型,该网关等待多条消息,并且可以选择等待计时器。在实际模型中使用它之前,我在单元测试中尝试过它,并且在 camunda 引擎中似乎完全忽略了该条件。现在我想知道 bpmn 是否应该支持它,如果不支持,是否有一种简单的替代方法来对此进行建模。
单元测试的代码,基于camunda-engine-unit-test project如下:
Map<String, Object> variables = singletonMap("isTimerActive", (Object) false);
ProcessInstance pi = runtimeService.startProcessInstanceByKey("testProcess", variables);
assertFalse("Process instance should not be ended", pi.isEnded());
String id = pi.getProcessInstanceId();
Job timer = managementService.createJobQuery().processInstanceId(id).timers().active().singleResult();
assertNull(timer);
最佳答案
这是不允许的。
The outgoing Sequence Flows of the Event Gateway MUST NOT have a conditionExpression
BPMN 2.0 规范第 10.5.6 节,第 297 页
关于timer - 具有条件流的 BPMN 基于事件的网关,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30350776/