if( log.isDebugEnabled() ) log.debug( "Followed transition " + transition.getOrigin().getName() + " -> " + transition.getDestination().getName() );
    protected void followTransition( ProcessContext context,                                     Transition transition )        throws ActivityException, InvalidMotionException    {        State destination = transition.getDestination();        State origin = transition.getOrigin();        Location location = context.getLocation();        if( location.getCurrentState() != origin )        {            throw new InvalidMotionException( "Not in state " + origin.getName() );        }        exitState( origin,                   context );        Process process = context.getCurrentProcess();        if( destination == process.getTerminalState() )        {            finishProcess( process,                           context );        }        else        {            enterState( destination,                        context );        }    }