JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS BPEL Designer and Service Engine User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

BPEL Designer and Service Engine User's Guide

Overview

The JBI Runtime Environment

To View the Installed or Deployed JBI Components

The BPEL Designer

The BPEL Service Engine

The Composite Application Project

BPEL Designer and Service Engine Features

BPEL Service Engine Features

Supported WS-BPEL 2.0 Constructs

BPEL Service Engine and Oracle SOA Suite

Understanding the BPEL Module Project

Creating Sample Processes in the BPEL Designer

A Synchronous Sample Process

An Asynchronous Sample Process

Travel Reservation Service Sample

Creating a Sample BPEL Module Project

Navigating in the BPEL Designer

The BPEL Designer Window

The BPEL Editor Views

Cloning Document Views

Element Documentation and Report Generation

Creating Documentation for an Element

Generation a Report

The Navigator Window

XML View

Logical View

The Properties Window

Scrolling

Collapsing and Expanding Process Blocks in the Diagram

To Collapse and Expand a Process Block

Zooming In and Out of the Diagram

Printing BPEL Diagrams and Source Files

To Preview and Print a BPEL Diagram or Source File

To Customize Print Options

To Customize Page Settings

Creating a BPEL Module Project

Starting GlassFish

To Check the Status of the GlassFish V2 Application Server in the NetBeans IDE

To Register the GlassFish V2 Application Server with the NetBeans IDE

To Start the GlassFish V2 Application Server in the NetBeans IDE

Creating a new BPEL Module Project

To Create a BPEL Module Project

Creating the XML Schema and the WSDL Document

Creating a BPEL Process Using the BPEL Designer

To Create the BPEL Process

Creating a Composite Application Project

To Create a New Composite Application Project

Building and Deploying the Composite Application Project

To Build and Deploy the Composite Application Project

Testing the Composite Application

Test the HelloWorldApplication Composite Application Project

Summary

Developing a BPEL Process Using the Diagram

The BPEL Diagram

Configuring Element Properties in the Design View

Finding Usages of BPEL Components

To Find Usages of a BPEL Component

Saving Your Changes

The BPEL Designer Palette Elements

Drop-Zones

The Process Element

Adding BPEL Components to the Process

BPEL Process Properties

The Web Service Elements

Using the Invoke Element

Usage

Invoke Properties

Correlations

Using the Receive Element

Usage

Receive properties

Correlations

Using the Reply Element

Usage

Reply Properties

Correlations

Using the Partner Link Element

Partner Link Types and Roles

Usage

Partner Link Properties

Partner Link Layout

Dynamic Partner Links and Dynamic Addressing

The Basic Activities

Using the Assign Element

Usage

Assign Element Properties

Using the JavaScript Element

Usage

JavaScript Element Properties

Using the Validate Element

Usage

Validate Element Properties

Using the Empty Element

Usage

Empty Element Properties

Using the Wait Element

Usage

Wait Element Properties

Using the Throw Element

Usage

Throw Element Properties

Using the Rethrow Element

Usage

ReThrow Element Properties

Using the Exit Element

Usage

Exit Element Properties

Using the Compensate Element

Usage

Compensate Element Properties

Using the CompensateScope Element

Usage

CompensateScope Element Properties

The Structured Activities

Using the If Element

Usage

Adding an Else If Branch to the If Element

Adding an Else Branch to the If Element

Reordering Else If Branches

If Element Properties

Using the While Element

Usage

While Element Properties

Using the Repeat Until Element

Usage

Repeat Until Element Properties

Using the For Each Element

Usage

For Each Element Properties

Using the Pick Element

Usage

Adding an On Alarm branch

Pick Element Properties

Using the Flow Element

Usage

Adding Branches to the Flow Element

Changing the Order of Elements inside Flow

Flow Element Properties

Using the Sequence Element

Usage

Adding Child Activities to the Sequence

Changing the Order of Elements inside Sequence

Sequence Element Properties

Using the Scope Element

Usage

Scope Element Properties

Variables

To Define a Variable

To Edit a Variable

Using the BPEL Mapper

About the BPEL Mapper

To Open the BPEL Mapper Window

Creating BPEL Mappings

To Create a Mapping Without Using any Functions

To Use a Function in a Mapping

To Delete a Link or Function in a Mapping

Working with Predicates

To Create a Predicate

To Edit a Predicate

To Delete a Predicate

XPath Function Reference

Operator

Boolean

String

Nodes

Number

Date & Time

BPEL

Mapping Examples

Assign Activity Scenario

If Activity Scenario

Predicate Scenario

Using Type Cast and Pseudo-Components

Type Cast

Pseudo-Component

Type Cast and Validation

Type Cast and Pseudo Component Limitations

Using Normalized Message Properties

Using Normalized Message Properties in a BPEL Process

Using Predefined Normalized Message Properties in a BPEL Process

To Use Predefined Normalized Message Properties in a BPEL Process

Adding Additional Normalized Message Properties to a BPEL Process

To Add a Normalized Message Property Shortcut to a BPEL Process

