New Features
Enhanced Features
O/R Mapping
Tips and Tricks
UML Diagrams
VP Suite

Generate BPEL for Oracle workflow engine

BPEL stand for Business Process Execution Language, which is used to describe business process as well as executing the process. This topic is going to introduce the major steps of generating BPEL for Oracle workflow engine.

Drawing BPEL Business Process Diagram

As the name implies, BPEL Business Process Diagram is a Business Process Diagram for BPEL (Business Process Execution Language). It is used to model business process and make it executable.

Creating Participant for Pool

According to the specification of BPEL, each BEPL is described by WSDL. Within BPEL Business Process Diagram, there a something similar Participant of Pool. The below steps demonstrate how to create Participant for Pool by using template.

  1. Open or create Business Process Diagram.
  2. Open Specification of Pool.
    generatebpelfororacle_openspec_diagrampool.jpg

  3. Create Participant using template.
    generatebpelfororacle_create_asynparticipant_crop.jpg

  4. Click OK several times to apply and close all dialogs.

Create option Creation result
Create Participant... Empty Participant
Create asynchronous Participant... Participant of asynchronous template
Create synchronous Participant... Participant of synchronous template

Asynchronous Participant

When using asynchronous Participant, the BPEL process will become asynchronous at runtime. As implied by the name, interaction of asynchronous process may not reply immediately. Therefore, another operation should be defined for the callback purpose. In our asynchronous template, two sets of partnerLinkType, portType and operation are included, which to be used for caller and callback.

Synchronous Participant

Opposite to asynchronous Participant, synchronous Participant will cause BPEL process become synchronous at runtime. Any interaction of synchronous Participant must reply immediately. Therefore, only one operation is required and the synchronous template is including only one set of partnerLinkType, portType and operation.

Creating and setting Partner Link

Partner Link is a reference of Web Service used within BPEL. In BPEL Business Process Diagram, Pool is used to define Partner Link.

  1. Open Specification of Pool.
    generatebpelfororacle_openspec_pool_crop.jpg

  2. Normally, Pool with Partner Link will be set as black box.
    generatebpelfororacle_pool_spec_blackbox_crop.jpg

  3. Create Partner Link.
    generatebpelfororacle_create_partnerlink_crop.jpg

  4. Since Partner Link is separated from Pool, name of Partner Link should be maintained manually.
    generatebpelfororacle_partnerlink_specification_crop.jpg

  5. Participant of Partner Link is used to describe which Web Service it refers to.
    generatebpelfororacle_partnerlink_selectparticipant_crop.jpg

  6. Partner Link Type of Partner Link represents the interaction of BPEL and Web Service.
    generatebpelfororacle_partnerlink_selectpartnerlinktype_crop.jpg

  7. My Role and Partner Role is used for identifying responsibility of interaction. In synchronous process, only one role is required because it is a single direction invocation. In asynchronous process, two roles are required which describe caller role and callback role.
    generatebpelfororacle_partnerlink_selectpartnerrole_crop.jpg

Role Description
My Role The role of current business process.
Partner Role The role of opposite side such as client application or Web Service.

Setting BPEL properties

For executing the business process, some related properties are required to set. Basic properties are described in the example below.

Simple Example

