Skip Headers
Oracle® BPEL Process Manager Order Booking Tutorial
10g (10.1.3.1.0)

Part Number B28987-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

10 Designing the Database Adapter to Insert Data

This chapter of the tutorial describes how to use a database adapter to commit data to database tables in a one-to-many (1:M) master-detail relationship.

This chapter contains the following topics:

10.1 Introduction

This phase of the tutorial adds to the process you designed in Chapter 9, "Using the File Adapter's Write Functionality". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you use a database adapter to commit data to database tables in a one-to-many (1:M) master-detail relationship. You perform the following key tasks:

10.2 Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables

This section contains these tasks:

10.2.1 Creating the Order Fulfillment Process and Importing the Schema

From Oracle JDeveloper, follow these instructions to create the Order Fulfillment process and import the schema.

Caution:

Do not include any special characters in the project name (such as periods) or in any activity or element names. If you do include special characters, errors appear when you attempt to compile your project.
  1. Right-click OrderBookapplication and select New Project.

  2. Under Categories, expand General and click Projects.

  3. Under Items, click BPEL Process Project and click OK.

  4. In the BPEL Project Creation Wizard - Project Settings window, enter the following details and click Next.

    Field Value
    Name FulfillOrder
    Namespace Accept the default path.
    Use Default Project Settings Leave this checked to use the same name for the BPEL process and the BPEL project, and to use the default project directory.
    Template Asynchronous BPEL Process

    The bpel.xml, FulfillOrder.bpel, and FulfillOrder.wsdl files are created.

  5. Click the flashlight icon to the right of the Input Schema Element field.

  6. In the Select Schema window, select OrderBookingPO.xsd from the SOA_Oracle_Home\bpel\samples\tutorials\127.OrderBookingTutorial\PracticeFiles directory and click Open.

    The Type Chooser window appears.

  7. Expand and select Imported Schemas > OrderBookingPO.xsd > Purchase Order.

  8. Click OK.

    The OrderBookingRequestMessage message type is automatically assigned an input message part name of payload and message part element of PurchaseOrder.

  9. Click the flashlight icon to the right of the Output Schema Element field.

    The Type Chooser window appears.

  10. Expand and select Imported Schemas > OrderBookingPO.xsd > Purchase Order.

  11. Click OK.

    The OrderBookingResponseMessage message type is automatically assigned an output message part name of payload and message part element of PurchaseOrder.

  12. Click Finish.

    The GlobalCompany schema is now imported into your project. This schema defines the structure of the purchase order to submit.

    The following files appear in the Application Navigator section of Oracle JDeveloper:

    • The bpel.xml, FulfillOrder.bpel, and FulfillOrder.wsdl files appear under FulfillOrder > Integration Content.

    • The OrderBookingPO.xsd file appears under FulfillOrder > Integration Content > Schemas.

  13. Double-click OrderBooking.bpel to display the Structure section in the lower left of the window.

    Note:

    The Diagram tab must be enabled to see the Structure section.
  14. Select Save from the File main menu.

10.2.2 Creating a Database Connection and Samples Tables

Summary:

You now configure Oracle JDeveloper and Oracle BPEL Server to connect to the database instance installed with Oracle BPEL Process Manager.

You must create a database connection and database sample tables to use this portion of the tutorial.

This section contains these tasks:

