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

Creating a BPEL Module Project

The proceeding sections describe the steps used to create a simple BPEL Module project. To demonstrate the procedures we are using the Synchronous sample project.

Accordingly, the typical procedure to follow when building a BPEL process is:

  1. Creating a new BPEL Module Project using the New Project wizard. Creating the BPEL module project also includes:

    1. Creating an XML Schema using the XSD Editor.

    2. Creating the WSDL Documents using the New WSDL Editor.

    3. Create the BPEL Processes using the BPEL Designer.

  2. Creating a Composite Application Project.

    When new projects are created using the sample projects that are included with GlassFish, the Composite Application projects are created automatically. When you create a project from scratch, you need to create the Composite Application project manually.

  3. Add JBI Modules to the Composite Application project.

  4. (Optional) Build the Composite Application project and make sure that the Application Server is started.

  5. Build and Deploy the Composite Application Project to the BPEL Service Engine.

  6. Test the BPEL Process.

    For sample processes, test cases are automatically created; for new projects, you need to create at least one test case.

  7. (Optional) Debug the BPEL process.

Starting GlassFish

The BPEL Service Engine starts together with GlassFish. Before deploying and performing test runs of a Composite Application project in the NetBeans IDE, make sure that the GlassFish Application Server is started.

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

  1. If the Services window is not visible, choose Window -> Services.
  2. In the Services window, expand the Servers node.

    The Servers node should contain a GlassFish V2 sub-node. If the GlassFish V2 node does not appear, go to To Register the GlassFish V2 Application Server with the NetBeans IDE:

    If a green arrow badge appears on the GlassFish V2 node, the server is running. If a green arrow badge does not appear, go to To Start the GlassFish V2 Application Server in the NetBeans IDE.

To Register the GlassFish V2 Application Server with the NetBeans IDE

  1. If the Services window is not visible, choose Window -> Services.
  2. In the Services window, right-click the Servers node and then select Add Server.

    The Add Server Instance dialog box opens.

  3. On the Choose Server page of the dialog box, select GlassFish V2 from the Server field.

    The Add Server Instance dialog box opens.

  4. (Optional) In the Name field, change the default name for the server.

    The IDE uses this name to identify the server.

  5. Click Next.

    The Platform Location Folder page opens.

  6. In the Platform Location field, click Browse and select the installation location of the application server.
  7. Select the Register Local Default Domain radio button and click Next.
  8. Enter the user name and password for the domain's administrator.

    If you accepted the default values during the installation, the user name is admin and the password is adminadmin.

  9. Click Finish.

To Start the GlassFish V2 Application Server in the NetBeans IDE

  1. In the Services window, right-click the GlassFish V2 node and choose Start.
  2. Wait for the following message to appear in the Output window:

    Application server startup complete.

    When the server is running, the IDE displays a green arrow badge on the GlassFish V2 node.

    The BPEL Service Engine is represented as sun-bpel-engine in the Services window of the IDE, under the GlassFish V2 -> JBI nodes.

Creating a new BPEL Module Project

The following sections use the Synchronous sample project, and provide step-by-step directions for creating a simple BPEL module project, using the Synchronous sample project.

To Create a BPEL Module Project

  1. In the NetBeans IDE, choose File > New Project.

    The New Projects wizard appears.

  2. Under Categories, select Service Oriented Architecture.
  3. Under Projects, select BPEL Moduleand click Next.
    image:Image displays the New Project dialog box
  4. In the Name and Location page, enter the project name (for this example HelloWorld) and specify the project location or accept the defaults.
    image:Image displays the New BPEL Module dialog box
  5. Click Finish.

    The Projects window now contains a project node for the BPEL Module project.


    image:Image shows new BPEL module project in the Projects window

Creating the XML Schema and the WSDL Document

Generally, the steps used to create a BPEL module project are:

  1. Create a New BPEL Project

  2. Create the XML Schema or XSD file

  3. Create the WSDL Documents

  4. Create the BPEL Process

The XSD file (XML Schema) helps to define the projects message structure or operations. Complex message structures are defined in the XSD file and imported into the WSDL Document. The WSDL Documents define the interfaces for the project. The BPEL Designer enables you to graphically design your BPEL business process.

