Disable other forms when specific form is activated


So I have quite a complicated bot, where multiple forms are defined. I am curious if it’s possible to disable form activation, until we finish other form we are currently in.

Use-case and example for better understanding:

I have forms A, B, C. I want to be able to activate B while in C, and C while in B. It can easily be done with rules. But when I activate form A, I don’t want to allow any action/intent to deactivate it. When it’s triggered, it must fill all it’s slots and don’t get distracted. Even when user will provide intent that theoretically should activate another form.

Can it be done anyhow?

Thanks in advance.

Hey @BarMin, I just checked and I’m able to achieve the behaviour by creating another rule that basically says “if A is active, the B-triggering intent should be treated as a distraction and A should continue”:

- rule: continue form A
  - active_loop: A
  - intent: intent_that_triggers_B
  - action: utter_distraction
  - action: A

This looks like a cool idea :slight_smile: Will check it out today! Thanks!