[jboss-user] [JBoss jBPM] - Decision Handler to result in default transition
jgemski
do-not-reply at jboss.com
Fri Dec 12 13:29:46 EST 2008
We've run into a problem on upgrading from 3.1.4 to any version >= 3.2.3.
Our DecisionHandler.decide used to return a null, which indicated to the Decision code to use the default transition.
Upon upgrading, we're now getting:
org.jbpm.JbpmException: decision 'mid' selected non existing transition 'null'
at org.jbpm.graph.node.Decision.execute(Decision.java:91)
at org.jbpm.graph.def.Node.enter(Node.java:318)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
.
.
.
Looking at the code, it looks like this is no longer possible.
In Decision.java
String transitionName = decisionHandler.decide(executionContext);
| transition = getLeavingTransition(transitionName);
| if (transition == null) {
| throw new JbpmException("decision '" + name + "' selected non existing transition '" + transitionName + "'");
| }
|
which prevents later code from running:
if (transition == null) {
| transition = getDefaultLeavingTransition();
| log.debug("decision didn't select transition, taking default " + transition);
| }
Was this intentionally taken away? Is there a way to accomplish the same behavior, which is to default the "default" transition if the DecisionHandler doesn't evaluate?
Thanks,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196307#4196307
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196307
More information about the jboss-user
mailing list