} catch (TargetError targetError) { if (targetError.getTarget() instanceof WorkflowException) { throw (WorkflowException) targetError.getTarget(); } else { String message = "Could not execute BeanShell script"; throw new WorkflowException(message, targetError.getTarget()); }
    public boolean passesCondition(Map transientVars, Map args, PropertySet ps) throws WorkflowException {        String script = (String) args.get(AbstractWorkflow.BSH_SCRIPT);        WorkflowContext context = (WorkflowContext) transientVars.get("context");        WorkflowEntry entry = (WorkflowEntry) transientVars.get("entry");        Interpreter i = new Interpreter();        ClassLoader loader = Thread.currentThread().getContextClassLoader();        try {            if (loader != null) {                i.setClassLoader(loader);            }            i.set("entry", entry);            i.set("context", context);            i.set("transientVars", transientVars);            i.set("propertySet", ps);            i.set("jn", transientVars.get("jn"));            Object o = i.eval(script);            if (o == null) {                return false;            } else {                return TextUtils.parseBoolean(o.toString());            }        } catch (EvalError e) {            String message = "Could not execute BeanShell script";            log.error(message, e);            throw new WorkflowException(message, e);        } finally {            if (loader != null) {                i.setClassLoader(null);            }        }    }