In TIBCO designer processes, Groups are often used for iterations and running a group of activities (or sometimes even a single activity) for a specific number of times. In this TIBCO Repeat Until True Group tutorial, I will teach you how you can run a loop for X number of times in TIBCO using group looping.
Example Scenario:
We are going to design a TIBCO process in which we will call a sub-process for a total of 10 times. For this purpose, we will utilize TIBCO group feature.
Step 1: Create a sub-process that will be called from main process
Let’s create a simple sub-process which takes two string values as input and just writes them to a log file. We call it a logging process. The process start activity has a complex element added with two string sub-elements as shown below:
In the write File activity, we are simply concatenating the Name and Designation and writing to the file. Input mapping of the write file activity can be seen in below screenshot:
That’s it for the sub process. Now let’s move forward by creating the Main Process where we will use Group for looping x number of times (where x is set as 10 in this case).
Step 2: Create a TIBCO process which iterates for X number of times
Create a new process and name it like Main Process. In this process, we add a Call Process activity in order to call the sub-process. This is shown in the diagram below:
As we want to call our sub process for x number of times (i.e. 10 times in this example), so we need to create a group and put this Call Process activity inside the group. To place this activity inside the group, we select the call process activity in our process and then click on the Create Group button on the toolbar. Once the activity is inside the group, we need to specify the group action.
As you can see in the below screenshot, In order to run the loop for 10 times, I have chosen the group action as Repeat Until True. In the Index Name, we can give any name to our index as I have given it name i. Now in the conditions input element, I have set the condition $i>10
Now let’s run the process and see how it behaves.
Step 3: Run TIBCO Process with Group Condition in Designer Tester
Load the process in designer tester and run it. As you can see below, Loop in the Main Process runs for 10 times and sub process is called for 10 times:
Watch below video on YouTube channel of TutorialPedia about different Group Actions:
what is the use of accumulate output in grouping activites
The main process fails when executed. Any ways good example for Repeat Until True.
Cheers