# Contradicting rules despite different active\_loops

**URL:** <https://forum.rasa.com/t/contradicting-rules-despite-different-active-loops/53143>\
**Category:** Rasa Open Source\
**Created:** [May 12, 2022, 12:16pm UTC](https://forum.rasa.com/t/contradicting-rules-despite-different-active-loops/53143 "2022-05-12T12:16:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![h0rrid0](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@h0rrid0](https://forum.rasa.com/u/h0rrid0)\
**Post date:** [May 12, 2022, 12:16pm UTC](https://forum.rasa.com/t/contradicting-rules-despite-different-active-loops/53143/1 "2022-05-12T12:16:37Z")

</div>

Hi!

In Rasa 2.8.15 I’d like to build a bot that uses 3 consecutive forms to handle the users interest. For that I wrote two different rules:

```auto
rule: restart form_1 if user notices in form_2 that he made a mistake
  
condition:
    
active_loop: form_2
  
steps:
  - intent: made_mistake
  - action: action_deactivate_loop
  - active_loop: null
  - action: action_reset_form_1_slots
  - action: form_1
  - active_loop: form_1

rule: restart form_2 if user notices in form_3 that he made a mistake
 
condition:
    
active_loop: form_3
  
steps:
  - intent: made_mistake
  - action: action_deactivate_loop
  - active_loop: null
  - action: action_reset_form_2_slots
  - action: form_2
  - active_loop: form_2

```

When I try to train a model with these rules, a contradiction between those two is thrown. But since they have different conditions, I can’t see the contradiction. Also having the active\_loop as first step instead of a condition doesn’t prevent the throwing of contradiction.

I’m wondering if Rasa isn’t able to tell different active\_loops apart? But I didn’t found anything on that in the documentary, so maye you can help me…

---

<div class="post-metadata">

**Author:** ![peixeprata](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/peixeprata/32/20551_2.png) [@peixeprata](https://forum.rasa.com/u/peixeprata)\
**Post date:** [May 12, 2022, 5:16pm UTC](https://forum.rasa.com/t/contradicting-rules-despite-different-active-loops/53143/2 "2022-05-12T17:16:21Z")

</div>

Hello,

I think that rules are not a good way to do it.

What this rasa tutorial, it teaches how to build this with an action:

https://www.youtube.com/embed/CKn4ZBh9PpY?feature=oembed&wmode=opaque&list=PL75e0qA87dlGjdQj9F6dJtrZkG68Lx1-T

---

<div class="post-metadata">

**Author:** ![h0rrid0](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@h0rrid0](https://forum.rasa.com/u/h0rrid0)\
**Post date:** [May 13, 2022, 8:52am UTC](https://forum.rasa.com/t/contradicting-rules-despite-different-active-loops/53143/3 "2022-05-13T08:52:32Z")

</div>

Thank you for your reply! What you suggest is the implementation of a form validator. We actually use it, but for me it seems that the range of this is only to validate the input, not to react to technically-valid-but-refused-by-users-intent-input. The problem I face isn’t filtering incorrect inputs, it is handling inputs that were correct once but now become incorrect. For that a form validator - at least the simple one implemented in the tutorial you linked - wouldn’t do, I think.

Anyways, my rules seem to work properly now. I found a minor typing error in one of them, fixed it and suddenly the contradicting rules error was gone. I assume that the error message is just thrown whenever something is wrong with a rule and so a bit misleading. Or I missed anything else.
