webMethods step by step flow services loop
Jun 19, 2012 09:45 0 Comments Development Administrator


 TASK: Creation of Flow Services - Loop

OS: WindowsOS

Platform: webMethods 7.1.2




Now we will create a flow service to process a list of employees using a Loop step in a Flow service.

è Create a Package and folder structure like below and create a flow service loopEx in work folder.



Define a document type in docs folder with the following Document, document list and variables:




è Set the input of the Document Reference to ….docs:Department called Dept, and set the output to a string variable called count





è On the input or output tab of your loopEx service expand the Dept variable and find Dept/department/employee and right click to copy





In our service add a loop statement and in the input array property , paste in Dept/department/employee. Press enter to see the input array displayed in the loop.





è Add a MAP statement under the loop step (be sure it is indented under the Loop). Map $iteration to count.




è Add a pub.flow:debugLog below the MAP step(make sure it is NOT indented under the Loop). Map count variable to message variable











Note: When a loop statement is added, a new variable called $iteration appears in the Pipeline. This variable keeps track of the number of iterations of the loop.


è Save and run the service. To run the service, choose Test|Run or click on the Run icon. Expand the input box, and use the Add Row button to add two employees. Type some data for each employee. Click the OK button. You should see a count of 2 in the Server log.






Similar Blogs: 

webMethods step by step creating Packages and...

webMethods step by step creating sample docum...

webMethods step by step flow services branchi...

                Creating a sample flow service at webmethods ...

               webMethods step by step creation of Indices

Prev Next
About the Author
Topic Replies (0)
Leave a Reply
Guest User

You might also like

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect