"utter" is not working after the form is filled

In my stories.yml file, I have two stories, each for a particular form which is triggered by an action that implements a button:

stories:

- story: Happy Path
  steps: 
  - intent: greet
  - action: action_choice

- story: Fetch Diagnosis Form
  steps: 
  - intent: fetchdiagnosisform
    entities:
    - content_type: diagnosis
  - slot_was_set:
    - content: diagnosis
  - action: utter_diagnosis_greet
  - action: preliminary_diagnosis
  - active_loop: preliminary_diagnosis
  - active_loop: null
  - action: utter_diagnosis_result
  # - action: action_restart

- story: Fetch Information Form
  steps: 
  - intent: fetchinformationform
    entities:
    - content_type: faq
  - slot_was_set:
    - content: faq
  - action: utter_information_greet
  - action: basic_details
  - active_loop: basic_details
  - active_loop: null
  - action: utter_details_submitted

I am able to go into the form but once the form is complete, the next utter (utter_diagnosis_result and utter_details submitted) is not called. Can someone please help? I have tried FollowupAction but could not rectify the issue.

utter_diagnosis_result have multiple conditions with text and a catch-all text at the end of it, in this structure:

utter_diagnosis_result:
  - condition:
    - type: slot
      name: diagnose_disease
      value: true
      text: Disease 1 diagnosis text
  - condition:
    - type: slot
      name: diagnose_disease
      value: true
      text: Disease 2 diagnosis text
 - text: catch-all text

Please ignore the indentation mistakes. Here is my rules.yml:

rules:

- rule: Disable user input after Diagnosis detail
  steps:
  - action: utter_diagnosis_greet
  wait_for_user_input: false

- rule: Disable user input after Information detail
  steps:
  - action: utter_information_greet
  wait_for_user_input: false

- rule: Activate Preliminary Diagnosis Form
  steps:
  - action: preliminary_diagnosis
  - active_loop: preliminary_diagnosis

- rule: Submit Preliminary Diagnosis Form
  condition:
  - active_loop: preliminary_diagnosis
  steps:
  - action: preliminary_diagnosis
  - active_loop: null
  - slot_was_set:
    - requested_slot: null
  wait_for_user_input: false

I have the same structure for the second form as well. Since the forms themselves work, I am not sure what to do. Note: I have not made changes to the config.yml file.

Can someone help resolve? Thank you!

I would follow the docs for entering and exiting forms with separate rules.

I’d also recommend against using featurized slots (I assume content is featurized based on the story). I would move handling of that slot and branching around it in the form.

1 Like

Thank you for the reply. Can you elaborate on how I can branch the slot around a form? I did not quite understand it.