True/false logic in exclusive gateway - camunda bpmn

I am working on Generated Task Forms, I am trying to apply true/false logic in exclusive gateway. If true, end process. If false, redirect to data correction task.

<bpmn:sequenceFlow id="SequenceFlow_180tuqy" name="Yes" sourceRef="ExclusiveGateway_1gplnrv" targetRef="EndEvent_16krmz0">
  <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${approved}</bpmn:conditionExpression>
<bpmn:sequenceFlow id="SequenceFlow_1" name="No" sourceRef="ExclusiveGateway_1gplnrv" targetRef="stock_management">
  <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!approved}</bpmn:conditionExpression>

here ${approved} -> approved is the id of the boolean form fied, but it does not work.

what I need to mention in bpmn:conditionExpression?

1 Like


something like:

${approved == true}


${approved == false}

You can see a example usage in the docs:

1 Like

only thing I make sure about in your shared link. what is ${x == 1}? here X is form field id or name or something else?

${approved == false} not work, I shared screenshot for your easy reference

What exactly is going wrong?
Are you getting a specific error?
Are you able to complete the user task ok?

I’ve seen Camunda occasionally attempt a string evaluation rather then boolean.

Try the following within the expression:

for true:
testing for both true and “true”
${myBooleanVar == true || myBooleanVar== “true”}

1 Like