Understanding Accumulate Output option in BW Groups

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: AccumulativeOption1 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: AccumulativeOption2 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: imageBw1   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: imageBw2   And that’s it! You have your sample working and running: imageBw3   Here it is the code of the sample if you want to take a look: Download!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s