4 Replies Latest reply on May 10, 2017 6:24 PM by user12859640

    Using inner loop in BPM 12c


      Hi all,

      I am using Sub-process to loop through a collection (Sub-Process --> Parallel/sequential).

      I have a requirement where we get data from 2 different queries.


      When iterating in the collection, I have to iterate another collection and compare the 2 values.


      For example, collection1 size is 20 and collection2 (which I am iterating in sub process) has a size of 5.

      within the subprocess, I need to check if the value of one of the attribute in collection1  is equal to the attribute in collection2.


      How can I achieve this?


      Also, since here 2 objects are involved, should I create a new BPM object (2 object arrays added to 1 object) so that I can specify as Loop input and output data??


      Please suggest.

        • 1. Re: Using inner loop in BPM 12c
          Carlos Cortez



          Maybe you could try:


          First process has a sub-process for iterate the first collection, while you are iterating the first collection, you will do a comparison through a XSLT transformation, where you will use a "for-each" tag to iterate each element inside the second collection, then you can compare this value with the actual value of the first collection.

          • 2. Re: Using inner loop in BPM 12c
            Martien van den Akker



            As I understand, you loop over collection 1 and want to process collection 2 for those rows that match the attribute for the selected/current row in collection1, right?

            If so you could simply try to do a dataassociation/copy rule where you copy collection2 to another variable with the collection1 attribute as a selection condtion. For instance, if collection1 contains departments, and collection two employees:

            $collection2/employees/employee[debtNo=$collection1Row/deptNo] => $deptEpmloyees


            Then then do the innerloop over all rows of $deptEmployees.



            1 person found this helpful
            • 3. Re: Using inner loop in BPM 12c
              Martien van den Akker

              By the way, this seems like something I'd prefer to do in BPEL, since it seems to me like a more lower granual piece of functionality that would clutter up your Business Process Model.

              And BPEL is handier for these kinds of constructions.



              • 4. Re: Using inner loop in BPM 12c

                HI Martein,

                I will try this. The 2 collections need not be of same size right?