Reminder schedule when form is active does not trigger the reminder event instead fills in the forms next slot. Also not able to schedule from FormValidationAction
We are using the latest version of rasa.
class Mobile_Number_Action(FormAction):
def name(self):
return "mobile_number_action"
def submit(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict]:
try:
dispatcher.utter_message(text="thank you")
return []
except:
return reset_slots(tracker)
def request_next_slot(
self,
dispatcher: "CollectingDispatcher",
tracker: "Tracker",
domain: Dict[Text, Any],
) -> Optional[List[EventType]]:
for slot in self.required_slots(tracker):
print("slot ",slot)
if self._should_request_slot(tracker, slot):
dispatcher.utter_message(template=f"utter_ask_{slot}", **tracker.slots)
input_count = tracker.slots.get('input_count')
dt = datetime.datetime.now() + datetime.timedelta(seconds=ALERT_USER_TIMEOUT)
return [
SlotSet("requested_slot", slot),
ReminderScheduled(
"external",
trigger_date_time=dt,
kill_on_user_message=True)
]
return None
def validate_customer_first_name(
self,
value: Text,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> Dict[Text, Any]:
"""Validate mobile_number value."""
print("The external reminder fills in the slot instead of trigerring the rule")
if value == "EXTERNAL: external":
return {"customer_first_name":None}
return {"customer_first_name":value}