AnsweredAssumed Answered

condition expression returns non-Boolean: true (java.lang.St

Question asked by dashamo010 on Jun 4, 2012
Latest reply on Jun 13, 2012 by frederikheremans1
when i invoke code " formService.submitTaskFormData(taskId, formProperties);  "   the console complain the following error
严重: Error while closing command context
org.activiti.engine.ActivitiException: condition expression returns non-Boolean: true (java.lang.String)
at org.activiti.engine.impl.el.UelExpressionCondition.evaluate(
at org.activiti.engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior.leave(
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(

quesion description details :

i complete my assignee-userTask with method formService.submitTaskFormData(String taskId, Map<String, String> properties);
all the values in the properties are actually type of String,this is also restricted by api.

in my process the next node come after userTask node which create assignee-userTask i have handled just now is exclusiveGateway

two sequenceFlow with come from it,the conditionExpressions on the the two sequenceFlow  are   each as ${vacationApproved} and ${!vacationApproved}

the relevant flow section is like this :
<exclusiveGateway id="requestApprovedDecision" name="Request approved?" />
    <sequenceFlow id="flow3" sourceRef="requestApprovedDecision" targetRef="sendApprovalMail">
      <conditionExpression xsi:type="tFormalExpression">${vacationApproved}</conditionExpression>
    <task id="sendApprovalMail" name="Send confirmation e-mail" />
    <sequenceFlow id="flow4" sourceRef="sendApprovalMail" targetRef="theEnd1" />
    <endEvent id="theEnd1" />
    <sequenceFlow id="flow5" sourceRef="requestApprovedDecision" targetRef="adjustVacationRequestTask">
      <conditionExpression xsi:type="tFormalExpression">${!vacationApproved}</conditionExpression>
the flow variable ${vacationApproved} is one value of formProperties(Map)  which i have submitted to the corresponding userTask ,its type i passed is actually

String,but in the activiti engine its type is required Boolean, the activiti engine cannot transform variable vacationApproved from String
to Boolean automaticly,so the error appeared .

who can help me?