Use of global variables in a forEach within a BPEL process

In a business process, a forEach activity is very useful in cases where you want to interact with a set of partners in parallel, and the partners are dynamically determined at runtime. When using forEach in its parallel mode, be very careful when changing variables that are global (created outside the scope of the forEach). There is no semantics of what order parallel branches get executed in. What this means in reality is that when the parallel branches of the forEach execute, if they are assigned to global variables, there is no definition of which order those assignments will get executed in.

With scope isolation, WS-BPEL 2.0 allows you to control the access of global data. If a scope's ...

Get Application Development for IBM WebSphere Process Server 7 and Enterprise Service Bus 7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.