4 Replies Latest reply: Apr 29, 2014 5:26 PM by 918135 RSS

    Loop Activity in OAG

    918135

      Hi,

       

      Cna we use Loop activity (like "for loop") in OAG? If yes, can you provide document.

       

      Thanks

      Ramana.

        • 1. Re: Loop Activity in OAG
          StefanOEG

          Hi,

           

          You can have a for/while loop in scripts but you can't execute policies from the script. There also a protection built in so it's impossible to build a circular execution path. So a no is the short answer to your question.

           

          If you explain what you are trying to achieve there might be other solutions we can recommend..

           

          Cheers,

          Stefan

          • 2. Re: Loop Activity in OAG
            918135

            Hi Thanks for the reply.

             

            Here is my Use Case:

             

            I have an XML with array of nodes say 1-5 nodes. I would like to invoke a webservice foreach node and append the response to form the consolidated response.

             

            Thanks

            Ramana.

            • 3. Re: Loop Activity in OAG
              StefanOEG

              Hi,

               

              You can serialize all the requests, i.e send one request and save the result in a attribute, send next one and so on for 5 times..  You have to have the actual filters in place(doing the 5 requests) as you can't dynamically iterate over list to make requests.

               

              You can extend the gateway by building your own filter in Java or calling a external jar file with the functionality from a JavaScript but it takes a bit of work..

               

              Good luck!

              Stefan

              • 4. Re: Loop Activity in OAG
                918135

                Finally I had to use Java Script to get this working.

                 

                Thanks

                Ramana.