if ((stepId != null) && stepId.equals("-1")) {
if (stepId != null && stepId.equals("-1")) {
    protected boolean passesCondition(ConditionDescriptor conditionDesc, Map transientVars, PropertySet ps, int currentStepId) throws WorkflowException {        String type = conditionDesc.getType();        Map args = new HashMap(conditionDesc.getArgs());        for (Iterator iterator = args.entrySet().iterator();                iterator.hasNext();) {            Map.Entry mapEntry = (Map.Entry) iterator.next();            mapEntry.setValue(ScriptVariableParser.translateVariables((String) mapEntry.getValue(), transientVars, ps));        }        if (currentStepId != -1) {            Object stepId = args.get("stepId");            if ((stepId != null) && stepId.equals("-1")) {                args.put("stepId", String.valueOf(currentStepId));            }        }        String clazz;        if ("remote-ejb".equals(type)) {            clazz = RemoteEJBCondition.class.getName();        } else if ("local-ejb".equals(type)) {            clazz = LocalEJBCondition.class.getName();        } else if ("jndi".equals(type)) {            clazz = JNDICondition.class.getName();        } else if ("bsf".equals(type)) {            clazz = BSFCondition.class.getName();        } else if ("beanshell".equals(type)) {            clazz = BeanShellCondition.class.getName();        } else {            clazz = (String) args.get(CLASS_NAME);        }        Condition condition = (Condition) loadObject(clazz);        if (condition == null) {            String message = "Could not load Condition: " + clazz;            throw new WorkflowException(message);        }        try {            boolean passed = condition.passesCondition(transientVars, args, ps);            if (conditionDesc.isNegate()) {                passed = !passed;            }            return passed;        } catch (Exception e) {            context.setRollbackOnly();            if (e instanceof WorkflowException) {                throw (WorkflowException) e;            }            throw new WorkflowException("Unknown exception encountered when trying condition: " + clazz, e);        }    }