10.2.2.1 Creating a JDeveloper Database Connection

  1. Select Connection Navigator from the View main menu.

  2. Right-click Database in the Connections - Navigator window and select New Database Connection.

    This starts the Create Database Connection Wizard.

  3. Click Next on the Welcome window.

  4. Enter myConnection in the Connection Name field of the Type window.

  5. Select Third Party JDBC Driver from the Connection Type list, and click Next.

  6. Enter system in the Username field of the Authentication window.

  7. Enter manager in the Password field.

  8. Leave the remaining fields as they are, and click Next.

  9. Click New to the right of the Driver Class field on the Connection window.

    The Register JDBC Driver window appears.

  10. Enter oracle.lite.poljdbc.POLJDBCDriver in the Driver Class field. Ensure that there are no blank spaces at the end of this entry.

  11. Click Browse to the right of the Library field.

    The Select Library window appears.

  12. Click New.

    The Create Library window appears.

  13. Click Add Entry.

    The Select Path Entry window appears.

  14. Navigate to SOA_Oracle_Home/bpel/lib/olite40.jar.

  15. Click Select.

  16. Click OK to close the Select Library and Register JBDC Driver windows.

  17. Enter jdbc:polite4@localhost:1531:orabpel in the URL field of the Connection window.

  18. Click Next.

  19. Click Test Connection on the Test window.

    If the connection was successful, the following message appears:

    Success!
    
    
  20. Click Finish.

10.2.2.2 Creating Sample Tables

  1. Ensure that Oracle BPEL Server is running.

  2. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > Developer Prompt to open up an operating system command prompt.

    Note:

    Always use the Developer Prompt to open an operating system command prompt in all phases of the Order Booking tutorial. Opening an operating system command prompt in any other way to run tutorial commands is not supported.
  3. Change directories to the tutorials\127.OrderBookingTutorial directory:

    cd tutorials\127.OrderBookingTutorial
    
    
  4. Enter the following command:

    polsql.cmd  @PracticeFiles\insertTable.sql
    
    

    Messages appear indicating table creation and sample row insertion into the default Oracle Lite instance.

10.2.2.3 Testing the Database Connection

  1. Select Connection Navigator from the View main menu.

  2. Expand Database.

  3. Right-click myConnection and select SQL Worksheet.

  4. Enter SELECT * FROM system.orders; in the Enter SQL Statement field.

  5. Right-click the statement and select Execute SQL Statement.

    The sample table created with data appears in the Results field.

    Description of obph10database.gif follows
    Description of the illustration obph10database.gif

10.2.3 Creating a Partner Link that Uses the Database Adapter

Summary:

You now create a partner link that uses the database adapter to commit data into database tables in a one-to-many (1:M) relationship.
  1. Select Application Navigator from the View main menu.

  2. Double-click FulFillOrder.bpel.

  3. Drag and drop a PartnerLink activity onto the right side of the designer window.

  4. Enter DBInsert in the Name field.

  5. Click the third icon at the top (the Define Adapter Service icon). This starts the Adapter Configuration Wizard.

    Description of adapter_service.gif follows
    Description of the illustration adapter_service.gif

  6. Click Next on the Welcome window.

  7. Select Database Adapter on the Adapter Type window and click Next.

  8. Enter writeDB in the Service Name field on the Service Name window and click Next.

  9. Select the myConnection database connection setting you created in "Creating a Database Connection and Samples Tables" from the list.

  10. Ensure that eis/DB/BPELSamples displays in the Database Server JNDI Name field. The name is case sensitive. Ensure that it correctly matches the case of the connection name.

  11. Click Next.

  12. Select Perform an Operation on a Table.

  13. Unselect Delete.

  14. Click Next.

  15. Click Import Tables.

  16. Click Query.

  17. Select ORDERS and ORDERITEMS.

  18. Click > to move both tables to the Selected field.

  19. Click OK. You are returned to the Select Table window of the wizard.

  20. Select SYSTEM.ORDERS and click Next.

    The relationship definitions are automatically created and displayed as 1:M.

  21. Select ORDERITEMS (orders) has a 1:1 Relationship with ORDERS and click Remove Relationship. This ensures that only ORDERS(orderitemsCollection) has a 1:M relationship with ORDERITEMS appears.

  22. Click Next.

  23. Leave all attributes as default for the attributes to return from the query on the page.

  24. Click Next twice.

  25. Click Finish.

    The Partner Links window is automatically completed. The window looks as follows:

    Field Value
    Name DBInsert
    WSDL File file:/c:/oraJDev/jdev/mywork/OrderBookapplication/FulFillOrder/writeDB.wsdl

    Note: This directory path with a drive letter represents an example on Windows operating systems. If running this tutorial on Unix operating systems, your directory path varies. In addition, oraJDev represents the Oracle JDeveloper home directory for this example.

    Partner Link Type writeDB_plt
    Partner Role writeDB_role
    My Role Leave unspecified.

  26. Click OK.

  27. Select Save from the File main menu.

    Note that writeDB.wsdl now appears under FulFillOrder > Integration Content > writeDB. This file contains the parameters you specified with the Adapter Configuration Wizard.

