Hello everybody,
I am currently trying to debug an issue where a form rule is not producing the desired output.
rules.yml
# Stay form
- rule: Activate stay_form
steps:
- intent: ask_availability
- action: stay_form
- active_loop: stay_form
- rule: Submit stay_form
condition:
- active_loop: stay_form
steps:
- action: stay_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: action_calculate_num_nights
- action: room_type_form
### Room type form
- rule: Activate room_type_form
steps:
- intent: inform_room_type
- action: room_type_form
- active_loop: room_type_form
- rule: Submit room_type_form
condition:
- active_loop: room_type_form
steps:
- action: room_type_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: utter_num_room_types
domain.yml
room_type_form:
required_slots:
- num_single_rooms
stay_form:
required_slots:
- checkin_date
- checkout_date
Log from rasa interactive --debug
slot{"checkout_date": "2022-07-31"}
slot{"requested_slot": null}
active_loop{"name": null}
action_calculate_num_nights 1.00
slot{"num_nights": 2}
room_type_form 1.00
active_loop{"name": "room_type_form"}
slot{"requested_slot": "num_single_rooms"}
How many single rooms do you need?
slot{"num_single_rooms": 1}
slot{"requested_slot": null}
active_loop{"name": null}
Current slots:
first_name: None, last_name: None, email: None, mobile_number: None, name: None, checkin_date_dummy: 2022-07-29T00:00:00.000+02:00, checkin_date: 2022-07-29, checkout_date: 2022-07-31, num_nights:
2, num_single_rooms: 1, num_double_rooms: None, room_proposal: None, contact_channel: None, requested_slot: None, session_started_metadata: None
------
2022-07-26 19:24:56 DEBUG rasa.core.tracker_store - Recreating tracker for id '8aeb02c9b6034bb88e1bbc3ee30b266b'
? The bot wants to run 'action_listen', correct? (Y/n)
The stay_form and the associated rules work perfectly and the actions “action_calculate_num_nights” and “room_type_form” are triggered as desired. Unfortunately the rules in “submit room_type_form” are not obeyed. After filling the slot I get an “action_listen” and not the required action “utter_num_room_types”.
Any idea how to solve this? Both forms and rules look similar to me and I do not have the ideas why the rules on the “room_type_form” are not behaving as expected.
Thanks for your help!