BPEL applies logic to make choices through conditional branching. The two different actions based on conditional branching are shown below −
In this method, you set up two or more branches, with each branch in the form of an XPath expression. If the expression is true, then the branch is executed. If the expression is false, then the BPEL process moves to the next branch condition, until it either finds a valid branch condition, encounters an otherwise branch, or runs out of branches. If more than one branch condition is true, then BPEL executes the first true branch.
You can use a while activity to create a while loop to select between two actions.