【发布时间】:2016-08-11 16:08:01
【问题描述】:
我正在处理一个 .war 文件中包含的 BPMN 图,该文件正在部署到 Camunda。该图显示良好,我可以完成前两个用户任务,但是当我到达专用网关时,我收到错误消息:表达式中使用的未知属性:${Approve == 1}。原因:无法解析标识符“批准”
我尚未确定变量 Approve,但我不确定在哪里执行此操作?我一直在处理BPMN图的.xml文件,其中与专有网关相关的代码如下:
<bpmn:sequenceFlow id="SequenceFlow_07b7fwg" name="Approve" sourceRef="ExclusiveGateway_0znxqqy" targetRef="ServiceTask_06fn5cm">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${Approve == 1}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0qnqvj1" sourceRef="ServiceTask_06fn5cm" targetRef="EndEvent_146k48m" />
<bpmn:endEvent id="EndEvent_0ug591n" name="End">
<bpmn:incoming>SequenceFlow_1y6i7xo</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_068nx8b" name="Reject" sourceRef="ExclusiveGateway_0znxqqy" targetRef="ServiceTask_17qnuyi">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${Reject == 2}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1irpvhx" sourceRef="ServiceTask_17qnuyi" targetRef="ServiceTask_1jks4hs" />
<bpmn:sequenceFlow id="SequenceFlow_1mjdjw2" sourceRef="ServiceTask_1jks4hs" targetRef="EndEvent_1qmduq" />
<bpmn:endEvent id="EndEvent_1qmduq" name="Hello!" />
<bpmn:sequenceFlow id="SequenceFlow_1deve3u" name="Extra Step" sourceRef="ExclusiveGateway_0znxqqy" targetRef="ServiceTask_09nq79v" />
<bpmn:sequenceFlow id="SequenceFlow_1y6i7xo" sourceRef="ServiceTask_09nq79v" targetRef="EndEvent_0ug591n" />
这是基于 Camunda 在此处提供的代码:https://docs.camunda.org/manual/7.4/reference/bpmn20/gateways/exclusive-gateway/
在 Eclipse 中为每个步骤创建了一些 .java 文件,并参考相同的 BPMN 图。我不确定是否应该在 .xml 文件或 .java 文件中定义变量,以及如何执行此操作?谢谢。
【问题讨论】:
标签: java eclipse wildfly bpmn camunda