Conditional branches in Oracle BPEL are designed to create decision points in your BPEL flow executions.
There are a number of activities that allow conditional branching. If you’re working on a BPEL 2.0 project, it’s good to know that the switch activity is no longer available and replaced by the “IF” activity. The name change is entirely dictated by the BPEL v1.1 to v2.0 standard upgrade. There is no extension to the functionality; just rename the switch to if, make the condition attribute of the first case element a child element of the if element and change it’s xsl variable format. Other case elements change to elseif’s. Finally, otherwise becomes else.
The While activity is available in all BPEL versions and is used to create a loop that, for instance, keeps polling until an activity is available or a specific condition is met.
Just keep in mind, look for the “If” in projects that comply with BPEL 2.0 standards, and use “switch” in BPEL 1.1 projects. When upgrading, you possibly should change the syntax manually.