10.2.4 Creating an Invoke Activity

  1. Drag and drop an Invoke activity below the receiveInput Receive activity.

  2. Double-click the Invoke activity to display the Invoke window.

  3. Enter the following details:

    Field Value
    Name writeDBrecord
    Partner Link DBInsert

    The Operation (merge) field is automatically filled in.

  4. Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon.

  5. Click OK on the Create Variable window that appears.

    A variable named writeDBrecord_merge_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of OrdersCollection_msg.

  6. Click OK.

  7. Select Save from the File main menu.

10.2.5 Creating a Transform Activity and the Database Record Transformation

Summary:

You now define your transformation logic.
  1. Drag and drop a Transform activity below the receiveInput Receive activity.

  2. Double-click the Transform activity to display the Transform window.

  3. Click the General tab.

  4. Enter transformDBRecord in the Name field.

  5. Click the Transformation tab.

  6. Select inputVariable in the Source Variable field and payload in the Source Part field.

  7. Select writeDBrecord_merge_InputVariable in the Target Variable field and OrdersCollection in the Target Part field.

  8. Leave the Mapper File field selection as Transformation_1.

  9. Click the second icon (the Create Mapping icon) to the right of the Mapper File field.

    Description of create_mapping.gif follows
    Description of the illustration create_mapping.gif

    A transformation window for graphically mapping source and target elements appears. This window enables you to drag (map) a source element to a target element. If you instead receive a message saying the file already exists, click the third icon to access the transformation window.

  10. Right-click the source and target schemas (the top-most elements in both lists) and select Expand All.

  11. Drag and drop the following source elements to the following target elements:

    Source Target
    po:ID id
    po:SupplierName suppliername
    po:SupplierPrice supplierprice
    po:OrderDate orderdate
    po:OrderPrice orderprice
    po:OrderStatus orderstatus

  12. Select String Functions from the Component Palette section.

  13. Drag and drop a concat function into the middle of the transformation window.

  14. Go to the po:ShipTo source section.

  15. Go to the po:Name subelement of this section.

  16. Drag the po:First and po:Last source subelements into the concat function. This connects two source lines to the concat function.

  17. Go to the Orders target section.

  18. Drag the company target subelement into the concat function. This connects the target line to the concat function and concatenates the first and last names from the source elements into a single name in the target element.

    Description of obph9trans3.gif follows
    Description of the illustration obph9trans3.gif

  19. Right-click the target Orderitems and select Add XSL Node > for-each.

    The for-each node appears between orderitemsCollection and OrderItems in the target schema.

    Description of obph9trans4.gif follows
    Description of the illustration obph9trans4.gif

  20. Drag and drop the source po:OrderItems:Item onto the for-each node. This creates a 1:M relationship.

  21. Drag and drop the source po:OrderItems:Item onto the target Orderitems.

  22. Click OK when prompted to confirm your mapping. This creates an automatic mapping of all matching subelements.

    Description of obph9trans6.gif follows
    Description of the illustration obph9trans6.gif

  23. Select Save from the File main menu.

10.2.6 Testing the Transformation Logic

  1. Right-click in the transformation mapping window and select Test.

    This displays the Test XSL Map window.

  2. Ensure that Generate Source XML Data is selected.

    This creates sample XML test data.

  3. Accept all other default settings, and click OK.

    Sample test results appear. The source XML and target XML display data side-by-side, with the XSL map data underneath. This is the default layout of test results.

  4. Verify the results.

  5. Select Save from the File main menu.

  6. Click Yes if prompted to save your transformation details.

  7. Close the Transformation_1-Source.xml, Transformation_1-Target.xml, and Transformation_1.xsl files by clicking the x button for each in the Title tab.

    Description of obph9trans7.gif follows
    Description of the illustration obph9trans7.gif

    A translation file named Transformation_1.xsl appears under POAcknowledge > Integration Content in the Application Navigator section.

