StateTag stateTag = (StateTag) parent;
ProcessContext context = getProcessContext(); ProcessEngine  engine  = getProcessEngine();
    public void doTag(XMLOutput output) throws Exception    {        Tag parent = getParent();        if ( ( parent == null )             ||             ! ( parent instanceof StateTag ) )        {            throw new JellyException( "Parent is not a state" );        }        StateTag stateTag = (StateTag) parent;        State state = stateTag.getState();        if ( state.getActivity() != null             &&             ! ( state.getActivity() instanceof NoOpActivity ) )        {            throw new JellyException( "Activity already defined for state \""                                      + state.getName()                                      + "\"" );        }        if ( this.name == null )        {            throw new MissingAttributeException( "name" );        }        final String processName = this.name;        Activity activity = new SpawnActivity( getProcess() );        state.setActivity( activity );    }