if (availActions.contains(new Integer(action.getId()))) { return step; } }
    private Step getCurrentStep(WorkflowDescriptor wfDesc, int actionId, List currentSteps, Map transientVars, PropertySet ps) throws WorkflowException {        if (currentSteps.size() == 1) {            return (Step) currentSteps.get(0);        }        for (Iterator iterator = currentSteps.iterator(); iterator.hasNext();) {            Step step = (Step) iterator.next();            ActionDescriptor action = wfDesc.getStep(step.getStepId()).getAction(actionId);            if (action != null) {                List availActions = getAvailableActionsForStep(wfDesc, step, transientVars, ps);                if (availActions.contains(new Integer(action.getId()))) {                    return step;                }            }        }        return null;    }