10.2.7 Validating, Compiling, and Deploying the FulFillOrder Process

  1. Go to the Application Navigator section.

  2. Right-click FulfillOrder.

  3. Select Deploy > my_integration_server_connection > Deploy to default domain.

    This compiles the BPEL process. Check for errors by clicking the buttons at the bottom of the window. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 4.

10.2.8 Running the FulFillOrder Process

  1. Log into Oracle BPEL Control by selecting Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > BPEL Control (or refresh the page if it is already open).

  2. Enter the following details to log into Oracle BPEL Control and click Login:

    Field Value
    Username oc4jadmin
    Password password

    Where password is the value you entered during installation.

    The Dashboard tab of Oracle BPEL Control appears. Note that your BPEL process, FulfillOrder, now appears in the Deployed BPEL Processes list. Refresh if necessary.

  3. Click FulfillOrder.

  4. Enter information in one of the following ways:

    • Enter details in all the fields of the HTML Form and click Post XML Message.

    • Click the XML Source radio button. Use a text editor to copy and paste the contents of OrderBookingPO_1.xml into the field that appears. Click Post XML Message.

  5. Refresh Oracle BPEL Control.

  6. Click the Instances tab at the top.

  7. Click the FulfillOrder instance.

  8. Click the Audit link to view the transformation logic and the output written into the database tables.

  9. Click the More link for each sequence to view the activity details. (Similar instance management can also be obtained in a graphical fashion under the Flow link.)

10.2.9 Verifying the Process

  1. Return to Oracle JDeveloper.

  2. Select Connection Navigator from the View main menu.

  3. Expand Database.

  4. Right-click myConnection and select SQL Worksheet. Note that right clicking on the connection name fails if the case of the connection name is incorrect.

  5. Right-click the SQL statement you entered in Step 4 and select Execute SQL Statement (for example, SELECT * FROM system.orders;) or manually enter SELECT * FROM orderitems WHERE ordid = 'your_order_number'.

    This verifies that the database table is properly inserted.

    Description of obph9dbout.gif follows
    Description of the illustration obph9dbout.gif

10.2.10 Extending the Order Booking Process

In this phase of the tutorial, you extend the main OrderBooking process to call the newly created FulFillOrder process as a web service for inserting database tables (through the defined WSDL file).

This section contains these tasks:

10.2.10.1 Creating an Order FulFillment Partner Link

Summary:

You now create a partner link for the FulfillOrder service.
  1. Go to the OrderBooking process in the Application Navigator section.

  2. Double-click OrderBooking.bpel.

  3. Select Services from the Component Palette section.

  4. Drag and drop a PartnerLink activity from the Component Palette section onto the right side of the designer window.

  5. Enter the following values to create a partner link for the Order Booking process:

    Note:

    For the WSDL File field below, click the flashlight (the second icon from the left named Service Explorer) to access the Service Explorer window for automatically selecting the FulFillOrder process as a service.
    Field Value
    Name FulfillOrder
    WSDL File Access this URL by clicking the Service Explorer flashlight icon and expanding and selecting BPEL Services > my_ integration_server_connection > processes > default > FulfillOrder

    http://localhost:8888/orabpel/default/FulfillOrder/FulfillOrder?wsdl

    See Also: "Setting the Hostname in Your Oracle JDeveloper Web Browser Preferences" if you receive a parsing error when attempting to add a WSDL file in the Service Explorer window.

    Partner Link Type FulfillOrder
    Partner Role FulfillOrderProvider
    My Role FulfillOrderRequester

  6. Click OK.

  7. Select Save from the File main menu.

10.2.10.2 Creating a Scope Activity

