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 the BPEL Mapper

The section describes how to use the BPEL Mapper.

About the BPEL Mapper

Creating BPEL Mappings

Working with Predicates

XPath Function Reference

Mapping Examples

About the BPEL Mapper

The BPEL Mapper provides a framework for processing and directing BPEL process data. This framework consists of the following components:

To Open the BPEL Mapper Window

Creating BPEL Mappings

You can create a mapping from the source tree pane directly to the destination tree pane, without using any of the functions. This type of mapping can be any of the following:

You can also create a mapping that uses one or more XPath functions from the BPEL Mapper's menu bar. For example, if the BPEL process includes a Wait activity that waits for a period of time, then you can use the Duration Literal function to specify the duration.

To Create a Mapping Without Using any Functions

  1. In the source tree pane, expand the tree component until the node that you want to map from appears.
  2. If the destination tree pane contains a tree component, then expand the tree component until the node that you want to map to appears.
  3. Select the node in the source tree pane and drag the pointer to the node in the destination tree pane.

    A link connects the nodes.

To Use a Function in a Mapping

  1. In the destination tree pane, expand the tree and select the node you want to map to. A blue area appears on the mapping pane. The functions you choose will appear here.
    image:Mapping Pane
  2. Click the drop-down menu that contains the function.
  3. Click the function.

    A function box appears in the mapping pane.

  4. Map any arguments into the appropriate connector on the left side of the function box. The source can be a node in the source tree pane or the output from another function box. If an argument is optional, then a question mark appears after the argument name.
  5. Map the result from the right side of the function box. The destination can be a node in the destination tree pane or the input into another function box.
    image:Mapping with a function

To Delete a Link or Function in a Mapping

  1. Select the link or function.
  2. Press Delete.

Working with Predicates

The BPEL Mapper enables you to create a predicate that consists of XPath functions.

A predicate applies a condition to a node that can have multiple values. The result is the subset of nodes that satisfy the condition.

For example, assume that a node represents the number of products. If you want to select all products whose number is greater than 50, then you can use the greater than and number literal functions to define the condition.

Once you create a predicate, you can use the predicate in an assignment. For example, you can copy data from a predicate in the source tree pane to a node in the destination tree pane.

You can edit or delete an existing predicate.

To Create a Predicate

  1. In the source tree pane, right-click a node (schema element or attribute) and choose New Predicate.

    The Predicate Editor appears.

  2. Use XPath functions to create the condition for the predicate. Map the result to the predicate node in the destination tree pane.
  3. Click OK.

    The editor adds the predicate node immediately below the original node. The condition appears in brackets.

To Edit a Predicate

  1. In the source tree pane, right-click the predicate node and choose Edit Predicate.
  2. Modify the condition.
  3. Click OK.

To Delete a Predicate

  1. In the source tree pane, right-click the predicate node and choose Delete Predicate.
  2. Click Yes.

XPath Function Reference

A collection of XPath functions are available in the BPEL Mapper's menu bar. These functions are based on the XPath 1.0 specification.

Each function has zero or more arguments. Each function returns a single result.

The menu bar contains the following drop-down menus: Operator, Boolean, String, Nodes, Number, Date & Time, and BPEL.

Operator

The Operator menu contains the following functions:

Boolean

The Boolean menu contains the following functions:

String

The String menu contains the following functions:

Nodes

The Nodes menu contains the following functions:

Number

The Number menu contains the following functions:

Date & Time

The Date & Time menu contains the following functions:

BPEL

The BPEL menu contains the following functions:

Mapping Examples

These examples illustrate several mapping scenarios:

Assign Activity Scenario

Assume that you want a BPEL process to copy data received from a partner. Do the following tasks:

  1. Add an Assign activity after the Receive activity.

  2. Use the BPEL Mapper to define one or more copy assignments. To open the BPEL Mapper, double-click the Assign activity on the diagram or select the Mapper tab on the toolbar.

The following example shows a copy assignment that does not use any XPath functions. The itinerary part of the ItineraryIn variable is copied to the itinerary part of the ItineraryOut variable. Notice that the left pane and the right pane contain the same tree component.

image:Screen capture of mapping for Assign activity with direct mapping

The following example shows a copy assignment that uses the concat XPath function. The input variable paramA is concatenated to the end of the string literal Parameter A: and copied to the output variable paramA.

image:Screen capture of mapping for Assign activity with concat XPath function

If Activity Scenario

Assume that you want to execute a series of steps only if a certain condition is true. Do the following tasks:

  1. Add an If activity to the BPEL process.

  2. Use the BPEL Mapper to define the Boolean condition. To open the BPEL Mapper, double-click the If activity on the diagram or select the Mapper tab on the toolbar.

  3. Add the steps inside the If activity.

