This is the rule rasa document say how to subscribe a custom action when submit a form:
rules:
- rule: Submit form
condition:
# Condition that form is active.
- active_loop: restaurant_form
steps:
# Form is deactivated
- action: restaurant_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: utter_submit
- action: utter_slots_values
But I find it is hard to understand the steps. The condition is ok, form is active. I am confused from the first step. From my understand, I will write the rule as this:
But it’s just the syntax Rasa uses and we have to deal with it
On a more serious note, the first syntax is more effective in case something happens beforerequired_slots is set not null. Maybe you don’t want to submit if two certain intents follow each other, or something like that.
What I recommend doing is setting this one rule, and then if you want to introduce more complexity to the stories, do so via interactive learning.