Summary:

You now create a Scope activity to group all activities that form a logical step to be executed.
  1. Select Process Activities from the Component Palette section.

  2. Drag and drop a Scope activity from the Component Palette section to below the SelectSupplier Switch activity.

  3. Double-click the scope icon to display the Scope window.

  4. Enter OrderFulFillment in the Name field of the General tab.

  5. Click OK.

    In this phase of the tutorial, you create the Invoke, Receive, and Assign activities inside this Scope activity.

  6. Click the + sign to expand the Scope activity.

  7. Select Save from the File main menu.

10.2.10.3 Creating Invoke and Receive Activities

Summary:

You now create Invoke and Receive activities.
  1. Drag and drop an Invoke activity from the Component Palette section into the OrderFulFillment Scope activity.

  2. Double-click the Invoke icon to display the Invoke window.

  3. Enter the following details:

    Field Value
    Name invokeFulfillOrder
    Partner Link FulfillOrder

    The Operation (initiate) field is automatically filled in.

  4. Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon.

  5. Click OK on the Create Variable window that appears.

    A variable named invokeFulfillOrder_initiate_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of FulfillOrderRequestMessage.

  6. Click OK.

  7. Drag and drop a Receive activity from the Component Palette section to below the invokeFulfillOrder Invoke activity inside the OrderFulFillment Scope activity.

  8. Double-click the Receive icon to display the Receive window.

  9. Enter the following details:

    Field Value
    Name receiveFulfillOrder
    Partner Link FulfillOrder

    The Operation (onResult) field is automatically filled in.

  10. Click the first icon to the right of the Variable field. This is the automatic variable creation icon.

  11. Click OK on the Create Variable window that appears.

    A variable named receiveFulfillOrder_onResult_InputVariable is automatically created in the Output Variable field. This variable is automatically assigned a message type of FulfillOrderResponseMessage.

  12. Click OK.

  13. Select Save from the File main menu.

10.2.10.4 Creating an Initial Assign Activity

  1. Drag and drop an Assign activity from the Component Palette section to above the invokeFulfillOrder Invoke activity inside the OrderFulFillment Scope activity.

  2. Double-click the assign icon to display the Assign window.

  3. Click the General tab.

  4. Enter assignDBIn in the Name field.

  5. Click Apply.

  6. Click the Copy Operation tab.

  7. Click Create and select Copy Operation to display the Create Copy Operation window.

  8. Enter the following values:

    Field Value
    From
    • Type
    Variable
    • Variables
    Expand and select Variables > inputVariable > payload
    To
    • Type
    Variable
    • Variables
    Expand and select Variables > invokeFulFillOrder_initiate_InputVariable > payload

  9. Click OK to close the Create Copy Operation window and the Assign window.

  10. Select Save from the File main menu.

10.2.10.5 Creating a Second Assign Activity

  1. Drag and drop an Assign activity from the Component Palette section to below the receiveFulfillOrder Receive activity inside the OrderFulFillment Scope activity.

  2. Double-click the assign icon to display the Assign window.

  3. Click the General tab.

  4. Enter assignDBWriteComments in the Name field.

  5. Click Apply.

  6. Click the Copy Operation tab.

  7. Click Create and select Copy Operation to display the Create Copy Operation window.

  8. Enter the following values:

    Note:

    Instead of manually entering an expression, you can press Ctrl and then the space bar in the Expression field. Scroll through the list of values that appears and double-click the value you want. Edit the value as necessary. As you enter information, a trailing slash can appear. This means you are being prompted for additional information. Either enter additional information, or press the Esc key and delete the trailing slash to complete the input of information.
    Field Value
    From
    • Type
    Expression
    • Expression
    concat(bpws:getVariableData('inputVariable','payload','/ns1:PurchaseOrder/ns1:OrderInfo/ns1:OrderComments'), ' - Order FulFillment Complete')
    To
    • Type
    Variable
    • Variables
    Expand and select > Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments

  9. Click OK to close the Create Copy Operation window and the Assign window.

    When complete, the designer window looks as follows:

    Description of obph9.gif follows
    Description of the illustration obph9.gif

  10. Click the - sign to close the OrderFulfillment Scope activity.

  11. Select Save from the File main menu.

