I'm working on a BPMN diagram contained within a .war file that's being deployed to Camunda. The diagram is showing up fine and I can complete the first two user tasks, but when I get to the exclusive gateway I'm getting the error message: Unknown property used in expression: ${Approve == 1}. Cause: Cannot resolve identifier 'Approve'
I haven't identified a variable Approve, but I'm not sure where to do this? I've been working with the .xml file for the BPMN diagram, in which the code relating to the exclusive gateway is as follows:
<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" />
This was based on the code provided by Camunda here: https://docs.camunda.org/manual/7.4/reference/bpmn20/gateways/exclusive-gateway/
There's also some .java files for each step which have been created within Eclipse, and refer to the same BPMN diagram. I'm not sure if the variables should be defined in the .xml file or the .java files, and how to go about doing this? Thanks.