if ((condition != null) && (isConditionEnforced))
{
Object result = JbpmExpressionEvaluator.evaluate(condition, executionContext);
if (result == null)
{
throw new JbpmException("transition condition " + condition + " evaluated to null");
}
else if (!(result instanceof Boolean))
{
throw new JbpmException("transition condition " + condition + " evaluated to non-boolean: " + result.getClass().getName());
}
else if (!((Boolean)result).booleanValue())
{
throw new JbpmException("transition condition " + condition + " evaluated to 'false'");
}
}
// start the transition log
TransitionLog transitionLog = new TransitionLog(this, executionContext.getTransitionSource());