EndForEach

EndForEach

EndForEach Use Examples

Basic Use Example

In this example, we are using “ForEach” service to loop over the data retrieved by an Inquire service, “GetCartDetails”. In the loop we’re performing a comparison using “BinaryDecision” service to check whether the cart has reached its limit for items. If it has not, we price the item and then update the cart with the prices retrieved from the pricing process. After this, we end the ForEach with “EndForEach”. By ending the loop, we increase the index by one and move on to the next iteration of the loop.

Here is the output from the logs for EndForEachCartItem: