Book Image

Oracle SOA BPEL Process Manager 11gR1 - A Hands-on Tutorial

Book Image

Oracle SOA BPEL Process Manager 11gR1 - A Hands-on Tutorial

Overview of this book

BPEL, Business Process Execution Language is the definitive standard in writing and defining actions within business processes. Oracle BPEL Process Manager R1 is Oracle's latest offering, providing you with a complete end-to-end platform for the creation, implementation, and management of your BPEL business processes that are so important to your service-oriented architecture."Oracle SOA BPEL Process Manager 11gR1 – A Hands-on Tutorial" is your guide to BPEL design and development, SOA Suite platform troubleshooting, and engineering in a detailed step-by-step guide working real-world examples and case studies. Using industry-leading practices you will start by creating your first BPEL process and move onto configuring your processes, then invoking, orchestrating, and testing them. You will then learn how to use architect and design services using BPEL, performance tuning, integration, and security, as well as high availability, troubleshooting, and modeling for the future. "Oracle SOA BPEL Process Manager 11gR1 – A Hands-on Tutorial" is your complete hands-on guide to Oracle SOA BPEL Process Manager 11g.
Table of Contents (20 chapters)
Oracle SOA BPEL Process Manager 11gR1 – A Hands-on Tutorial
Credits
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Creating sample BPEL business processes


  1. Start JDeveloper from the Start menu with the default role. In JDeveloper, from the Application tab, click on New and select SOA Application and then click on Next, as shown in the following screenshot:

  2. Enter the Project Name and click on Finish, as shown in the following screenshot:

  3. It will load the JDeveloper's Design view for developing SOA applications, as shown in the following screenshot:

  4. Drag-and-drop a BPEL Process from Component Pallet to the JDeveloper canvas. The Create BPEL Process screen will appear on the JDeveloper console.

  5. As shown in the following screenshot, you can name your BPEL process. In this case the name is the default BPELProcess1. In the Template field, select Synchronous BPEL Process. Executing Synchronous BPEL processes returns a result. The Asynchronous BPEL processes may not return any value:

  6. As shown in the following screenshot, double-click on BPELProcess1 to view the BPEL:

  7. After double-clicking on the BPEL process, a window, as shown in the following screenshot, will appear:

  8. The next step is to debug the basic BPEL process. Currently, the business process has only receiveInput and replyOutput activity. Click on Run (or Make) to compile the project, as shown in the following screenshot:

  9. After selecting Debug, the following dialog is displayed as no Default Run Target was specified in Run/Debug page of the Project Properties dialog.

  10. Use the dialog in the following screenshot to specify the Default Run Target. Ignore any warning message about the non-existence of the src folder:

  11. From the Activities toolbar on the right-hand side of your window, drag an Assign activity and drop it between receiveInput and replyOutput. The following screenshot will appear after the changes:

  12. You can rename it by double-clicking on Assign1.

An Assign activity is usually used for manipulating data. For example, Assign activity can be used for copying the contents of one variable to another.

Assign activity is mainly used for copying the XML data contained in one BPEL variable to another BPEL variable. The data in a variable is visible and shared among all process activities.

Partner Link represents a link to services. JDeveloper's Source tab allows you to make the changes to the sources if required. The following screenshot shows how the Copy Rules tab can be used for creating a copy rule and connecting the source and target types:

In the sample BPEL process being shown in the preceding screenshot, input data from an input string is being copied to an output string using the concat function of XPath.

XPath is language for navigating through elements and attributes in an XML document and finding information within an XML document. The syntax of XPath's concat function is as follows:

fn:concat(string,string,...)

It returns the concatenation of the strings. For example, concat("My","first","XPATH function!") gives the output as My first XPATH function.

While copying the value of an input string to an output string, use the concat function of XPath to combine the strings together to manipulate the data. The Assign activities in BPEL build the XPath queries.

It is recommended to use the drag-and-drop feature for copying and assembling functions. The source code example of the Assign activity is given as follows (you can view the source code from JDeveloper' Source tab):

<assign>
   <copy>
      <from expression="concat('BPEL working ',
         bpws:getVariableData('input', 'payload', '/p:input))"/>
      <to variable="output" part="payload" query="/p:result/p:message"/>
   </copy>
</assign>

Assign activity in BPEL can do the following:

  • Copy data of one XML variable from input to output

  • Calculate the value of an expression and store it in a variable

The Assign syntax of the copy function is as follows:

<copy> <from...> <to...> </copy>