busean
October 26, 2016, 11:59am
1
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>
<bpmn:sequenceFlow id="SequenceFlow_1" name="No" sourceRef="ExclusiveGateway_1gplnrv" targetRef="stock_management">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!approved}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
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
@busean
something like:
${approved == true}
and
${approved == false}
You can see a example usage in the docs: https://docs.camunda.org/manual/7.4/reference/bpmn20/gateways/exclusive-gateway/
1 Like
busean
October 26, 2016, 2:25pm
3
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
Niall
October 27, 2016, 8:50am
5
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