10.2.10.6 Adding Database Exception Handling

Summary:

You perform database exception handling tasks in the FulFillOrder process by creating a local variable and placing the writeDBRecord Invoke activity in a Scope activity. The local variable is set to false (represented by 0). You attempt to call the external partner service in a While loop activity until the local variable is satisfied (set to 1). The While activity is set to loop a maximum of five times. In the case of an exception, you reset the flag to false (0).
  1. Ensure that you are in the FulFillOrder process. If not, double-click FulFillOrder.bpel in the Application Navigator section of the designer window.

  2. Drag and drop a Scope activity from the Component Palette section to below the transformDBRecord Transform activity.

  3. Double-click the Scope icon to display the Scope window.

  4. Enter db_write_scope in the Name field of the General tab.

  5. Click OK.

  6. Click the + sign to expand the Scope activity.

  7. Drag and drop the writeDBrecord Invoke activity into the db_write_scope Scope activity.

  8. Click Add Catch All Branch in the icons on the left side of db_write_scope.

    Description of obph9catchall.gif follows
    Description of the illustration obph9catchall.gif

  9. Click the + sign to expand the new branch.

    A new box displays to the right with an asterisk and the words Drop Activity Here.

  10. Select Variables > Process > Variables in the Structure section.

  11. Right-click Variables and select Create Variable.

  12. Enter dbStatus in the Name field.

  13. Select Simple Type and click the flashlight icon to the right of the Simple Type field.

  14. Select int.

  15. Click OK to close the Type Chooser window and the Create Variable window.

  16. Drag and drop an Assign activity from the Component Palette section to above the db_write_scope Scope activity.

  17. Double-click the Assign icon to display the Assign window.

  18. Click the General tab.

  19. Enter assign_db_0 in the Name field.

  20. Click Apply.

  21. Click the Copy Operation tab.

  22. Click Create and select Copy Operation to display the Create Copy Operation window.

  23. Enter the following values:

    Field Value
    From
    • Type
    Expression
    • Expression
    '0'
    To
    • Type
    Variable
    • Variables
    Expand and select Variables > dbStatus

  24. Click OK to close the Create Copy Operation window and the Assign window.

  25. Drag and drop another Assign activity from the Component Palette section to below the writeDBrecord Invoke activity inside the db_write_scope Scope activity.

  26. Double-click the Assign icon to display the Assign window.

  27. Click the General tab.

  28. Enter assign_db_1 in the Name field.

  29. Click Apply.

  30. Click the Copy Operation tab.

  31. Click Create and select Copy Operation to display the Create Copy Operation window.

  32. Enter the following values:

    Field Value
    From
    • Type
    Expression
    • Expression
    '10'
    To
    • Type
    Variable
    • Variables
    Expand and select Variables > dbStatus

  33. Click OK to close the Create Copy Operation window and the Assign window.

  34. Drag and drop a third Assign activity from the Component Palette section into the Catch All branch on the right side of the db_write_scope Scope activity.

  35. Double-click the Assign icon to display the Assign window.

  36. Enter assign_db_error in the Name field of the General tab.

  37. Click Apply.

  38. Click the Copy Operation tab.

  39. Click Create and select Copy Operation to display the Create Copy Operation window.

  40. Enter the following values:

    Field Value
    From
    • Type
    Expression
    • Expression
    bpws:getVariableData('dbStatus') + 1
    To
    • Type
    Variable
    • Variables
    Expand and select Variables > dbStatus

  41. Click OK to close the Create Copy Operation window and the Assign window.

  42. Drag and drop a Wait activity from the Component Palette section into the Catch branch below the assign_db_error Assign activity.

  43. Double-click the Wait activity to display the Wait window.

  44. Enter waitDB in the Name field.

  45. Set the value to 30 seconds in the HH:mm:ss field. This means this block is retried every 30 seconds until the FulFillOrder process is successful (that is, dbStatus is 1).

  46. Click OK.

  47. Drag and drop a While activity from the Component Palette section to immediately above the db_write_scope Scope activity.

    The designer window looks as follows:

    Description of obph9except.gif follows
    Description of the illustration obph9except.gif

  48. Click the - sign to close the db_write_scope Scope activity.

  49. Expand the While activity.

  50. Drag the db_write_scope Scope activity inside the While activity.

  51. Double-click the While activity and press Ctrl and then the space bar to enter the following in the Expression field:

    bpws:getVariableData('dbStatus') < 5
    
    
  52. Click OK.

  53. Select Save from the File main menu.

