Reset slot after the forms complete

Hello @Dinesh-gowdam-2610

The same case with me.

But i have been fixed it by creating an extra python class for resetting the all slots immediate after successful submission of the form. And it works fine :slight_smile:

class ActionResetAllSlots(Action):

def name(self):
    return "action_reset_all_slots"

def run(self, dispatcher, tracker, domain):
    return [AllSlotsReset()]

And i have been added it at the end of my form rule as below…

rules:
  - rule: activate document search form
    steps:
      - intent: lookingfordocuments   # intent that triggers form activation
      - action: document_form      # run the form
      - active_loop: document_form # this form is active

  - rule: submit form
    condition:
    - active_loop: document_form   # this form must be active
    steps:
      - action: document_form      # run the form
      - active_loop: null          # the form is no longer active because it has been filled
      - slot_was_set:
        - requested_slot: null     # All the required slots have been filled
      - action: action_submit
      - action: action_reset_all_slots

Also, registered the action in my domain.yml. Thanks

Best Regards, Ravi

3 Likes