# RULE WORKS WITH ONE ACTION BUT NOT WITH ANOTHER

**URL:** <https://forum.rasa.com/t/rule-works-with-one-action-but-not-with-another/53947>\
**Category:** Rasa Open Source\
**Created:** [June 24, 2022, 9:02pm UTC](https://forum.rasa.com/t/rule-works-with-one-action-but-not-with-another/53947 "2022-06-24T21:02:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vapdev](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/vapdev/32/18469_2.png) [@vapdev](https://forum.rasa.com/u/vapdev)\
**Post date:** [June 24, 2022, 9:02pm UTC](https://forum.rasa.com/t/rule-works-with-one-action-but-not-with-another/53947/1 "2022-06-24T21:02:07Z")

</div>

The rule is

```auto
- rule: greet
  condition:
  - slot_was_set:
    - user_name: null
  steps:
  - intent: greet
  - action: utter_greet
  - action: profile_form
  - active_loop: profile_form
  - active_loop: null
  - action: action_create_profile

```

The last action, is action\_create\_profile, it is not called by rasa! But if instead I use action: action\_hello\_world instead of action\_create\_profile, it is called!

The actions code:

```auto
from typing import Any, Text, Dict, List

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher

class ActionHelloWorld(Action):

    def name(self) -> Text:
        return "action_hello_world"

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

        text = 'oi mundo'

        dispatcher.utter_message(text)

        return []

```

```auto
from typing import Any, Text, Dict, List

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from actions.crisp_api import add_new_people_profile

class ActionCreateProfile(Action):

    def name(self) -> Text:
        return "action_create_profile"

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]: 

        dispatcher.utter_message("testses")

        email = tracker.get_slot('email')
        user_name = tracker.get_slot('user_name')
        segments = tracker.get_slot('segments')
        phone = tracker.get_slot('phone')

        data = {
            "email": email,
            "person": {
                "nickname": user_name,
                "phone": phone,
            },
            "segments": segments,
            "data": {
                "user_name": user_name,
            }
        }

        print('todos')
        print(email)
        print(user_name)
        print(segments)
        print(phone)

        add_new_people_profile(data)

        return []

```

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [June 25, 2022, 1:01am UTC](https://forum.rasa.com/t/rule-works-with-one-action-but-not-with-another/53947/2 "2022-06-25T01:01:10Z")

</div>

The debug log will show you what’s going on with the dialogue prediction issue.

You should follow the forms docs example with separate rules to enter and complete the form.

---

<div class="post-metadata">

**Author:** ![vapdev](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/vapdev/32/18469_2.png) [@vapdev](https://forum.rasa.com/u/vapdev)\
**Post date:** [June 27, 2022, 6:00pm UTC](https://forum.rasa.com/t/rule-works-with-one-action-but-not-with-another/53947/3 "2022-06-27T18:00:12Z")

</div>

> [@stephens](#):
>
> docs example with separate rules to enter and complete the form.

Separate rules worked. Thank you
