LibraryEASYProcess Reference ManualProcessesServicesProcessFlowWorkshopEndForEach

EndForEach Overview

EndForEach is meant to be used in combination with the ForEach service. It accepts no input, but must follow the ForEach naming convention in order to be associated with its corresponding ForEach service. The “EndForEach” should be named the same as the “ForEach” service, but with an “End” prefix. The EndForEach signals EASYProcess to begin the next iteration of the loop and to increase the index counter by 1. The indexing begins at 0.

If you wish to end the ForEach loop early, another service exists called ExitForEach that ends the looping.

EndForEach Use Examples

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:

Powered by EASYProcess (© 2019 K-Rise Systems, Inc).