public boolean execute()
    {
        if (type == Type.AND && canExecute())
        {
            log.debug(this + " executes.");

            // reset all conditions of the transition
            for (TransitionCondition condition : conditions)
            {
                condition.reset(this);
            }
            // execute all actions of the transition
            for (TransitionAction action : actions)
            {
                action.execute(this);
            }

            return true;
        }
        else if (type == Type.OR && canExecute())
        {
            log.debug(this + " executes.");

            // reset all conditions of the transition that evaluate to true
            for (TransitionCondition condition : conditions)
            {
                if (condition.evaluate(this))
                {
                    condition.reset(this);
                }
            }
            // execute all actions of the transition
            for (TransitionAction action : actions)
            {
                action.execute(this);
            }

            return true;
        }

        return false;
    }