Story and form rule combination not triggering the corresponding utterance after the form

Hello everyone,

Rasa 2.8

I have a form with slots that are suppose to bem filled with user input, regardless the intent/entity that is found in it. After that form been completed I want the bot to continues with the following utterances, pretty simple! But the problem is that after the form is done the bot sends only one utterance and opens for user input. But the slots are filled, don’t make any sense!

Can someone give me a light on this?

Form:

  weekly_no_data_form:
    required_slots:
      weekly_rating_obstacle:
      - type: from_text
      weekly_future_help:
      - type: from_text

Stories:

- story: weekly without data
  steps:
  - intent: greet
  - action: utter_common_node
  - action: action_router
  - action: action_who_validation
  - action: action_weekly_validation
  - action: utter_weekly_time_check
  - intent: approve
  - action: action_weekly_summary
  - slot_was_set:
    - weekly_timestamp: 1652375910.103515
  - action: utter_weekly_no_reports
  - action: weekly_no_data_form
  - active_loop: weekly_no_data_form

- story: weekly without redirecting to greet
  steps:
    - action: weekly_no_data_form
    - active_loop: null
    - action: utter_feedback_received    (after this utterance the bot open to user input)
    - action: utter_weekly_why_track
    - action: utter_weekly_no_mood
    - action: utter_weekly_mood_redirect
    - action: action_greet_dr
    - intent: inform_mood

My rules:

  - rule: Desactivate weekly checkin form
    condition:
    - active_loop: weekly_checkin_form
    steps:
    - action: weekly_checkin_form
    - active_loop: null
    - slot_was_set:
      - requested_slot: null
    - action: utter_weekly_end_form
    wait_for_user_input: false

  - rule: Activate weekly no data form
    steps:
    - action: weekly_no_data_form
    - active_loop: weekly_no_data_form
    
  - rule: Desactivate weekly no data form
    condition:
    - active_loop: weekly_no_data_form
    steps:
    - action: weekly_no_data_form
    - active_loop: null
    - slot_was_set:
      - requested_slot: null
    - action: utter_feedback_received
    wait_for_user_input: false

My slots:

  weekly_rating_obstacle:
    type: text
    influence_conversation: true
  weekly_future_help:
    type: text
    influence_conversation: true

I’m confused by your combination of stories and rules but they look like they contradict each other.

  • One story and two rules starting with weekly_no_data_form. I don’t see the point of the Activate weekly no data form rule.
  • Not sure I’ve ever seen a story end with an intent. Not sure what the use case is for that
  • You have a rule ending with wait_for_user_input: false but no story or rule to pick up from the last action in that rule. I would expect that result in the bot going quiet. It doesn’t surprise me that you are having issues with this set of stories/rules. Start with short, simpler stories/rules and watch the rasa debug log closely to see what the dialogue model is predicting.
1 Like