-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
jBPM 3.1.1
-
None
-
Documentation (Ref Guide, User Guide, etc.)
-
Low
-
Workaround Exists
-
Inside a decision node, if a transition has not a name attribute, the condition is not evaluated as expected.
For exemple, the following lines work :
<decision name="decision-x">
<transition name="t1" to="node-a" />
<transition name="t2" to="node-b">
<condition expression="#
</transition>
</decision>
If the condition in the second transition matches, this transition is selected as expected.
But if the name of the transition is removed, the condition result is not correct :
<decision name="decision-x">
<transition name="t1" to="node-a" />
<transition to="node-b">
<condition expression="#{...}
" />
</transition>
</decision>
In this case, the first transition seems to be always selected as default choice...
The name attribute of a transition seems optional, and no error is produced if it is not present : the conditional transition seems to be simply ignored...
Perhaps the following code excerpt from the class org.jbpm.graph.node.Decision is implied :
Iterator iter = decisionElement.elementIterator("transition");
while (iter.hasNext()) {
Element transitionElement = (Element) iter.next();
Element conditionElement = transitionElement.element("condition");
if (conditionElement!=null) {
String conditionExpression = getConditionExpression(conditionElement);
if (conditionExpression!=null) {
String transitionName = transitionElement.attributeValue("name");
if (decisionConditions==null)
decisionConditions.add(new DecisionCondition(transitionName, conditionExpression));
}
}
}
}
What occurs if the transition has no name attribute value ?
- blocks
-
JBPM-1174 Bug triage placeholder
- Closed