I am going to illustrate one example of using while activity in BPEL process.
In the example I created one Synchronous BPEL process with name ToTestBPELProcessWhileActivity.
Then Add a new Variable while clicking on highlighted variable icon in below image.
In the example I created one Synchronous BPEL process with name ToTestBPELProcessWhileActivity.
Then Add a new Variable while clicking on highlighted variable icon in below image.
Name the Variable as Counter and select the type as Int by selecting radio button Type in Create Variable Dialogue.
Now Drag one Assign Activity in BPEL process and assign value 3 to Counter variable(Intialize value of the Counter Variable)
Then Drag one While activity below the assign activity and set the condition in General tab of While Activity as if loop should run till Counter variable have value greater then Zero.
Inside the scope of While Activity. Drop one Transformation activity as provided in below image.
Use the any activity to repeat it three times. Then Drop Assign activity below the transform activity in While Activity scope then use copy operation .It will decrement the loop counter variable as below
Once Counter variable value will be less then zero then while loop will terminate. That's it.
No comments:
Post a Comment