Hi,i have a simple demo process
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://activiti.org/bpmn20" id="definitions">
<process id="financialReport" name="Monthly financial report reminder process" isExecutable="true">
<startEvent id="theStart">
<extensionElements>
<activiti:formProperty id="requestApproved" name="requestApproved" type="boolean" expression="TRUE" variable="TRUE" writable="false">
<activiti:value id="requestApproved" name="TRUE"></activiti:value>
</activiti:formProperty>
</extensionElements>
</startEvent>
<userTask id="verifyReportTask" name="Process B" activiti:candidateGroups="management">
<documentation>Verify monthly financial report composed by the accountancy department.
This financial report is going to be sent to all the company shareholders.</documentation>
</userTask>
<endEvent id="theEnd"></endEvent>
<userTask id="usertask1" name="Process A"></userTask>
<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow5" sourceRef="exclusivegateway1" targetRef="usertask1">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${requestApproved == "true"}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow6" sourceRef="exclusivegateway1" targetRef="verifyReportTask">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${requestApproved == "false"}]]></conditionExpression>
</sequenceFlow>
<exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow7" sourceRef="usertask1" targetRef="exclusivegateway2"></sequenceFlow>
<sequenceFlow id="flow8" sourceRef="verifyReportTask" targetRef="exclusivegateway2"></sequenceFlow>
<sequenceFlow id="flow9" sourceRef="exclusivegateway2" targetRef="theEnd"></sequenceFlow>
<sequenceFlow id="flow10" sourceRef="theStart" targetRef="exclusivegateway1"></sequenceFlow>
</process>
</definitions>
I am currently trying to route the process flow according on a local variable that i declared within the example.java code where the workflow is being executed (claim and execute tasks and so on). I declared a
boolean requestApproved = true;
within my java class that i want to be checked for at the gateway and route the flow accordingly. But i get the following error message:Exception in thread "main" org.activiti.engine.ActivitiException: Unknown property used in expression: ${requestApproved == "true"}
What's wrong with my code? Any ideas?