To Edit an NM Property Shortcut

To Delete an NM Property Shortcut

To Add a Normalized Message Property to a BPEL Process

To Delete an NM Property

BPEL Code Generation Using NM Properties

General Normalized Message Properties

Binding Component Specific Normalized Message Properties

Using Handlers

Using a Fault Handler

When to Use

Usage

Catch Element

Catch Element Properties

Catch All Element

Using an Event Handler

When to Use

Usage

On Event Element

Usage

On Alarm Element

On Alarm Element Properties

Using a Compensation Handler

When to Use

To Add a Compensation Handler to Scope or Invoke Elements

Using a Termination Handler

When to Use

To Add a Termination Handler to Scope or Process Elements

Using Correlation

Understanding Correlation. Using the Correlation Wizard

Elements That Use and Express Correlation

Defining Correlation Using the Correlation Wizard

Validation

Validation Criteria

Validation Types

Notifications

The Output window

The Design view

The Navigator window

BPEL Process Logging and Alerting

Defining Logging

To Log the Variable Value

To Set the Log Level for the BPEL Service Engine

To View the Log File

Defining Alerting

Configuring the BPEL Service Engine Runtime Properties

Accessing the BPEL Service Engine Runtime Properties

Runtime Property Descriptions

BPEL Service Engine Deployment Artifacts

Testing and Debugging BPEL Processes

Testing a BPEL Process

To Add a Test Case and Bind it to a BPEL Operation

To Set the Test Properties

To Customize Test Input

To Run the Test Cases

Looking at Test Case Results

Debugging BPEL Processes

Steps in Debugging BPEL Processes

Starting and Finishing a BPEL Debugging Session

Using Breakpoints to Debug BPEL Processes

Debugging Commands

To disable a breakpoint

Group operations over breakpoints

Monitoring Execution of BPEL Processes

BPEL Debugger Windows

Sessions Window

BPEL Process Instances Window

Correlation Sets and Faults information

Local Variables Window

Watches Window

BPEL Process Execution Window

BPEL Partner Links Window

BPEL Debugger Console Messages

Monitoring the BPEL Service Engine

Installing the BPEL Monitor API and Command Line Monitoring Tool

To Install the Monitoring Tool

Using the BPEL Monitor Command Line Tool

To Use the BPEL Monitor Command Line Tool

Command Usage Pattern

More Information

Configuring Quality of Service (QOS) Properties, Throttling, and Redelivery

Configuring the Quality of Service Properties

To Access the Config QOS Properties Editor

Quality of Service Properties

Configuring Message Throttling

Configuring an Endpoint for Throttling

Configuring Redelivery

Using Dynamic Partner Links and Dynamic Addressing

Using a Literal to Construct an Endpoint

Using an Existing Partner Link's Endpoint

Using an Incoming Message to Extract the Endpoint

Using a Database Query to Provide an Endpoint

Sending Service Endpoint References

Configuring Persistence for the BPEL Service Engine

Setting the JVM Classpath to the Database JDBC Drivers

To Set the GlassFish JVM Classpath Settings

Configuring the User and Database for Persistence

Derby (JavaDB)

Oracle

MySQL

Setting max_allowed_packet

Creating an XA Connection Pool and a JDBC Resource

To Create an XA Connection Pool

Create a New JDBC Resource

Creating a Non-XA Connection Pool and JDBC Resource

Enabling Persistence for the BPEL Service Engine

To Enable Persistence for the BPEL Service Engine

Truncating and Dropping Tables

Drop and Truncate Scripts

Configuring Failover for the BPEL Service Engine

Failover Considerations

BPEL BluePrints

Troubleshooting

Using BPEL Schemas Different from the BPEL 2.0 Specification

Service Endpoint Conflict

Relationship of Service Endpoint to Test Cases

Troubleshooting Port Numbers

GlassFish V2 Application Server HTTP Port

Travel Reservation Service Endpoint Conflict

Change URLs

Test Run

Test Run Failures

Disabling Firewalls when Using Servers

Required Correlation Set Usage is Not Detected by the Validation System

Using Dynamic Partner Links and Dynamic Addressing

When you are designing an application, you may need to configure certain services whose endpoints (addresses) are not known beforehand, or it may be necessary to change an endpoint reference while the application is running. The Dynamic Partner link feature allows you to dynamically assign an endpoint reference to the partner link. This means that you can use one partner link for subsequent calls to different web-services (provided that the services use the same interface).

There are several different ways to construct the end point information in BPEL. To deliver the address information to the partner link you can use standard a Assign activity and the BPEL Mapper. In the following examples the endpoint address follows the WS-Addressing schema. Refer to WS-Addressing standard (WS-A).


Note - Dynamic Addressing is only implemented for SOAP (HTTP Binding Component).


Using a Literal to Construct an Endpoint

The BPEL literal syntax can be used to define an endpoint address and assign it to a partner link. The following code sample shows a BPEL literal used to define an HTTP endpoint assigned to a partner link.

