BPEL - Using Parallel Flow


Advertisements

In this chapter, we will understand how parallel flow works in BPEL.

What is Flow Activity?

A flow activity typically contains many sequence activities, and each sequence is performed in parallel. A flow activity can also contain other activities.

For example, two asynchronous callbacks execute in parallel, so that one callback does not have to wait for the other to complete first. Each response is stored in a different global variable.

In the flow activity, the BPEL code determines the number of parallel branches. However, often the number of branches required is different depending on the available information.

Flow Activity

What is FlowN Activity?

The flowN activity creates multiple flows equal to the value of N, which is defined at the run time based on the data available and logic within the process. There is an Index variable increment each time a new branch is created, until the index variable reaches the value of N.

The flowN activity performs activities on an arbitrary number of data elements. As the number of elements changes, the BPEL process adjusts accordingly.

The branches created by flowN perform the same activities, but use different data. Each branch uses the index variable to look up input variables. The index variable can be used in the XPath expression to acquire the data specific for that branch.

FlowN Activity
Advertisements