10.2.10.7 Validating, Compiling, and Deploying the OrderBooking Process

  1. Go to the Application Navigator section.

  2. Right-click OrderBooking.

  3. Select Deploy > my_integration_server_connection > Deploy to default domain.

  4. Increment the version number of the project when prompted (for example, enter 1.6) and click OK.

    This compiles the BPEL process. Check for errors by clicking the buttons at the bottom of the window. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 4.

10.2.10.8 Running the Order Booking Process

  1. Log into Oracle BPEL Control by selecting Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > BPEL Control (or refresh the page if it is already open).

  2. Enter the following details to log into Oracle BPEL Control and click Login:

    Field Value
    Username oc4jadmin
    Password password

    The Dashboard tab of Oracle BPEL Control appears. Note that your BPEL process, OrderBooking, now appears in the Deployed BPEL Processes list.

  3. Click the BPEL Processes tab.

  4. Note which OrderBooking version has an asterisk next to the version number. This is the default version.

  5. Click the latest version number of the OrderBooking process. If you have been incrementing the version numbers as described in previous chapters, this is the highest number.

    The Managing this BPEL Process window appears.

  6. Scroll down and click Mark as Default to make this the default version of OrderBooking.

  7. Click Done when prompted and note that this OrderBooking version now has an asterisk next to the version number, indicating that it is the default version.

  8. Click the Dashboard tab.

  9. Start the correct OrderBooking version instance in one of the following ways:

    • Click OrderBooking in the Deployed BPEL Processes list.

      • Enter details in all fields of the HTML Form and click Post XML Message.

        or

      • Click the XML Source radio button. Use a text editor to copy and paste the contents of the OrderBookingPO_1.xml file into the field that appears. Click Post XML Message.

        Note:

        Do not copy and paste from Internet Explorer or Mozilla Firefox. You must use a text editor to perform this task.
    • Optionally copy the OrderBookingPO_1.xml file to the temp directory to invoke the process instance (this assumes you have completed Chapter 8, "Using the File Adapter's Read Functionality").

  10. Complete the manual price quote task for SelectManufacturing by using the graphical user interface JSP page, as described in Step 11.

  11. Return to Oracle BPEL Control.

  12. Refresh Oracle BPEL Control.

  13. Click the Instances tab at the top.

  14. Click the OrderBooking instance.

  15. Click the Audit link to view the transformation logic and the output file written in the temporary directory you specified (drive_letter:\temp on Windows operating systems or /temp on Unix operation systems).

  16. Click the More link for each sequence to view the activity details. (Similar instance management can also be obtained in a graphical fashion under the Flow link.)

  17. Check the contents of the temp directory. An output file named po_timestamp.xml should be created. Verify the attributes (for example the concatenation of the first and last names, and so on).

  18. Select Connection Navigator from the View main menu in Oracle JDeveloper.

  19. Expand Database.

  20. Right-click myConnection and select SQL Worksheet.

  21. Enter the statement SELECT * FROM system.orderitems; and right-click and select Execute SQL Statement to see your orders persisted in the database.

    Description of obph9dbitems.gif follows
    Description of the illustration obph9dbitems.gif

10.3 Summary

You have now used the database adapter to commit data to database tables in a 1:M master-detail relationship. You performed the following key tasks: