if ((split == 0) && (join == 0) && !((ActionDescriptor) getParent()).isFinish()) {
if ((split == 0) && (join == 0) && !(getParent() instanceof ActionDescriptor && ((ActionDescriptor) getParent()).isFinish())) {
    public void validate() throws InvalidWorkflowDescriptorException {        ValidationHelper.validate(preFunctions);        ValidationHelper.validate(postFunctions);        ValidationHelper.validate(validators);        //if it's not a split or a join or a finish, then we require a next step        if ((split == 0) && (join == 0) && !((ActionDescriptor) getParent()).isFinish()) {            StringBuffer error = new StringBuffer("Result ");            if (getId() > 0) {                error.append("#").append(getId());            }            error.append(" is not a split or join, and has no ");            if (!hasStep) {                throw new InvalidWorkflowDescriptorException(error.append("next step").toString());            }            if ((status == null) || (status.length() == 0)) {                throw new InvalidWorkflowDescriptorException(error.append("status").toString());            }        }        //taken out for now        //if ((split != 0) && ((join != 0) || (oldStatus.length() > 0) || (step != 0) || (status.length() > 0) || (owner.length() != 0))) {        //    throw new InvalidWorkflowDescriptorException("Result " + id + " has a split attribute, so should not any other attributes");        //} else if ((join != 0) && ((split != 0) || (oldStatus.length() > 0) || (step != 0) || (status.length() > 0) || (owner.length() != 0))) {        //    throw new InvalidWorkflowDescriptorException("Result has a join attribute, should thus not any other attributes");        //} else if ((oldStatus.length() == 0) || (step == 0) || (status.length() == 0)) {        //    throw new InvalidWorkflowDescriptorException("old-status, step, status and owner attributes are required if no split or join");        //}    }