To create the XML Schema and WSDL Document for this tutorial, following the directions provided in Creating a “Hello World” Composite Application. After you have created the XML Schema and WSDL, return here.

Creating a BPEL Process Using the BPEL Designer

Now that you have created your XML Schema and WSDL Document, you can create your BPEL process.

To Create the BPEL Process

  1. In the Projects window, expand your BPEL module project node, right-click the Process Files node, and choose New -> BPEL Process.

    The New BPEL Process dialog box appears.


    image:Image shows the New BPEL Process dialog box
  2. Enter a name for the process file name (HelloWorldProcess for this example), and click Finish.

    The new BPEL file opens in the Design view of the BPEL Designer.

    If the Palette and Properties windows are not displayed in your current view, click Windows -> Reset Windows on the NetBeans menu.


    image:Image shows the NetBeans IDE displaying the Design view of the BPEL Designer
  3. Add a partner link to the BPEL Process.
    1. In the Projects window, expand your project's Process Files node and select the .wsdl file (Synchronous.wsdl for this example).
    2. Drag the WSDL file from the Projects window to the left side of the Design view canvas.

      The IDE provides visual prompts to show you where you can drop the selection.

      The BPEL Editor adds a partner link to the canvas.


      image:Image shows a new partner link added to the BPEL process in the BPEL Editor
  4. Add a Receive activity to the BPEL Process.
    1. From the Web Service section of the Palette window, select the Receive activity.
    2. Drag the Receive activity to the HelloWorldProcess process box in the Design view canvas, between the Process Start and the Process End activities.

      The Receive1 activity is added to the process box.

    3. Click the Receive1 activity's Edit icon.

      The Receive1 Property Editor appears.

    4. On the Main tab, change the value in the Name field to start.
    5. From the Partner Link drop-down list, choose PartnerLink1.

      The IDE populates the Operation field with NewWSDLOperation.

    6. Click the Create button next to the Input Variable Field.

      The New Input Variable dialog box appears.

    7. Click OK to accept the default values.
    8. Click OK to close the Receive1 Property Editor.

      The Design view displays the new connection between PartnerLink1 and the Start activity in the process box.


      image:Image shows the partner link connected to the new Start activity in the BPEL Editor
  5. Add a Reply activity to the BPEL Process.
    1. Select the Reply activity in the Web Service section of the Palette. Drag and drop the Reply to the prompt between the Start activity and the Process End activity in the process box on the design view canvas.

      A Reply1 activity is added to the design view canvas.

    2. Click the Reply1 activity's Edit icon.

      The Reply1 Property Editor appears.

    3. On the Main tab, change the value in the Name field to End.
    4. From the Partner Link drop-down list, choose PartnerLink1.

      The IDE populates the Operation field with NewWSDLOperation.

    5. To create anew output variable, make sure that Normal Response is selected, and click the Create button next to the Input Variable Field.

      The New Input Variable dialog box appears. Click OK to accept the default values.

    6. Click OK to close the Reply1 Property Editor.

      The Design view displays the new connection between the End activity in the process box and PartnerLink1.


      image:Image shows the new Start activity connected to the partner link in the BPEL Editor
  6. Add a Assign activity to the BPEL Process.
    1. Select the Assign activity in the Basic Activities section of the Palette. Drag and drop the Assign to the prompt between the Start activity and the End activity in the process box on the design view canvas.

      The Assign1 activity is added to the design view canvas.

    2. Select the Assign1 activity and click the Mapper button on the editors toolbar.

      The BPEL Mapper appears.

    3. Map the paramA node under Variables -> NewWSDLOperationIn -> inputType in the Output pane of the BPEL Mapper, to the paramA node under Variables -> NewWSDLOperationOut -> resultType in the Input pane of the Mapper. To do this, select the paramA node under Variables -> NewWSDLOperationIn -> inputType in the Output pane, and drag your cursor to the paramA node under Variables -> NewWSDLOperationOut -> resultType in the Input pane.

      This assignment copies the input statement into the output.


      image:Image shows the BPEL Mapper as described in context
  7. To save your changes click the Save All icon in the IDE menu bar.

