Friday, September 14, 2012

Difference between BPEL 1.1 and BPEL 2.0 – Oracle SOA Suite

Difference between BPEL 1.1 and BPEL 2.0 – Oracle SOA Suite 11g:

Oracle SOA Suite 11g and Oracle SOA Suite 12c provides the option to use both the BPEL 1.1 and BPEL 2.0 versions.
If we are migrating the BPEL process from 10g to 11g version the BPEL 1.1 version will be used in the migrated process but new processes can be developed in BPEL 2.0.

New Activities 2.0

  • <forEach> activity to repeat the set of activities . Replace the FlowN activity in BPEL 1.1 version.
  • <repeatUntil> - Use this activity if the body of an activity must be performed at least once. The XPath expression condition in the repeatUntil activity is evaluated after the body of the activity completes.
  •  <if>-<elseif>-<else> - Replaces the switch activity in BPEL 2.0 - This activity enables you to define conditional behavior for specific activities to decide between two or more branches. Only one activity is selected for execution from a set of branches.
  • Changed <terminate> to <exit>
  • <compensateScope>  - to compensate the specified child scope
  • A <rethrow> activity has been added to fault handlers this activity enables you to rethrow a fault originally captured by the immediately enclosing fault handler.

XPath access to variable data has been simplified with the following syntax- $variable[.part]/location

The ability to validate XML data has been added; both as an option of the <assign> activity and as a new <validate> activity - This activities are already added into BPEL 1.1(Oracle SOA 11g) as part of the Oracle extension.

 In BPEL 1.1 there is no defined behavior for a process that receives a message for a request-response operation and finishes without replying. In BPEL 2.0, such a scenario would have trigged a Fault message.

Java Embedding:

The Java Embedding syntax in BPEL 2.0 is different compare to BPEL 1.1

BPEL 1.1

<bpel:exec import="*"/>

 <bpelx:exec name="Java_Embedding1" version="1.5" language="java">

BPEL 2.0

<import location="*" importType=""/>

            <bpelx:exec name="Java_Embedding1" language="java">

A variable can optionally be initialized by using an inline from-spec. Click the
Initialize tab in the Create Variable dialog in a BPEL 2.0 project to initialize the variable.It can be initialized from another variable, Expression, Partner Link, Literal and Property.

BPEL 2.0 introduces keepSrcElementName Attribute in the copy rules.This attribute enables you to replace the element name of the destination (as selected by the to-spec) with the element name of the source.
<copy keepSrcElementName="yes|no"/>

BPEL2.0 support multipart WSDL messages.The toParts element in invoke and reply activities provides an alternative to explicitly creating multipart WSDL messages from the contents of BPEL variables.
 <toPart part="payload" fromVariable="request"/>

The fromParts element in receive activities, invoke activities, the onEvent branch of scope activities, and the onMessage branch of pick activities is similar to the toParts element. The fromParts element retrieves data from an incoming multipart WSDL message and places the data into individual variables

 <fromPart part="payload" toVariable="request"/>