I have a custom action that determines a follow up action based on some business logic.
Once the action is triggered, it might follow with ‘utter_success’ or ‘utter_try_again’.
My stories have flows where both possibilities are accounted for e.g.
Story 1
intent: inform
action: my_custom_action
action: utter_success
...
Story 2
intent: inform
action: my_custom_action
action: utter_try_again
intent: inform
action: my_custom_action
action: utter_success
...
I know I can dispatch messages as part of the custom action, I guess I could wrap up the last utterances in the custom action. But regardless, the story will play out differently. Especially as I’d like to potentially ask the user to repeat input.
What’s happening is some of my tests are failing. These stories are sort of contradictory from the point of view of model, but I’m not sure how to take account of the fact that my_custom_action
isn’t like an ordinary action and will determine the flow of the story.
I’m beginning to wonder if it is somehow bad practice to conditionally control the follow up action from my custom action? Should custom actions always be followed by the same action? Should I just remove stories with the custom action altogether, seeing as the model doesn’t need to make any further predictions once it has triggered the custom action?