Testing Our Flow
Explore how to test the ingredient mixing workflow created with AWS Step Functions. Understand the process of validating inventory, mixing ingredients concurrently using Map and Wait states, and handling both successful and failure scenarios with appropriate Lambda functions and state transitions.
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:
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 ...