Today we are here to get a deeper look to one of the most unattended options of the Iterate Group Section which is the “Accumulate Output” option. This option is present when we use an section group of these types:
- Repeat Section Group
- Iterate Section Group
- ForEach Section Group
- While Section Group
You can see that option in the next picture along with the parameters that belong to that feature: The goal of this option it to store all the result of one activity inside the section group acroos all the iterations of the section group. You can choose the output activity to store the information (not all the activities are available to do this configuration) using the Output Activity Parameter and you can call that element with your own name using the Output Name parameter. In the example showed in the previous image I’m using a Mapper activity to the one that are going to store all the info with an name “Accumulate”, so if we are inside the section group we can see this new parameter that are an array of the input mapping data that belong to the Mapper activity as you can see here: And that’s the meaning and idea of the usage of the Accumulate Group. As always, I leave you an real project example using this feature. In my example, we are goingo to expose a Web Service that are going to receive a list of textual elements and it’s going to reply with the concatenate of the elements and the index of each of them using the accumulate option. (I know that we could do this kind of thing in a easier way but I want to show you the usage of this feature). So, this is a diagram of the project: We are going to store in the acumulate element the output of the Mapper which contains a mapping of the content of each element and its index as you can see here: And that’s it! You have your sample working and running: Here it is the code of the sample if you want to take a look: Download!