Best Way to migrate into Rasa 2.x having heavily modified FormAction implementations

Hi all,

We have been extensively using Rasa 1.x Forms, and I have heavily modified versions of the FormAction implementations that spans 1000s of lines. To deal with specific business requirements we had to subclass and modify the _activate_if_required method and validate methods extensively. This includes custom regex based validations. What is the best way to migrate all these codes into the new Rasa 2.x format? Seems the Forms in new Rasa are an entirely new beast :frowning: . Migrating working production code to the new format seems a daunting task, and I’m afraid that we will be stuck with Rasa 1.x forever. Is there a workaround to migrate to Rasa 2.x but keep the old FormAction implementations?

Thanks, Thusitha

@thusithaC, I do not think is possible to upgrate to Rasa 2.x version and keep using older version of Forms. Because now it had some changes, for example: on config.yml now you declare RulePolicy, not FormPolicy anymore.

Instead of submit function, now you simple call an action function after all slots are filled and the method to validate slots, which is now FormActionValidation.

Also, you can declare all your required slots and slot mappings directly on your domain.yml file. But, it does not look like a beast. Just take some time practicing to understand this little changes.

Check this post about migrating to Rasa 2.x. Hope it helps :smiley:

Thanks for the Reply @marcos.allysson .

I guess i could refactor all the custom validation scripts into “FormActionValidation” and the submit method can be implemented as a new Action. That leaves the _activate_if_required() method. Would anyone know how we can customize this method (or the equivalent) in Rasa 2.x ?

Thanks, Thusitha