49c49,50 < private static final long serialVersionUID = 1L; --- > > private static final long serialVersionUID = 1L; 98,104c99 < // evaluate expression < String transitionName = (String) JbpmExpressionEvaluator < .evaluate(decisionExpression, executionContext, String.class); < transition = getLeavingTransition(transitionName); < if (transition == null) { < throw new JbpmException("no such transition: " + transitionName); < } --- > transition = useExpressionEvaluator(executionContext); 159a155,189 > /** > // Method added to assist in a refactoring. > // Implementation had been failing when a Boolean was returned from > * JbpmExpressionEvaluator.evaluate(). (Boolean couldn't be cast to String) > * > */ > Transition useExpressionEvaluator(ExecutionContext executionContext) { > Transition transition; > String transitionName = null; > // evaluate expression > try{ > transitionName = (String) JbpmExpressionEvaluator > .evaluate(decisionExpression, executionContext, String.class); > }catch (ClassCastException cce){ > log.warn("Unexpected type found when using ExpressionEvaluator attempting a cast"); > try{ > Boolean theBoolean = (Boolean)JbpmExpressionEvaluator > .evaluate(decisionExpression, executionContext, String.class); > transitionName = theBoolean.toString(); > }catch(Exception e){ > throw new JbpmException("Unhandleable condition in ExpressionEvaluator."); > } > } > transition = getLeavingTransition(transitionName); > if (transition == null) { > throw new JbpmException("no such transition: " + transitionName); > } > return transition; > } > > public void setDecisionExpression(String decisionExpression) { > this.decisionExpression = decisionExpression; > } > > 193a224 >