In the example, the Business Process will start by receiving a message. Then it will make some modification to the message. Finally, the modified message will return back.

  1. Draw Business Process.
    generatebpelfororacle_example_noproperty.jpg

  2. Start by receive a message.
    1. Open Specification of Task.
      generatebpelfororacle_openspec_receivetask_crop.jpg

    2. Check Instantiate if message will create a process instance. Since process will start when message is received, Instantiate should be checked.
      generatebpelfororacle_receivetask_spec_crop.jpg

    3. Open Specification of Task Type.
      generatebpelfororacle_openspec_receivetasktype_crop.jpg

    4. Select Partner Link of receiving message. Since message is from other to current process, the Partner Link should be “Client” which is the Web Service interface of current process.
      generatebpelfororacle_receivetasktype_selectpartnerlink_crop.jpg

    5. Select Operation to be invoked by other.
      generatebpelfororacle_receivetasktype_selectoperation_crop.jpg

    6. Select the corresponding Varaible. Since the Variable does not exist, create one for it.
      generatebpelfororacle_receivetasktype_createvariable_crop.jpg

    7. Select the corresponding Message. Select Process1_RequestMessage since the Operation required it as input message.
      generatebpelfororacle_variable_selectmessage_crop.jpg

    8. Click OK several times to apply and close all dialog boxes.
  3. Modify the received message.
    1. Open Specification of Task.
      generatebpelfororacle_openspec_unspecifiedtask_crop.jpg

    2. Create Assignment.
      generatebpelfororacle_unspecifiedtask_createassignment_crop.jpg

    3. Create From.
      generatebpelfororacle_assignment_createfrom_crop.jpg

    4. Create To.
      generatebpelfororacle_assignment_createto_v2_crop.jpg

    5. Select Varaible to be copied from.
      generatebpelfororacle_assignment_selectfromvariable_crop.jpg

    6. Select Part of Variable to be copied from.
      generatebpelfororacle_assignment_selectfrompart_crop.jpg

    7. Input Query of the value to be copied from.
      generatebpelfororacle_assignment_inputfromquery_crop.jpg

    8. Create To Variable. Create a Variable for storing modified message and return back.
      generatebpelfororacle_assignment_createvariable.jpg

    9. Select the corresponding Message. Select Process1_ResponseMessage since the Operation for return required it as input message.
      generatebpelfororacle_variable_selectmessage2_crop.jpg

    10. Select Part of Variable to be copied to.
      generatebpelfororacle_assignment_selecttopart.jpg

    11. Input Query of the value to be copied to.
      generatebpelfororacle_assignment_inputtoquery_crop.jpg

    12. Click OK several times to apply and close all dialog boxes.
  4. Return modified message back.
    1. Open Specification of Task.
      generatebpelfororacle_openspec_sendtask_crop.jpg

    2. Open Specification of Task Type.
      generatebpelfororacle_openspec_sendtasktype_crop.jpg

    3. Check Reply if process is synchronous. Since process is asynchronous, it should not be checked.
      generatebpelfororacle_sendtasktype_spec_reply_crop.jpg

    4. Select Partner Link of return message.
      generatebpelfororacle_sendtasktype_selectpartnerlink_crop.jpg

    5. Select Operation to be used for return.
      generatebpelfororacle_sendtasktype_selectoperation_crop.jpg

    6. Select the corresponding Varaible.
      generatebpelfororacle_sendtasktype_selectvariable_crop.jpg

    7. Click OK several times to apply and close all dialog boxes.

Properties Reference

The tables below show BPEL related properties with description.

Business Process Diagram

Location Property Description Dependence
General:Tab Participant Web Service interface of BPEL
BPEL:Tab
→ Variable:Tab
List of global Variable
BPEL:Tab
→ Correlation Sets:Tab
List of global Correlation Set

Variable
Location Property Description Dependence
BPEL:Tab Message Message type of Variable

Correlation Set
Location Property Description Dependence
BPEL:Tab
→ Properties:Tab
List of selected Property

Unspecified Task

Location Property Description Dependence
Assignments:Tab List of Copy Rule

Assignment (Copy Rule)
Location Property Description Dependence
BPEL:Tab From From of Copy Rule
Same as above To To of Copy Rule

From Variable, To Variable
Location Property Description Dependence
BPEL:Tab Variable Variable to be copied
Same as above Part Copy Part of Variable Variable
Same as above Query Query of copy value

From Expression
Location Property Description Dependence
BPEL:Tab Expression Expression of copy value

From Property, To Property
Location Property Description Dependence
BPEL:Tab Property Property to be copied

From Partner Link
Location Property Description Dependence
BPEL:Tab Partner Link Target Partner Link
Same as above End Point Reference Role of Partner Link

To Partner Link
Location Property Description Dependence
BPEL:Tab Partner Link Target Partner Link

Receive Task

Location Property Description Dependence
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → General:Tab
Partner Link Target Partner Link
Same as above Operation Operation to be invoked Partner Link
Same as above Variable Variable for receive message Operation
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → Correlations:Tab
List of Correlations

Correlation
Location Property Description Dependence
BPEL:Tab Initiate Is initiate
Same as above Set Correlation Set used
Same as above Pattern Pattern of Correlation Task Type
Intermediate Event Type
Reply

Send Task

Location Property Description Dependence
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → General:Tab
Reply Act as Reply or Invoke
Same as above Partner Link Target Partner Link
Same as above Operation Operation to be invoked Partner Link
Reply
Same as above Variable Variable to be used Operation
Reply
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → Correlations:Tab
List of Correlations

Service, User, Script, Manual Task

Location Property Description Dependence
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → General:Tab
Partner Link Target Partner Link
Same as above Operation Operation to be invoked Partner Link
Same as above Input Variable Variable for send message Operation
Same as above Output Variable Variable for receive message Operation
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → Correlations:Tab
Correlations

Timer Intermediate Event

Location Property Description Dependence
General:Tab
→ Trigger:Specification
- → BPEL:Tab
For Time duration of executing time
Same as above For’s Expression Expression of time duration of executing time
Same as above Until Fixed time
Same as above Until’s Expression Expression of fixed time

Error Intermediate Event

Location Property Description Dependence
General:Tab
→ Trigger:Specification
- → BPEL:Tab
Fault Target Fault type
Same as above Fault Variable Variable to be used

Compensation Intermediate Event

generatebpelfororacle_compensation_structure.jpg

