Testing Our Flow

Explore how to test flow with Map, Wait, and Choice states in the workflow.

In the previous lesson, we completed a big step in implementing our workflow. Now, it's time to test it for correctness. It currently looks as follows:

Press + to interact
Current workflow
Current workflow

The IngredientPreparation state

The workflow starts at the IngredientPreparation state, where a Lambda function checks the inventory for the required quantity of ingredients to prepare the sweets. This function reduces the quantity of each required ingredient in the inventory and returns the ingredients and their quantities.

The Choice state

After the IngredientPreparation state, there is a Choice state, which checks the output of the IngredientPreparation state. If all required ingredients are available (indicated by a 200 status code), it would proceed to the next state. If any ingredient is not available ...