简体   繁体   English

部署到Camunda时,序列上的conditionExpression不起作用

[英]conditionExpression on sequence does not work when deploying to Camunda

I try to create a BPMN process where the flows out of a user task are conditional, based on the data in the task. 我尝试基于任务中的数据创建一个BPMN流程,其中用户任务的流出是有条件的。 The modeler (I tried 1.1.1, 1.2.0, 1.2.1 and 1.2.2) gives this BPMN snippet: 建模者(我尝试过1.1.1、1.2.0、1.2.1和1.2.2)给出了以下BPMN代码段:

<bpmn:sequenceFlow id="SequenceFlow_1x3p2i8" sourceRef="Task_088dhgw" targetRef="EndEvent_1hc01v6">
  <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${true}</bpmn:conditionExpression>
</bpmn:sequenceFlow>

I am building my own dropwizard service, using camunda version 7.5.0 (also tried 7.4.0 and 7.3.0). 我正在使用camunda版本7.5.0(也尝试过7.4.0和7.3.0)构建自己的dropwizard服务。 When the process engine processes the bpmn, it raises an exception: 流程引擎处理bpmn时,会引发异常:

Exception in thread "main" org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'Deployment of Process Application Camunda Servlet Process Application' => 'Deployment of process archive 'null': ENGINE-09005 Could not parse BPMN process. Errors: 
* Invalid type, only tFormalExpression is currently supported | bicycles.bpmn | line 22 | column 67

Huh? 咦? the type is tFormalExpression. 类型是tFormalExpression。 Also, a tFormalExpression in a timer does work. 另外,计时器中的tFormalExpression确实可以工作。 What is wrong here? 怎么了 I got the same error also on sequenceFlows coming out of a xor-gateway. 我也从Xor网关发出的sequenceFlows遇到了同样的错误。

This was caused by the fact that the engine runs in Dropwizard. 这是由于引擎在Dropwizard中运行这一事实造成的。 Apparently dropwizard brings another XML parser than Camunda normally uses. 显然dropwizard带来了Camunda通常使用的另一个XML解析器。 When parsing the XML, the namespace tag in the BPMN is not recognized (none of them are, actually). 解析XML时,无法识别BPMN中的名称空间标签(实际上没有一个)。 I have created a fix on the Parser class to make this work. 我已经在Parser类上创建了一个修复程序来使之工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM