简体   繁体   中英

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. The modeler (I tried 1.1.1, 1.2.0, 1.2.1 and 1.2.2) gives this BPMN snippet:

<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). When the process engine processes the bpmn, it raises an exception:

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. Also, a tFormalExpression in a timer does work. What is wrong here? I got the same error also on sequenceFlows coming out of a xor-gateway.

This was caused by the fact that the engine runs in Dropwizard. Apparently dropwizard brings another XML parser than Camunda normally uses. When parsing the XML, the namespace tag in the BPMN is not recognized (none of them are, actually). I have created a fix on the Parser class to make this work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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