@classmethod
def execute(cls, session_id, data, state_name):
    """
        Execute the wizard state.

        session_id is a Session id
        data is a dictionary with the session data to update
        state_name is the name of state to execute

        Returns a dictionary with:
            - ``actions``: a list of Action to execute
            - ``view``: a dictionary with:
                - ``fields_view``: a fields/view definition
                - ``defaults``: a dictionary with default values
                - ``buttons``: a list of buttons
        """
    cls.check_access()
    wizard = cls(session_id)
    for key, values in data.items():
        record = getattr(wizard, key)
        for field, value in values.items():
            if field == 'id':
                continue
            setattr(record, field, value)
    return wizard._execute(state_name)