Location Property Description Dependence
General:Tab
→ Trigger:Specification
- → BPEL:Tab
Scope Scope to be compensated

Message, Rule, Link Intermediate Event

Location Property Description Dependence
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → General:Tab
Reply Act as Reply or Invoke
Same as above Partner Link Target Partner Link
Same as above Operation Operation to be invoked Partner Link
Reply
Same as above Variable Variable to be used Operation
Reply
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → Correlations:Tab
List of Correlations

Embedded Sub Process

Location Property Description Dependence
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → Variable:Tab
List of local Variable
General:Tab
→ Type:Specification
- → BPEL:Tab
- - → Correlation Sets:Tab
List of local Correlation Set

Data Gateway

Location Property Description Dependence
General:Tab
→ Type:Specification
- → BPEL:Tab
While Is while or do-while

Event Gateway

Location Property Description Dependence
General:Tab
→ Type:Specification
- → General:Tab
Initiate Is initiate

Generating Oracle BPEL

Since Oracle BPEL is one of the supported target server, generating BPEL for Oracle is simple. However, as only basic validation is provided, an invalid BPEL may also be generated and it may fail at deployment generation.

  1. Open Export Dialog.
    generatebpelfororacle_open_exportdialog_crop.jpg

  2. Select Output Directory.
    generatebpelfororacle_exportdialog_selectoutputdirectory_crop.jpg

  3. Select Target Server.
    generatebpelfororacle_exportdialog_selecttargetserver_crop.jpg

  4. Configure Target Server.
    generatebpelfororacle_exportdialog_configuretargetserver_crop.jpg

    1. Select Oracle BPEL Home.
      generatebpelfororacle_configuretargetserver_inputbpelhome_crop.jpg

    2. Input Partner Link Map.
      generatebpelfororacle_configuretargetserver_configurepartnerlinkmap_crop.jpg

  5. Check Auto Overwrite if overwrite existing files.
    generatebpelfororacle_exportdialog_inputautooverwrite_crop.jpg

  6. Start Export.
    generatebpelfororacle_exportdialog_okay_crop.jpg

  7. Wait until export finished.
    generatebpelfororacle_exportingbpel.jpg

    generatebpelfororacle_exportingbpel_close.jpg

  8. Review Export Result. Double click on the list item may open a dialog with file content.
    generatebpelfororacle_exportresultdialog_crop.jpg

  9. Debug Feature. Since it is not easy to debug a diagram with message only, an export details is provided.
    generatebpelfororacle_exportresultdialog_showtrace_crop.jpg

    generatebpelfororacle_exporttracedialog.jpg

Export Details

Export Details is the actual steps of exporting BPEL for debugging usage. In exporting BPEL, there are six major procedures. Each procedure depends on its previous procedure and will be executed one by one. Any errors within the procedure will be stored, and then try to continue the procedure. If procedure has error occurred, the next procedure will not be executed and the whole progress will be canceled.

The Export Trace dialog box is used to display the steps of each procedure. In other words, it show the diagram’s execution sequence of each procedure. With the Export Trace dialog box, it is possible to show details by double-clicking on a list item. However, some items are not possible to visualize. Therefore, double-clicking on those items will have no effect.

Deploying and testing BPEL

After generated Oracle BPEL, a BPEL suitcase bpel_*.jar will be created by bpelc at the selected output directory. If file does not exist, there must be problem with the diagram. Please refer to the export details and try to fix it.

Deploy BPEL into Oracle

  1. Open browser and login to Oracle BPEL console.
  2. Click Deploy New Process on Dashboard.
    generatebpelfororacle_oraclebpelconsole_dashboard_crop.jpg

  3. Select created BPEL suitcase and click deploy.
    generatebpelfororacle_oraclebpelconsole_deploy.jpg

    generatebpelfororacle_oraclebpelconsole_deploysuccess.jpg

  4. Click deployed process.
    generatebpelfororacle_oraclebpelconsole_deployeddashboard_crop.jpg

  5. Input value for message.
    generatebpelfororacle_oraclebpelconsole_preparelaunch_crop.jpg

  6. Create process instance by sending message.
    generatebpelfororacle_oraclebpelconsole_launch_crop.jpg

  7. View the flow of instance.
    generatebpelfororacle_oraclebpelconsole_instance_crop.jpg

  8. View returned message.
    generatebpelfororacle_oraclebpelconsole_flow_crop.jpg

    generatebpelfororacle_oraclebpelconsole_returnmessage.jpg

Samples

Click on the link below to download:

 
 
Last modified: 2006/09/09 00:34
 
 
Home | Recent Topics | Highlights | UML Diagrams | Tips and Tricks | Object-Relational Mapping
visual-paradigm.com Home | Training Center | UML Center | VP Gallery | Discussion Forum | UML Open Directory