rasa_sdk/forms.py
async def run(
        self,
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
    ) -> List[EventType]:
        """Execute the side effects of this form.

        Steps:
        - activate if needed
        - validate user input if needed
        - set validated slots
        - utter_ask_{slot} template with the next required slot
        - submit the form if all required slots are set
        - deactivate the form
        """

        # activate the form
        events = await self._activate_if_required(dispatcher, tracker, domain)
        # validate user input
        events.extend(await self._validate_if_required(dispatcher, tracker, domain))
        # check that the form wasn't deactivated in validation
        if ActiveLoop(None) not in events:

            # create temp tracker with populated slots from `validate` method
            temp_tracker = tracker.copy()
            for e in events:
                if e["event"] == "slot":
                    temp_tracker.slots[e["name"]] = e["value"]

            next_slot_events = self.request_next_slot(dispatcher, temp_tracker, domain)

            if next_slot_events is not None:
                # request next slot
                events.extend(next_slot_events)
            else:
                # there is nothing more to request, so we can submit
                self._log_form_slots(temp_tracker)
                logger.debug(f"Submitting the form '{self.name()}'")
                if utils.is_coroutine_action(self.submit):
                    events.extend(await self.submit(dispatcher, temp_tracker, domain))
                else:
                    # see https://github.com/python/mypy/issues/5206
                    events.extend(
                        cast(
                            List[EventType],
                            self.submit(dispatcher, temp_tracker, domain),
                        )
                    )
                # deactivate the form after submission
                if utils.is_coroutine_action(self.deactivate):
                    events.extend(await self.deactivate())  # type: ignore
                else:
                    events.extend(self.deactivate())

        return events
Execute the side effects of this form.

        Steps:
        - activate if needed
        - validate user input if needed
        - set validated slots
        - utter_ask_{slot} template with the next required slot
        - submit the form if all required slots are set
        - deactivate the form
        
Execute the side effects of this form.
Steps:
activate if needed
validate user input if needed
set validated slots
utter_ask_{slot} template with the next required slot
submit the form if all required slots are set
deactivate the form
Execute the side effects of this form . Steps : activate if needed validate user input if needed set validated slots utter_ask_ { slot } template with the next required slot submit the form if all required slots are set deactivate the form
async def run(
        self,
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
    ) -> List[EventType]:
        events = await self._activate_if_required(dispatcher, tracker, domain)
        events.extend(await self._validate_if_required(dispatcher, tracker, domain))
        if ActiveLoop(None) not in events:
            temp_tracker = tracker.copy()
            for e in events:
                if e["event"] == "slot":
                    temp_tracker.slots[e["name"]] = e["value"]
            next_slot_events = self.request_next_slot(dispatcher, temp_tracker, domain)
            if next_slot_events is not None:
                events.extend(next_slot_events)
            else:
                self._log_form_slots(temp_tracker)
                logger.debug(f"Submitting the form '{self.name()}'")
                if utils.is_coroutine_action(self.submit):
                    events.extend(await self.submit(dispatcher, temp_tracker, domain))
                else:
                    events.extend(
                        cast(
                            List[EventType],
                            self.submit(dispatcher, temp_tracker, domain),
                        )
                    )
                if utils.is_coroutine_action(self.deactivate):
                    events.extend(await self.deactivate())  
                else:
                    events.extend(self.deactivate())
        return events
async def run ( self , dispatcher : "CollectingDispatcher" , tracker : "Tracker" , domain : "DomainDict" , ) -> List [ EventType ] : events = await self . _activate_if_required ( dispatcher , tracker , domain ) events . extend ( await self . _validate_if_required ( dispatcher , tracker , domain ) ) if ActiveLoop ( None ) not in events : temp_tracker = tracker . copy ( ) for e in events : if e [ "event" ] == "slot" : temp_tracker . slots [ e [ "name" ] ] = e [ "value" ] next_slot_events = self . request_next_slot ( dispatcher , temp_tracker , domain ) if next_slot_events is not None : events . extend ( next_slot_events ) else : self . _log_form_slots ( temp_tracker ) logger . debug ( f"Submitting the form '{self.name()}'" ) if utils . is_coroutine_action ( self . submit ) : events . extend ( await self . submit ( dispatcher , temp_tracker , domain ) ) else : events . extend ( cast ( List [ EventType ] , self . submit ( dispatcher , temp_tracker , domain ) , ) ) if utils . is_coroutine_action ( self . deactivate ) : events . extend ( await self . deactivate ( ) ) else : events . extend ( self . deactivate ( ) ) return events
Execute the side effects of this form.
Execute the side effects of this form .
"""Execute the side effects of this form.

        Steps:
        - activate if needed
        - validate user input if needed
        - set validated slots
        - utter_ask_{slot} template with the next required slot
        - submit the form if all required slots are set
        - deactivate the form
        """ # activate the form # validate user input # check that the form wasn't deactivated in validation # create temp tracker with populated slots from `validate` method # request next slot # there is nothing more to request, so we can submit # see https://github.com/python/mypy/issues/5206 # deactivate the form after submission # type: ignore
self
dispatcher
"CollectingDispatcher"
tracker
"Tracker"
domain
"DomainDict"