Skip to content

Commit

Permalink
Merge pull request #211 from PerfectFit-project/493-return-to-weekly-…
Browse files Browse the repository at this point in the history
…reflection

return to weekly reflection successfully
  • Loading branch information
wbaccinelli authored Jan 18, 2024
2 parents 01582ab + 83e4270 commit 7a3cab5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Rasa_Bot/actions/actions_goal_setting_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ async def run(self, dispatcher, tracker, domain):
dispatcher.utter_message(response="utter_smoke_relapse_8")
return [FollowupAction('relapse_medication_info_form')]

if current_dialog == Components.WEEKLY_REFLECTION:
return [FollowupAction('utter_look_forward_1')]

if current_dialog == Components.GOAL_SETTING:
return [FollowupAction('utter_goal_setting_pa_expl_1')]

Expand Down
32 changes: 32 additions & 0 deletions Rasa_Bot/data/rules/rules_weekly_reflection_dialog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,38 @@ rules:
- active_loop: possible_smoking_situations_form
wait_for_user_input: false

- rule: Back to weekly reflection from goal setting, user has no data
steps:
- action: utter_look_forward_1
- action: utter_look_forward_2
- action: utter_look_forward_3
- action: action_check_barchart_difficult_situations_has_data
- slot_was_set:
- figure_previous_difficult_smoking_situations_has_data: false
- action: utter_look_forward_5
- action: utter_look_forward_6
- action: possible_smoking_situations_form
- active_loop: possible_smoking_situations_form
wait_for_user_input: false

- rule: Back to weekly reflection from goal setting, user has data
steps:
- action: utter_look_forward_1
- action: utter_look_forward_2
- action: utter_look_forward_3
- action: action_check_barchart_difficult_situations_has_data
- slot_was_set:
- figure_previous_difficult_smoking_situations_has_data: true
- action: utter_look_forward_4
- action: show_barchart_difficult_situations
- action: action_upload_file
- action: action_send_metadata
- action: action_delete_file
- action: utter_look_forward_5
- action: utter_look_forward_6
- action: possible_smoking_situations_form
- active_loop: possible_smoking_situations_form
wait_for_user_input: false

## User answered 2
- rule: There were difficult moments
Expand Down
Binary file not shown.

0 comments on commit 7a3cab5

Please sign in to comment.