<bpws:assign name="Assign2">
    <bpws:copy>
            <bpws:from>
                    <bpws:literal>
                            <sref:service-ref>
                                    <ns1:EndpointReference>
                                            <wsa:Address>
                                                http://localhost:8080/StockQuoteService
/StockQuotePort
                                            </wsa:Address>
                                            <wsa:ServiceName PortName="stockQuotePort">
                                                ns3:stockQuoteService>
                                            </wsa:ServiceName>
                                    </ns1:EndpointReference>
                            </sref:service-ref>
                       </bpws:literal>
                </bpws:from>
                bpws:to partnerLink="plStockQuote"/>
        </bpws:copy>
</bpws:assign>

In this scenario, you are invoking a partner link that is associated with a SOAP (HTTP) endpoint. That partner link, on the binding side of the application, acts as a proxy for BPEL to the external world.

In this example, we have an XML fragment that displays an Assign activity. The Assign has a copy and points to a literal address inline. When you invoke the service, you can assign a different address as a variable value in the invoke properties. In addition to assigning value to variable, you also assign a value to the partner link. Then, when the service is invoked, the HTTP Binding Component stops using the deployment address and instead uses the address that you just assigned.

The partner link "plStockQuote" could be subsequently used in an invoke.

Note that the WS-A defined schema object should be wrapped in an element called service-ref, that is defined in the BPEL. For more information about using the service-ref wrapper, refer to the BPEL Specification, section 6.3.

Using an Existing Partner Link's Endpoint

The endpoint of one partner link can be assigned to another partner link. The following BPEL Mapping and code sample show how the partnerRole endpoint of PartnerLink1 is copied to PartnerLink2.

image:Image shows the BPEL Mapper view as described in context

Mapping the PartnerLink1 partnerRole to PartnerLink2 generates the following source code.

<assign name="Assign2">
     <copy>
         <from partnerLink="PartnerLink1" endpointReference="partnerRole"/>
         <to partnerLink="PartnerLink2"/>
     </copy>
 </assign>

In this example, PartnerLink1 is associated with a SOAP address. Instead of using that address, you want to use PartnerLink2. You send the address of PartnerLink1 to PartnerLink2. PartnerLink1 partnerRole endpoint is copied to PartnerLink2.

PartnerLink2 can also be used in subsequent invokes.

Using an Incoming Message to Extract the Endpoint

To extract an endpoint address from an incoming message, the message must be defined with the endpoint schema as part of the message. The following code sample show one way that this can be done.

<types>
    <xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/dynamicPL">
        <xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
        schemaLocation="http://schemas.xmlsoap.org/ws/2004/08/addressing/"/>
            
    </xsd:schema>
</types>
<message name="dynamicPLOperationRequest">
    <part name="part1" element="wsa:EndpointReference"/>
</message>

Note that the prefix wsa is defined to point to http://schemas.xmlsoap.org/ws/2004/08/addressing.

Use this message variable to assign the endpoint to a partner link at runtime. A special BPEL mapper function, "Wrap with Service Reference" makes it easy to map the WS-A message to a partner link, as demonstrated below.

image:Image shows the Wrap with Service Reference BPEL Mapper option

Choosing the BPEL Mapper option Wrap with Service Reference adds the doXslTransform method box to the Mapper canvas.

image:Image shows the doXSLTransform method box in the BPEL Mapper

The doXslTransform Method box generates the BPEL doXslTransform() function, as shown in the code sample below.

<assign name="Assign1">
    <copy>
        <from>ns0:doXslTransform('urn:stylesheets:wrap2serviceref.xsl', 
$DynamicPLOperationIn.part1)</from>
        <to partnerLink="PartnerLink1"/>
    </copy>
</assign>

The stylesheet for the transformation is already defined by the editor.

Using a Database Query to Provide an Endpoint

Expanding on the last example, you can also have a BPEL service do a dynamic addressing invocation, with the address coming from a database.

You start with a composite application that is triggered by something such as a input file. You do not want to use the address that is directly assigned to the file, so you do a database query or database select for the address.

The composite application triggers the Database Binding Component to do a simple select from a table that contains addresses. The composite application takes the results from the database query and puts it into the BPEL Mapper and maps the query result to the variable where you normally put your dynamic SOAP address. The Mapper assigns this address to the partner link.

Sending Service Endpoint References

A service can send its own endpoints, that can then be used as call back addresses, using the following type of mapping.

image:The image shows the BPEL Mapper as described in context

The PartnerLink1 myRole is mapped to the DynamicPLOperationIn part1. This generates the following code sample.

<assign name="Assign2">
    <copy>
        <from partnerLink="PartnerLink1" endpointReference="myRole"/>
        <to variable="DynamicPLOperationIn" part="part1"/>
    </copy>
</assign>

When the variable “DynamicPLOperationIn” is used in subsequent invokes in the BPEL, the endpoint information is passed on to the partner.


Note - The BPEL Specification states that only the partner address can be changed dynamically. In BPEL terms, this means that only the partnerRole of a partner link can be assigned a value, and myRole does not change after the BPEL process has been deployed.