Rules are not recognized if custom slots are defined

Good scenario: Form with slot retrieved from entity value

I have build an example bot with one form to retrieve one slot. This form is activated/submitted by rules. When form is the active_loop and the “bot_challenge” intent is hit, the response of this shall be returned and the form continnued afterwards. Example dialogue:

image

Bad scenario: Form with slot retrieved by custom action

The exact same example as above I want to construct with custom slot filling. Example dialogue in this scenario is:

image

Issue here is, rule policy does not recognize the rule for the bot_challenge. I’ve tried several things like * adding conditions to the rule

- rule: Say 'I am a bot' anytime the user challenges
  condition:
  - active_loop: form_request_day
  steps:
  - intent: bot_challenge
  - action: utter_iamabot

- rule: Say 'I am a bot' anytime the user challenges
  condition:
  - slot_was_set:
    - day_slot: None
  steps:
  - intent: bot_challenge
  - action: utter_iamabot

- rule: Say 'I am a bot' anytime the user challenges
  steps:
  - intent: bot_challenge
  - action: utter_iamabot
  • or setting influence_conversation param to the slot
slots: 
  day_slot:
    type: text
    initial_value: "None"
    influence_conversation: true
    mappings:
    - type: custom

As I need custom slots within my application I want to get the “bad scenario” to work. I’ve attached zip archive with both projects. I also attached the shell –debug logs for positive/negative examples. log-positive.txt (26.9 KB) log-negative.txt (21.1 KB) test_issues.zip (17.3 KB)

Any help is appreciated :slight_smile:

Hi @HDotzaue, I think I’m having the same problem with my rules after the slot set. I’ve talked about it on this post and I’ve asked about it on this post, but I still don’t understand why this is happening.

Basically, all my rules start to fail if I set a slot that influence conversation from a custom action. Right now, I solve the problem by using conditions in my rules (only for booleans slots) or I move my rules to the stories, where there is no such problem.

Did you manage to understand what is happending? I guess that the reason of that problem is a silly thing, but I haven’t found an explanation yet.

Thanks,

Andrés

1 Like