Let's add decision logic to our purchasing process. After counting the number of items, if we find that the list is empty, we will decide not to proceed with the routine to add the items to the cart:
- Open the Search and Add Item to Cart page.
- Delete the link between the Count the number of items to purchase and the Loop Start stage, as shown in the following diagram:
- Drag a Decision stage and drop it just above the Loop Start stage (refer to the following diagram):
- Double-click on the newly added Decision stage. The Decision Properties dialog appears. Take a look ...