The following example shows a mapping for the condition. The mapping uses the Not XPath function, which is available from the Boolean node on the menu bar. If the itinerary has an airline reservation, then the Not XPath function returns true. The result is mapped to the Result node in the right pane.

image:Screen capture of mapping for If activity

Predicate Scenario

Assume that you want a BPEL process to copy itinerary data from itineraries of customers with no more than two in their party. The input records include a variable that specifies the number of passengers in the customer's party. Do the following tasks:

  1. In the left pane of the BPEL Mapper window, right-click the repeating node that is marked with an asterisk (*) and choose New Predicate.

    The Predicate Editor window appears.

  2. Add the Less XPath function to the middle pane.

  3. Add the number literal XPath function to the middle pane. Set the value to 3.

  4. Map the variable node to the first argument of the Less XPath function.

  5. Map the result of the number literal XPath function to the second argument of the Less XPath function.

  6. Map the result of the Less Than XPath function to the Result node in the right pane.

  7. Click OK.

The following example shows how the mapping appears in the Predicate window. Once you click OK, you can use the predicate node in a copy assignment.

image:Image shows the mapping for predicate in the BPEL Mapper

If the BPEL process received the following XML, then the predicate would select the first Air tag.

<Air>
    <NumberInParty>2</NumberInParty>
</Air>
<Air>
    <NumberInParty>4</NumberInParty>
</Air>
<Air>
    <NumberInParty>6</NumberInParty>
</Air>

Using Type Cast and Pseudo-Components

Type Cast and Pseudo-components are provided to support type inheritance, help build message structure, and prevent validation errors. Type Casting addresses a problem in which a base complex type does not contain the same elements as the derived type.

For example, a variable may have a base type, containing two attributes and two elements, and a derived type inherited from the base type, containing an additional attribute and element.

image:Image shows a base type and a derived complex  type in the Design view of the XML Schema

When the message is declared in a WSDL for use in BPEL, the base type is used to declare the message. So, in this example, from the Mapper view of the XML structures we see the variable's base type that does not contain the additional element and attribute.

image:Image shows the Mapper view displaying the variables base type

Since the Mapper is designed to allow you to graphically link elements and attributes, these structures need to be available in the mapper view. To allow mapping of derived type attributes and elements, which are implied by the base type, the Mapper enables you to cast an object to another type - in this example, to the derived type.

To cast an object to another type:

  1. From the Mapper view of the project's BPEL file, right-click the variable that has the base type and click Cast To in the context menu. The Subtype Chooser appears displaying a tree with the original type as the root and subtypes under the root. If there are no subtypes, only the original type will appear in the box.

    image:Image shows the BPEL Mapper view containing the new derived type variable as described in context
  2. To cast the original variable to the derived type, select derivedType in the Subtype Chooser and click OK. The derivedType variable appears in the Mapper.

  3. Expand the derivedType variable in the Mapper and note that the additional attribute and element are now available to use for mapping.

Type Cast

The Type Cast option allows you to explicitly cast an object to another type. This only works for objects that have a schema type.

In the BPEL Mapper the following object can be cast:

Pseudo-Component

The Pseudo-component feature is similar to Type Cast. The XML Schema introduces xsd:any. It declares that an element can be located in the XML document and have any name and type. The BPEL mapper allows you to add to the tree elements, which correspond to xsd:any. Such elements don't appear in the schema, but they look similar to other elements. That is why they are called pseudo-elements. The user can map from and to a pseudo-element the same way as for an ordinary element. This also applies to the xsd:anyAttribute. The user can create pseudo-attributes to use for mapping and design purposes.

In the Mapper's Input and Output trees, xsd:any appears as an element node with the name "Any Element" and xsd:anyAttribute as an attribute with the name "Any Attribute". Both have the context menu item "Cast To...", which calls the special dialog box used to specify a name, namespace and type for the new pseudo-component. For xsd:any any global type can be chosen. For xsd:anyAttribute only the global simple types are suggested. In both cases the settings allow you to choose global types from several different sources. The completed pseudo-components appear in the tree with the name pattern (castToElementName)Any Element or (castToAttributeName)Any Attribute.

image:Image shows the pseudo-components, Any Element and Any Attribute in the Mapper's Output tree.

Type Cast and Validation

Validation is passive in regard to type casts and pseudo-components, meaning that validation does not object to an unknown component if it is a qualified type cast or it is declared as a pseudo-component.

Type Cast and Pseudo Component Limitations

The type cast is used to avoid runtime errors, but there are several reasonable limitations: