Package com.werken.blissed

Examples of com.werken.blissed.State


        if ( stateTag == null )
        {
            throw new JellyException( "Not within a state element" );
        }
       
        State state = stateTag.getState();

        return state;
    }
View Full Code Here


                              this.from );

        checkStringAttribute( "to",
                              this.to );

        State fromState = process.getState( this.from );

        if ( fromState == null )
        {
            throw new JellyException( "No such state \"" + this.from  + "\"" );
        }

        State toState = process.getState( this.to );

        if ( toState == null )
        {
            throw new JellyException( "No such state \"" + this.to  + "\"" );
        }
View Full Code Here

        this.process = new Process( getName(),
                                    "" );

        invokeBody( output );

        State startState = this.process.getState( getStart() );

        if ( startState == null )
        {
            throw new JellyException( "Start state \"" + getStart() + "\" not found." );
        }
View Full Code Here

    public void testPerform() throws Exception
    {
        Process anotherProcess = new Process( "another.process",
                                              "another process" );

        State anotherState1 = anotherProcess.addState( "another.state.1",
                                                      "another state 1" );

        State anotherState2 = anotherProcess.addState( "another.state.2",
                                                       "another state 2" );

        anotherState1.addTransition( anotherState2,
                                     new BooleanGuard( false ),
                                     "trans" );
View Full Code Here

     *
     *  @throws Exception if an error occurs.
     */
    public void doTag(XMLOutput output) throws Exception
    {
        State state = null;

        try
        {    
            state = getCurrentState();
        }
        catch (JellyException e)
        {
            // ignore
        }

        if ( state != null )
        {
            if ( state.getActivity() != null
                 &&
                 ! ( state.getActivity() instanceof NoOpActivity ) )
            {
                throw new JellyException( "Activity already defined for state \""
                                          + state.getName()
                                          + "\"" );
            }
        }

        // - - - - - - - - - - - - - - -

        Script script = getBody();
       
        Activity activity = new JellyActivity( script );

        if ( getVar() != null )
        {
            getContext().setVariable( getVar(),
                                      activity );
        }

        // - - - - - - - - - - - - - - -

        if ( state != null )
        {
            state.setActivity( activity );
        }
    }
View Full Code Here

    public void testPerform() throws Exception
    {
        Process anotherProcess = new Process( "another.process",
                                              "another process" );

        State anotherState1 = anotherProcess.addState( "another.state.1",
                                                      "another state 1" );

        State anotherState2 = anotherProcess.addState( "another.state.2",
                                                       "another state 2" );

        anotherState1.addTransition( anotherState2,
                                     new BooleanGuard( false ),
                                     "trans" );
View Full Code Here

TOP

Related Classes of com.werken.blissed.State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.