I am trying to implement a form-switching case in my project. But I have many forms and writing individual stories for each form switching is hectic. So, I was looking for a way to write a custom action that considers some slot value say next_form_name and then dynamically start the form we got on next_form_name. I think it is possible by something like
next_form_name = tracker.get_slot("next_form_name") if next_form_name is not None: return [FollowupAction(next_form_name)]
But issue is how can i set active_loop part based on this same form value as we need to set active loop based on the form being activated? Is it possible to set active_loop via custom action?
Or is there any other recommended way to do form-switching without having to write stories for individual case?
Firstly, you must add the name of this action, action_validate_slot_mappings , to the domain actions list. Note that you do not need to implement the name method in the custom action extending ValidationAction , since this is already implemented.