In this theoretical example flow, the user can add either a skateboard or shoe to their shopping cart. While the prompt for shoes or skateboards is displayed, the stock is simultaneously checked. The stock level is simulated here using two number nodes. One for shoes and one for skateboards.
This example demonstrates how flows dynamically can react to parts of the context that no longer exist. What happens if you're still configuring your skateboard when the last one is suddenly sold? Test it by editing the number node in the builder! (You must load this flow in the Builder to change the values.)
It doesn't matter whether you're already configuring your skateboard or haven't yet decided between shoes or skateboards. The flow recognizes when skateboards are sold out and, if necessary, returns you to the initial selection. This also happens if you were in the middle of configuring your product. If a product has a count of 0, the entire branch disappears from the context.
All of this works thanks to RGS (Reactive Graph Sequencing) without any complicated programming.
Try it out and play around!