Skip to content

Wolf Stages

Hao Luo edited this page Aug 10, 2018 · 1 revision

Wolf Stages:

Intake

Intake captures the user message payload to be used throughout future stages.

FillSlot

FillSlot validates and fills the slot(s) based on the user message determined by intake. If there is any information that is invalid, as determined by the validators, the bot will prompt for a retry. If information is valid, slot.onFill() will be called.

Evaluate

Evaluate determines the next slot to be filled (next item to prompt the user) within the active ability. If all slots are filled, evaluate marks the ability as "complete". All slots that are identified to be prompted will be added to the slotPromptedStack.

Execute

Execute checks if any abilities are ready to be completed, if so, ability.onComplete() will be run. Next, the slotPromptedStack will be checked for any unprompted slots. If a slot exists ontop of the stack that is not prompted, slot.query() will be run.

Outtake

Outtake organizes the message queue, and outputs an array of messages that the bot should send to the user.