Multiple Flow Conditions
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2014 09:58 AM
Hi,
I'm having some trouble with the flow condition of a sequence flow.
I'm using the follwing EL Expressions: ${library == 'BIB' or library == 'BOB'}
Unfortunately this expression does not work.
It works fine if I only ask for one thing like ${library == 'BIB'}
Has anyone had this problem before? Or can anyone tell me what i'm doing wrong?
thanks in advance,
Greetings,
Spille
I'm having some trouble with the flow condition of a sequence flow.
I'm using the follwing EL Expressions: ${library == 'BIB' or library == 'BOB'}
Unfortunately this expression does not work.
It works fine if I only ask for one thing like ${library == 'BIB'}
Has anyone had this problem before? Or can anyone tell me what i'm doing wrong?
thanks in advance,
Greetings,
Spille
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2014 10:24 AM
Have you tried || instead of or?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2014 10:27 AM
Yes, tried that… I tried a few possibilities like:
"${library == 'BIB'} or ${library == 'BOB'}"
${library == 'BIB'} or ${library == 'BOB'}
${library == 'BIB'} || ${library == 'BOB'}
${library == 'BIB' || library == 'BOB'}
"${library == 'BIB'} or ${library == 'BOB'}"
${library == 'BIB'} or ${library == 'BOB'}
${library == 'BIB'} || ${library == 'BOB'}
${library == 'BIB' || library == 'BOB'}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2014 02:45 AM
Hi,
I tested it with the exclusive gateway and following expression:
Test passed.
Regards
Martin
I tested it with the exclusive gateway and following expression:
<sequenceFlow id="flow3" sourceRef="exclusiveGw" targetRef="theTask2">
<conditionExpression xsi:type="tFormalExpression">${input == '2' or input == '5'}</conditionExpression>
</sequenceFlow>
Test passed.
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2014 03:36 AM
Thanks Martin! Now it works here as well
cheers,
Spille
cheers,
Spille
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2014 04:48 AM
Oké,
Sometimes it works, sometimes it doesn't work. But I found the problem.
I define a "default flow" and a "conditional flow".
I use the activiti modeller. It seems to be deploying a different bpmn.xml with the same model.
Sometimes the "default flow" is put after the "conditional flow" –> then it works
Sometimes the "default flow" is put in front of the "conditional flow" –> then it does not works (because it passes through the default flow without checking the conditional flow)
Any thoughts on this? I can now fix this by editing the XML-file, but it would be nice if i knew how to do this is the modeller.
cheers,
Spille
Sometimes it works, sometimes it doesn't work. But I found the problem.
I define a "default flow" and a "conditional flow".
I use the activiti modeller. It seems to be deploying a different bpmn.xml with the same model.
Sometimes the "default flow" is put after the "conditional flow" –> then it works
Sometimes the "default flow" is put in front of the "conditional flow" –> then it does not works (because it passes through the default flow without checking the conditional flow)
Any thoughts on this? I can now fix this by editing the XML-file, but it would be nice if i knew how to do this is the modeller.
cheers,
Spille
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2014 02:22 AM
Hi Spille.
I have changed jUnit test
Regards
Martin
I have changed jUnit test
org.activiti.engine.test.bpmn.gateway.ExclusiveGatewayTest#testDefaultSequenceFlow
little bit according your description.
<exclusiveGateway id="exclusiveGw" name="Exclusive Gateway" default="flow3" />
<sequenceFlow id="flow3" sourceRef="exclusiveGw" targetRef="theTask2"/>
<sequenceFlow id="flow2" sourceRef="exclusiveGw" targetRef="theTask1">
<conditionExpression xsi:type="tFormalExpression">${input == 1}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow4" sourceRef="exclusiveGw" targetRef="theTask3">
<conditionExpression xsi:type="tFormalExpression">${input == 3}</conditionExpression>
</sequenceFlow>
It has passed.Regards
Martin