Creating a Composite Application Project

A BPEL Module project is not directly deployable. You must first add a BPEL Module project, as a JBI module, to a Composite Application project. You can then deploy the Composite Application project. Deploying the project makes the service assembly available to the application server and enables its service units to run.

To Create a New Composite Application Project

  1. Choose File > New Project (Ctrl-Shift-N).
  2. In the Categories list choose Service Oriented Architecture, in the Projects list choose Composite Application, and click Next.
  3. In the Name and Location page, change the project name to HelloWorldApplication, and specify the location of project files.
  4. To set the new Composite Application the main project as main, leave the Set as Main Project checkbox selected, and click Finish.
  5. To add the BPEL Module as a JBI module to the Composite Application project, right-click the new Composite Application and choose Add JBI Module.

    The Select Project dialog box opens.

  6. Select the HelloWorld project you created earlier and click Add Project JAR Files.

    The Select Project dialog box closes and the HelloWorld.jar file is added to the JBI Modules node of the HelloWorldApplication Composite Application

Building and Deploying the Composite Application Project

Building a project compiles the BPEL source file and packages the BPEL file and web service artifacts, including WSDL and XSD files, into a JAR archive. Deploying the project compiles the files in the Composite Application project, packages the compiled BPEL and related web service artifacts (including WSDL and XSD files) into an archive, and deploys them to the Application Server.

To Build and Deploy the Composite Application Project

  1. Right-click the Composite Application project's node, and choose Build.

    When the build is complete the Output window reports Build Successful. If the Output window is not visible, choose Window -> Output -> Output.

  2. Right-click the Composite Application project's node, and choose Deploy.
  3. Deployment has succeeded when you see a Build successful message in the GlassFish tab of the Output window.
  4. Open the Services window and expand Servers -> GlassFish V2 -> JBI -> Service Assemblies to see your new deployed Service Assembly.

    If you do not see the deployed project, right-click the Service Assemblies node and choose Refresh.


    image:Image shows the new Service Assembly in the Services window as described in context

Testing the Composite Application

You can test your Composite Application project by adding test cases, binding to the operation, supplying input, and then using the tester.

Test the HelloWorldApplication Composite Application Project

  1. In the Projects window, expand the HelloWorldApplication project node, right-click the Test node, and choose New Test Case.

    The New Test Case wizard opens.

  2. Accept the default test case name, TestCase1, and click Next.
  3. From the Select the WSDL Document page, expand the HelloWorld - Process Files node, select Synchronous.wsdl, and click Next.
  4. From the Select the Operation to Test page, select the Operation1 and click Finish.

    A new TestCase1 node is added under the project's Test node in the Projects window, containing two sub-nodes, Input and Output.

    The Source Editor appears containing the Input file, Input.xml


    Note - If the Source Editor does not contain a tab for Input.xml, double-click the Input node in the Projects window to open the file.


  5. From the Input.xml tab of the Source Editor, do the following:
    1. Locate the line:
      <syn:paramA>?string?<syn:paramA>
    2. Replace ?string? with Hello World, so that the line appears as follows:
      <syn:paramA>Hello World<syn:paramA>
    3. From the NetBeans IDE menu bar, click Save All.

    image:Image shows the Source Editor containing the Input.xml as described in context
  6. In the Projects window, double-click the Output node under Test -> TestCase1.

    Output.xml is opened in the Source Editor. Initially, Output.xml is empty until the first test run populates the file.

  7. In the Projects window, right-click the TestCase1 node and choose Run.

    When the Overwrite Empty Output dialog box appears, click Yes to accept new output. The first test run populates the Output.xml file displayed in the Source Editor.


    image:Image shows the Source Editor containing the Input.xml as described in context

    The test compares the output to the contents of the output file. Because the first run of the test has nothing to compare itself to, the first test fails. Subsequent test runs will compare their output with the contents of Output.xml and should succeed.

  8. Run the test again.

    The test case is compared to the current output file and succeeds.

Summary

You just created the HelloWorld, synchronous sample project. This sample project is available in the NetBeans IDE's samples file under Project/Samples/SOA/Synchronous BPEL Process.

This tutorial above demonstrates how to: