Oracle® BPEL Process Manager: Order Booking Tutorial 10g Release 2 (10.1.2)
Oracle® BPEL Process Manager: Order Booking Tutorial 10g Release 2 (10.1.2)
December 2005
Oracle BPEL Process Manager Order Booking Tutorial, 10g Release 2 (10.1.2) B15813-02 Copyright 2005, Oracle. All rights reserved. Primary Author: Contributor: Mark Kennedy
The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer SoftwareRestricted Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065 The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.
Contents
Preface ................................................................................................................................................................. ix
Audience....................................................................................................................................................... Documentation Accessibility ..................................................................................................................... Related Documents ..................................................................................................................................... Conventions ................................................................................................................................................. ix ix x x
Introduction
Order Booking Introduction .................................................................................................................. Business Problem ............................................................................................................................... Business Goal ...................................................................................................................................... Business Solution ............................................................................................................................... Using this Tutorial.................................................................................................................................... Starting Oracle BPEL Process Manager Components................................................................... Connecting to Oracle BPEL Server .................................................................................................. Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences ........... 1-1 1-2 1-2 1-2 1-4 1-4 1-5 1-5
Invoking an Asynchronous Service to Receive the Supplier Price for the Order ....................... Starting and Testing Your Services.................................................................................................. Creating a Rapid Distributors Partner Link ................................................................................... Creating Invoke and Receive Activities.......................................................................................... Creating an Assign Activity ............................................................................................................. Validating, Compiling, and Deploying the Order Booking Process .......................................... Running the Order Booking Process ............................................................................................... Summary ....................................................................................................................................................
iv
10
Creating a Transform Activity and the Database Record Transformation............................. Testing the Transformation Logic............................................................................................... Validating, Compiling, and Deploying the FulFillOrder Process.......................................... Running the FulFillOrder Process .............................................................................................. Verifying the Process .................................................................................................................... Extending the Order Booking Process ....................................................................................... Creating an Order FulFillment Partner Link ..................................................................... Creating a Scope Activity ..................................................................................................... Creating Invoke and Receive Activities.............................................................................. Creating an Initial Assign Activity...................................................................................... Creating a Second Assign Activity...................................................................................... Adding Database Exception Handling ............................................................................... Validating, Compiling, and Deploying the OrderBooking Process ............................... Running the Order Booking Process................................................................................... Summary ...............................................................................................................................................
10-8 10-11 10-11 10-11 10-12 10-13 10-13 10-14 10-14 10-15 10-15 10-17 10-20 10-21 10-22
11
12
Using Sensors
Introduction............................................................................................................................................ Adding Sensors...................................................................................................................................... Creating Sensors.............................................................................................................................. Running, Validating, and Deploying the OrderBooking Process............................................ Running the Order Booking Process ............................................................................................ Summary ................................................................................................................................................. 12-1 12-1 12-1 12-4 12-4 12-6
13
Using Notifications
Introduction............................................................................................................................................ 13-1 Adding an E-mail Notification to the POAcknowledge Process ................................................. 13-1
vi
Configuring Your Company E-Mail Environment .................................................................... Creating a Notification Activity.................................................................................................... Validating, Compiling, and Deploying the POAcknowledge Process.................................... Running the POAcknowledge Process ........................................................................................ Summary .................................................................................................................................................
Index
vii
viii
Preface
This manual describes how to use the Oracle BPEL Process Manager Order Booking tutorial. This preface contains the following topics:
Audience
This manual is intended for anyone who is interested in using the Order Booking tutorial.
Documentation Accessibility
Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Accessibility standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For more information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/ Accessibility of Code Examples in Documentation Screen readers may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, some screen readers may not always read a line of text that consists solely of a bracket or brace. Accessibility of Links to External Web Sites in Documentation This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.
ix
TTY Access to Oracle Support Services Oracle provides dedicated Text Telephone (TTY) access to Oracle Support Services within the United States of America 24 hours a day, seven days a week. For TTY support, call 800.446.2398.
Related Documents
For more information on Oracle BPEL Process Manager, see the following manuals:
Oracle BPEL Process Manager Developers Guide Oracle BPEL Process Manager Quick Start Guide
Conventions
The following text conventions are used in this document:
Convention boldface italic monospace Meaning Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary. Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values. Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.
1
Introduction
This tutorial describes how to design and execute a sophisticated process that uses synchronous and asynchronous services, parallel flows of execution, conditional branching logic, fault handling and exceptions management, transformations, file adapter and database adapter functionality, and human workflow, notification, and sensor functionality. This chapter contains the following topics:
Manager for Developers installation option on a supported Windows operating system. This option provides an Oracle JDeveloper 10g-based environment for modeling, editing, and designing business processes using BPEL. Oracle BPEL Server (to which to deploy BPEL processes) and Oracle BPEL Console (from which to run BPEL processes) are also installed. See Oracle BPEL Process Manager Quick Start Guide or Oracle Application Server Integration Installation Guide for installation instructions.
Retail on the Web Direct sales through sales representatives Large customers through automated business-to-business (B2B) orders
GlobalCompany uses a virtual inventory business model. GlobalCompany has contract suppliers who build and distribute their products. Their core business expertise is product design and product marketing. GlobalCompany currently deals with two primary suppliers for their order fulfillment, based on order size and geographic location:
Select Manufacturing (a local contract manufacturer) Rapid Distributors (an out-of-state distributor that sources goods from an overseas low-cost manufacturer)
Introduction 1-1
Business Problem
GlobalCompany cannot provide the same services and responses to all customers, irrespective of the channel of order placement and order type. GlobalCompany has seen sales increase but profit margins fall for the last two quarters and has decided to immediately implement stronger control mechanisms. GlobalCompany wants their suppliers to compete for business rather than using the current system of fixed quotas and allocations.
Business Goal
GlobalCompany has the following goals:
Consistent order booking and fulfillment across all sales channels Suppliers must bid on all orders and the lowest-priced supplier must be awarded the order The ability to override orders approved for fulfillment when margins are low, based on supplier bids Completely automated order booking that uses the existing systems and applications Automated ability to send an outgoing purchase order acknowledgment to a customer The ability to send an e-mail notification to confirm receipt of an order
Business Solution
GlobalCompany decides to use Oracle BPEL Process Manager to create an order booking composite application. GlobalCompany uses the Oracle Applications Server platform to enable service-oriented architecture (SOA) in their enterprise. Oracle BPEL Process Manager is used to implement a business process that receives orders placed to the company through any channels. The same process orchestrates all the existing services in the enterprise for order fulfillment with the right supplier, based on the business rules in the process. Figure 11 provides an overview of this solution:
1-2
Fault management
Write OrderAck
Reply
1.
B2B systems Web systems New customer resource management (CRM) applications Old legacy order capturing systems through files
2.
The customer is identified from the order and checked against the existing Credit Rating service. The credit check system returns the relevant rating for the customer. The orders line items are passed to the two suppliers for their price quotes. Select Manufacturing normally quotes lower prices because it is a direct manufacturer,
3.
Introduction 1-3
but has slow turnaround times for a response. Rapid Distributors has an automated response service for price quotes and responds in seconds, but normally quotes higher prices. Both suppliers should respond within thirty minutes. Because of business confidentiality, the orders end user details (customer contact, phone number, e-mail address, and so on) are not sent to the two suppliers. Only the part of the order that is relevant to quoting a price is sent.
4. 5.
The process collects the quotes and selects the lowest quoted price as the supplier to which to award the order. An important step is to pass all this information to the business managers to approve the order for fulfillment with all the order details, especially the sales price and the supplier-quoted price, for margin reviews. If the order is approved, it is sent for fulfillment. The old fulfillment service is repackaged to capture orders in the order management system and to send a notification to the supplier for order shipment. An order acknowledgement is then sent to the order placing channel of the sales order to confirm that the order is accepted or rejected.
6.
7.
A subdirectory in 127.OrderBookingTutorial named PracticeFiles includes key schema files that you copy into the project directories in this tutorial. You are now ready to begin.
Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > Start BPEL PM Server to start the Oracle BPEL Server. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > JDeveloper BPEL Designer to start the JDeveloper BPEL Designer. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > Developer Prompt to open up a command prompt at the Oracle_Home\integration\orabpel\samples directory. This enables you to easily access demonstrations and start any required Web services. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console to start the Oracle BPEL Console. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > Getting Started with Samples for details about BPEL samples and additional tutorials available for use. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > Sample Worklist Application to access the login window for the Oracle BPEL Worklist Application.
3.
4. 5.
6.
1-4
Note: You must use Internet Explorer version 6 or Mozilla Firefox version 1.0.4 with this tutorial.
Select Connection Navigator from the View main menu in JDeveloper BPEL Designer. Right click BPEL Process Manager Server. Select New BPEL Process Manager Connection. Click Next on the Welcome page. Provide a name for connecting to the server. Click Next. Enter the following details:
Value localhost (default value) 9700 (default value)
Click Next. Test the connection by clicking Test Connection. If the connection was successful, the following message appears:
Success.
Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences
Add the hostname of your computer to JDeveloper BPEL Designer preference settings. If you do not do this, you can receive parsing errors when selecting a WSDL file on the WSDL Chooser window while creating a partner link. Perform this task even if you do not have a proxy server.
1. 2. 3.
Select Preferences from the Tools main menu. Click Web Browser and Proxy. Enter your hostname in the Exceptions field. For example, if your hostname is myhost-pc:
us.acme.com|*.us.acme.com|localhost|127.0.0.1|myhost-pc
4. 5.
Ensure also that localhost appears in the Exceptions field. Click OK.
Introduction 1-5
1-6
2
Invoking a Synchronous Service
This chapter of the tutorial describes how to invoke a synchronous service. This chapter contains the following topics:
Introduction Invoking a Synchronous Service to Receive an Order and Obtain a Credit Rating Summary
Introduction
In the first phase of this tutorial, you learn how to build a simple asynchronous BPEL process for receiving an order from a client and obtaining a credit rating. You perform the following key tasks:
Deploy (start) a synchronous Credit Rating service. Create a new BPEL process named OrderBooking. Create a partner link to interact with the Credit Rating service. Design the BPEL process to invoke the Credit Rating service. Deploy the BPEL process. Run the deployed BPEL process from Oracle BPEL Console and submit a social security card number to the Credit Rating service to check the clients credit history. Review the credit rating results returned from the Credit Rating service to the client.
Starting Oracle BPEL Server and JDeveloper BPEL Designer Starting and Testing Your Services Creating a New Workspace and an Order Booking Project Importing the Order Booking Schema Creating a Credit Rating Service Partner Link Creating Scope and Invoke Activities
2-1
Creating an Initial Assign Activity to Send Request Data to the Credit Rating Service Creating a Second Assign Activity to Receive Response Data from the Credit Rating Service Creating a Third Assign Activity Validating, Compiling, and Deploying the Order Booking Process Running the Order Booking Process
Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > Developer Prompt to open up an operating system command prompt at the Oracle_Home\integration\orabpel\samples directory.
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.
2.
3.
This deploys and starts the required services for using this tutorial. If successful, a message similar to the following appears at the end:
BUILD SUCCESSFUL Total time: 3 seconds oraBPELPM\integration\orabpel\samples\utils\CreditRatingService>ENDLOCAL
If you receive an error saying the path was not found, ensure that your environment path is set to the Oracle_Home\integration\orabpel\bin directory.
4.
Access Oracle BPEL Console using Internet Explorer to see if all required services are running. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console. Click Login with default selected from the Domain list. The password is bpel. The services for this tutorial are running if CreditRatingService, TaskActionHandler, and TaskManager display in the Dashboard tab.
5.
2-2
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. 2. 3. 4. 5. 6. 7.
Return to JDeveloper BPEL Designer. Select File > New from the main menu. Double-click Workspace in the Items window to display the Create Workspace window. Enter OrderBookworkspace in the Workspace Name field and accept the default path in the Directory Name field. Deselect the Add a New Empty Project check box. Click OK. Right-click OrderBookworkspace in the Applications Navigator section of the designer window. If the Applications Navigator section does not currently appear, select Application Navigator from the View main menu. Select New Project. Double-click BPEL Process Project in the Items window to display the BPEL Process Project window. the correct values for creating an asynchronous BPEL process.
8. 9.
10. Enter OrderBooking in the BPEL Process Name field. All other fields default to 11. Click OK.
Copy OrderBookingPO.xsd and OrderBookingPO_1.xml from the Oracle_ Home\integration\orabpel\samples\tutorials\127.OrderBookingTu torial\PracticeFiles directory to the Oracle_ Home\integration\jdev\jdev\mywork\OrderBookworkspace\OrderBoo king directory. Double-click OrderBooking.bpel in the Applications Navigator section of the designer window to display the Structure section in the lower left of the window.
2.
2-3
Note: The Diagram View tab must be enabled to see the Structure
section.
3. 4.
Select and right-click Project Schemas in the Structure section. Select Import Schema. The Import Schema window appears.
5. 6.
Click the flashlight icon to access the Open window. Select OrderBookingPO.xsd from the OrderBooking directory in which you placed it in Step 1 on page 2-3 and click Open. The file is added to the URL field of the Import Schema window.
7. 8.
Click OK. Verify that OrderBookingPO.xsd appears under OrderBooking > Web Content > Miscellaneous Files in the Applications Navigator section of the designer window. OrderBookingPO.xsd also appears under Project Schemas in the Structure section. If you want, you can double-click OrderBookingPO.xsd under Miscellaneous Files to view the design and source modes of this file. If you view OrderBookingPO.xsd, close the window when done by clicking the x button on the Title tab.
9.
2-4
designer window to display the Structure section in the lower left section of the designer window.
11. Expand Message Types > Process WSDL - OrderBooking.wsdl >
window.
13. Select Element and click the flashlight icon to the right of the Element field. 14. Expand Project Schema Files > OrderBookingPO.xsd. 15. Select PurchaseOrder. 16. Click OK to close the Type Chooser window and the Edit Message Part window.
window.
19. Select Element and click the flashlight icon to the right of the Element field. 20. Expand Project Schema Files > OrderBookingPO.xsd. 21. Select PurchaseOrder. 22. Click OK to close the Type Chooser window and the Edit Message Part window.
Ensure that Process Activities is selected in the drop-down list of the Component Palette section in the upper right section of JDeveloper BPEL Designer.
2-5
2.
Drag and drop a PartnerLink activity onto the right side of the designer window anywhere beneath the header Partner Links. Note that both sides of the designer window have sections in which partner links can be placed.
3.
Enter the following values to create a partner link for the Credit Rating service. For the WSDL File field below, click the flashlight (the second icon from the left named WSIL Browser) to access the WSDL Chooser window for automatically selecting the Credit Rating service deployed in "Starting and Testing Your Services" on page 2-2:
Value CreditRatingService Access this URL by clicking the WSIL Browser flashlight icon and expanding and selecting LocalBPELServer > processes > default > CreditRatingService. http://localhost:9700/orabpel/default/CreditRatingService/CreditRatin gService?wsdl See Also: "Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences" on page 1-5 if you receive a parsing error when attempting to add a WSDL file in the WSDL Chooser window.
2-6
4. 5.
Note: As you create and open activities such as Scope, Invoke, and
Assign for the first time, the message Invalid Settings can appear at the top. This is because you have not yet entered details. You can ignore this message. After you enter and apply your details, the message disappears.
1.
Drag and drop a Scope activity from the Component Palette section to below the receiveInput Receive activity. Always pay careful attention to where you place the Scope activity; throughout all phases of this tutorial, you drag and drop activities many times.
Note that the first time your drag and drop an activity, it has a generic name such as Scope_1.
2. 3. 4. 5.
Double-click the scope icon to display the Scope window. Enter GetCreditRating in the Name field of the General tab. Click OK. Click the + sign to expand the Scope activity. You now add an Invoke activity and two Assign activities to this Scope activity.
2-7
6.
Drag and drop an Invoke activity from the Component Palette section to inside the GetCreditRating Scope activity.
7. 8.
Double-click the Invoke icon to display the Invoke window. Enter the following details:
Value invokeCR CreditRatingService
Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon.
A variable named invokeCR_process_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of CreditRatingServiceRequestMessage.
11. Click the first icon to the right of the Output Variable field. 12. Click OK on the Create Variable window that appears.
2-8
A variable named invokeCR_process_OutputVariable is automatically created in the Output Variable field. This variable is automatically assigned a message type of CreditRatingServiceResponseMessage.
13. Click OK. 14. Select Save from the File main menu.
Creating an Initial Assign Activity to Send Request Data to the Credit Rating Service
Summary: You now create the first of two Assign activities in this phase. This Assign activity takes the customer custID element from the Order Booking schema and assigns it to invokeCR_process_ InputVariable. This is the variable used for sending a request to the Credit Rating service.
1.
Drag and drop an Assign activity from the Component Palette section to above the invokeCR Invoke activity and inside the GetCreditRating Scope activity.
2. 3. 4. 5. 6. 7.
Double-click the assign icon to display the Assign window. Click the General tab. Enter assignCR in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window.
2-9
8.
Field From
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:CustID Note: The namespace number values (for example, ns1, ns2) can vary.
To
Type Variables
Variable Expand and select Variables > invokeCR_process_InputVariable > payload > ns2:ssn
9.
Click OK to close the Create Copy Rule window and the Assign window.
2-10
Creating a Second Assign Activity to Receive Response Data from the Credit Rating Service
Summary: This Assign activity takes the response received from the Credit Rating service and places it in the comment field.
1.
Drag and drop an Assign activity from the Component Palette section to below the invokeCR Invoke activity and inside the GetCreditRating Scope activity.
2. 3. 4. 5. 6. 7. 8.
Double-click the assign icon to display the Assign window. Click the General tab. Enter assignRating in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
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 From
Value
Type Expression
Expression concat('Good credit, Rating = ', bpws:getVariableData('invokeCR_ process_OutputVariable','payload','/ns2:rating')) Note: Press Ctrl and then the space bar to display a list for selecting (double-clicking) this syntax. The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments
9.
Click OK to close the Create Copy Rule window and the Assign window.
Drag and drop an Assign activity from the Component Palette section to below the GetCreditRating Scope activity and above the callbackClient activity.
2-12
2. 3. 4. 5. 6. 7. 8.
Double-click the assign icon to display the Assign window. Click the General tab. Enter assignOutput in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details to create a statement:
Value
Field From
Type Variables
To
Type Variables
9.
Click OK to close the Create Copy Rule window and the Assign window.
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful.
5. 6.
If there are errors, click BPEL Validation Errors to display details about the type and location of the error. Make corrections and deploy again.
Log into Oracle BPEL Console using Internet Explorer or refresh the page if it is already open. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console. The Dashboard tab of Oracle BPEL Console appears.
2-14
2. 3.
Click OrderBooking in the Deployed BPEL Processes list. Enter a nine-digit integer value that does not begin with zero in the CustID field of the HTML Form and click Post XML Message. Ignore the other fields. The BPEL Processes tab displays a message similar to the following:
Test Instance Initiated Instance 39e706a46ad531be:858bf1:fcc240f310:-7ffc is being processed asynchronously.
4. 5.
Click the Instances tab at the top. Verify that the OrderBooking and CreditRatingService instances were created. Both should appear in the Instance list. The Last Modified list displays the times at which they were created.
6.
7.
Click the Audit link to follow the instance execution process. The Audit link displays the following details:
8. 9.
Click the Flow link. Click callbackClient at the bottom of the flow to see the results.
10. Verify the credit rating value. The comment field shows that the credit rating is
2-16
Summary
Summary
You have now built a simple asynchronous BPEL process that received an order from a client and obtained a credit rating from a Credit Rating service. You performed the following key tasks:
Deployed a synchronous Credit Rating service. Created a new project named OrderBooking, which automatically created a BPEL process of the same name. Created a partner link that enabled you to define the external service (the deployed Credit Rating service) with which your BPEL process interacted. Designed the BPEL process and invoked the Credit Rating service by creating all necessary activities. Deployed the BPEL process to Oracle BPEL Console. Ran the BPEL process from Oracle BPEL Console and submitted a social security card number to the Credit Rating service, which checked the clients credit history. Reviewed the credit rating results returned from the Credit Rating service to the client.
Summary
2-18
3
Invoking an Asynchronous Service
This chapter of the tutorial describes how to invoke an asynchronous service. This chapter contains the following topics:
Introduction Invoking an Asynchronous Service to Receive the Supplier Price for the Order Summary
Introduction
This phase of the tutorial adds to the OrderBooking process you created in Chapter 2, "Invoking a Synchronous Service". Ensure that you have successfully completed that phase before performing this one. In this phase, you build a simple asynchronous BPEL process. You perform the following key tasks:
Deploy an asynchronous Rapid Distributors service. Create a partner link to interact with the Rapid Distributors service. Design the BPEL process to invoke the Rapid Distributors service. Deploy the BPEL process. Run the deployed BPEL process from Oracle BPEL Console by completing and submitting an order form to the Rapid Distributors service. Review the supplier price returned from the Rapid Distributors service to the client.
Invoking an Asynchronous Service to Receive the Supplier Price for the Order
This section contains the following tasks:
Starting and Testing Your Services Creating a Rapid Distributors Partner Link Creating Invoke and Receive Activities Creating an Assign Activity Validating, Compiling, and Deploying the Order Booking Process Running the Order Booking Process
3-1
Invoking an Asynchronous Service to Receive the Supplier Price for the Order
Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > Developer Prompt to open up an operating system command prompt at the Oracle_Home\integration\orabpel\samples directory.
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.
2.
3.
This deploys and starts the Rapid Distributors service required for using this phase of the tutorial. If successful, a message appears at the end:
BUILD SUCCESSFUL
The Select Manufacturing service and user application are also created. You use these services later in Chapter 4, "Adding Parallel Flow".
4.
Access Oracle BPEL Console to see if all required services are running by selecting Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console. Click Login with default selected from the Domain list. The password is bpel. The services for this phase are running if RapidDistributors and SelectManufacturing display in the Dashboard tab.
5.
Return to JDeveloper BPEL Designer. Ensure that Process Activities is selected in the drop-down list of the Component Palette section. Drag and drop a PartnerLink activity onto the right side of the designer window. Enter the following values to create a partner link for the Rapid Distributors service:
3-2
Invoking an Asynchronous Service to Receive the Supplier Price for the Order
Note: For the WSDL File field below, click the flashlight (the second
icon from the left named WSIL Browser) to access the WSDL Chooser window for automatically selecting the Rapid Distributors service deployed in "Starting and Testing Your Services" on page 3-2.
Value RapidDistributors Access this URL by clicking the WSIL Browser flashlight icon and expanding and selecting LocalBPELServer > processes > default > RapidDistributors. http://localhost:9700/orabpel/default/RapidDistributors/RapidDistrib utors?wsdl See Also: "Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences" on page 1-5 if you receive a parsing error when attempting to add a WSDL file in the WSDL Chooser window.
Drag and drop an Invoke activity from the Component Palette section to below the GetCreditRating Scope activity.
3-3
Invoking an Asynchronous Service to Receive the Supplier Price for the Order
2. 3.
Double-click the Invoke icon to display the Invoke window. Enter the following details:
Value invokeRD RapidDistributors
Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon. Click OK on the Create Variable window that appears. A variable named invokeRD_initiate_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of RapidDistributorsRequestMessage.
6. 7.
Click OK. Drag and drop a Receive activity below the invokeRD Invoke activity you just created.
8. 9.
Double-click the Receive icon to display the Receive window. Enter the following details:
Value receiveRD RapidDistributors
3-4
Invoking an Asynchronous Service to Receive the Supplier Price for the Order
A variable named receiveRD_onResult_InputVariable is automatically created in the Variable field. This variable is automatically assigned a message type of RapidDistributorsResponseMessage.
12. Click OK. 13. Select Save from the File main menu.
Drag and drop an Assign activity from the Component Palette section to above the invokeRD Invoke activity you just created.
2. 3. 4. 5. 6. 7. 8.
Double-click the assign icon to display the Assign window. Click the General tab. Enter assignRDIn in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
Value
Field From
3-5
Invoking an Asynchronous Service to Receive the Supplier Price for the Order
Field
Value Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderItems Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
Type Variables
To
Type Variables
Variable Expand and select Variables > invokeRD_initiate_InputVariable > payload > ns1:OrderItems
9.
Click OK to close the Create Copy Rule window and the Assign window. create an additional Assign activity to explicitly copy the received data of invokeRD_initiate_InputVariable into another variable. When complete, the designer window looks as follows:
10. Select Save from the File main menu. In this phase of the tutorial, you do not
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. The Deploy Properties window appears.
3-6
Invoking an Asynchronous Service to Receive the Supplier Price for the Order
5.
Increment the version number of the project (for example, enter 1.1) and click OK. When you access Oracle BPEL Console, a new version of the OrderBooking process appears, along with the phase 1 OrderBooking process version you created in "Validating, Compiling, and Deploying the Order Booking Process" on page 2-14. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears. Note that two versions of the OrderBooking process appear: 1.0 and 1.1. Version 1.0 is the default version, so an asterisk appears to the right.
2. 3.
Click the OrderBooking version you increased in Step 5 on page 3-7 (for this example, (v. 1.1)) in the Deployed BPEL Processes list. Enter details in all fields of the HTML Form. You can also use a text editor to copy and paste these details from the contents of the OrderBookingPO_1.xml file you copied into the OrderBooking directory in Step 1 on page 2-3:
Note: Do not copy and paste from Internet Explorer or Mozilla
Select XML Source from the Initiating a test instance list. Copy and paste the contents of OrderBookingPO_1.xml into the field that appears.
Click Post XML Message. The BPEL Processes tab displays a message similar to the following:
Test Instance Initiated
5. 6.
Click the Instances tab at the top. Verify that the OrderBooking, CreditRatingService, and RapidDistributors instances were created. All should appear in the Instance list. The Last Modified list displays the times at which they were created. Click the instances. Click the Audit and Flow links to follow the instance execution process. Click More to the right of receiveRD under the Audit link for the OrderBooking instance to see the returned supplier price (returned in the variable receiveRD_ onResult_InputVariable).
7. 8. 9.
3-7
Summary
10. Verify other process states and variable values at different stages.
price of 5000.
Summary
You have now built a simple asynchronous BPEL process that received a supplier price for an order from a service. You performed the following key tasks:
Deployed an asynchronous Rapid Distributors service. Created a partner link to interact with the Rapid Distributors service. Designed the BPEL process to invoke the Rapid Distributors service. Deployed the BPEL process. Ran the deployed BPEL process from Oracle BPEL Console by completing and submitting an order form to the Rapid Distributors service. Since the Rapid Distributors service was an asynchronous service, an extended time interval between the external service request and response is possible. Reviewed the supplier price returned from the Rapid Distributors supplier service to the client.
3-8
4
Adding Parallel Flow
This chapter of the tutorial describes how to build parallel flow logic to call another asynchronous service for receiving a supplier price. This chapter contains the following topics:
Introduction
This phase of the tutorial adds to the OrderBooking process you designed in Chapter 3, "Invoking an Asynchronous Service". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you build parallel flow logic to call the asynchronous BPEL process to receive supplier prices from two services for a client order. You perform the following key tasks:
Create a partner link to interact with a second asynchronous service (Select Manufacturing). Design parallel flow logic to call the two services (Rapid Distributors and Select Manufacturing). Design the BPEL process to invoke the Select Manufacturing service. Deploy the BPEL process. Run the deployed BPEL process from Oracle BPEL Console by completing and submitting an order form that is sent in parallel to the Rapid Distributors service and the Select Manufacturing service. Access the Select Manufacturing URL to manually submit a supplier price (the Rapid Distributors price is automated). Wait for both services to return price results. Review the supplier prices returned from the Rapid Distributors service and the Select Manufacturing service.
Starting and Testing Your Services Creating a Select Manufacturing Partner Link
Adding Parallel Flow 4-1
Creating a Flow Activity Creating Invoke and Receive Activities Creating an Assign Activity Validating, Compiling, and Deploying the Order Booking Process Running the Order Booking Process
Access the Select Manufacturing user application using Internet Explorer or Mozilla Firefox to see if it is deployed:
http://localhost:9700/SelectManufacturingUI
Return to JDeveloper BPEL Designer. Ensure that Process Activities is selected in the drop-down list of the Component Palette section. Drag and drop a PartnerLink activity onto the left side of the designer window (below the Partner Links header and above the client partner link).
4.
Enter the following values to create a partner link for the Select Manufacturing service:
Note: For the WSDL File field below, click the flashlight (the second icon from the left named WSIL Browser) to access the WSDL Chooser window for automatically selecting the Select Manufacturing service deployed in "Starting and Testing Your Services" on page 3-2.
4-2
Value SelectManufacturing Access this URL by clicking the WSIL Browser flashlight icon and expanding and selecting LocalBPELServer > processes > default > SelectManufacturing. http://localhost:9700/orabpel/default/SelectManufacturing/SelectMan ufacturing?wsdl See Also: "Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences" on page 1-5 if you receive a parsing error when attempting to add a WSDL file in the WSDL Chooser window.
You now create a Flow activity into which you place Invoke and Receive activities for both the Rapid Distributors and Select Manufacturing suppliers. A Flow activity is required to invoke the two suppliers in parallel. The orders line items are passed to the two suppliers for their price quotes.
1.
Drag and drop a Flow activity from the Component Palette section to below the GetCreditRating Scope activity.
2. 3. 4. 5.
Double-click the diamond to display the Flow window. Enter GetPriceQuote in the Name field. Click OK. Drag and drop the following activities that you created in Chapter 3, "Invoking an Asynchronous Service" into the right panel of the GetPriceQuote Flow activity. Drag each activity one at a time and place them in the following order.
4-4
6.
Drag and drop an Invoke activity from the Component Palette section into the left panel of the GetPriceQuote Flow activity.
2. 3.
Double-click the Invoke icon to display the Invoke window. Enter the following details:
Value invokeSM SelectManufacturing
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 invokeSM_initiate_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of SelectManufacturingRequestMessage.
6. 7.
Click OK. Drag and drop a Receive activity below the invokeSM Invoke activity you just created.
8. 9.
Double-click the Receive icon to display the Receive window. Enter the following details:
Value receiveSM SelectManufacturing
4-6
creation icon.
11. Click OK on the Create Variable window that appears.
A variable named receiveSM_onResult_InputVariable is automatically created in the Variable field. This variable is automatically assigned a message type of SelectManufacturingResponseMessage.
12. Click OK. 13. Select Save from the File main menu.
Drag and drop an Assign activity from the Component Palette section into the left panel of the GetPriceQuote Flow activity and above the invokeSM Invoke activity.
2. 3. 4. 5. 6. 7. 8.
Double-click the assign icon to display the Assign window. Click the General tab. Enter assignSMIn in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
Field From
Value
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderItems Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
To
Type Variables
Variable Expand and select Variables > invokeSM_initiate_InputVariable > payload > ns1:OrderItems
9.
Click OK to close the Create Copy Rule window and the Assign window. The designer window looks as follows:
10. Click the - sign to close the GetPriceQuote Flow activity. In this phase of the
tutorial, you do not create an additional Assign activity to explicitly copy the received data of invokeSM_initiate_InputVariable into another variable.
11. Select Save from the File main menu.
4-8
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. Increment the version number again of the project when prompted and click OK (for example, enter 1.2). This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears.
2. 3.
Click the OrderBooking version you increased in Step 5 on page 4-9 in the Deployed BPEL Processes list. Enter details in all fields of the HTML Form. You can also use a text editor to copy and paste these details from the contents of the OrderBookingPO_1.xml file:
Note: Do not copy and paste from Internet Explorer or Mozilla
a. b. 4.
Select XML Source from the Initiating a test instance list. Copy and paste the contents of OrderBookingPO_1.xml into the field that appears.
Click Post XML Message. The BPEL Processes tab displays a message similar to the following:
Test Instance Initiated
5. 6.
Click the Instances tab at the top. Verify that the OrderBooking, CreditRatingService, TaskManager, SelectManufacturing, and RapidDistributors instances were created. All should appear in the Instance list. The Last Modified list displays the times at which they were created. The CreditRatingService and RapidDistributors instances complete relatively faster, since they are automated services. SelectManufacturing is running and awaiting user input to complete. This is defined in the TaskManager service, which is also awaiting completion. Click the OrderBooking instance you increased in Step 5 on page 4-9 in the Instance list. A message appears stating the following:
The state of this instance is Active
7.
8.
Click the Audit link to follow the instance execution process. Note that the SelectManufacturing service is pending. The RapidDistributors service has completed. Click the Flow link. Note that the parallel flow logic has completed on the RapidDistributors branch and is waiting on the SelectManufacturing branch (highlighted below).
9.
To access this part of the activity, present it to the user for pricing, and accept the user data for task completion and process continuation, you must invoke the task from your browser. The sample JSP pages and user presentation are prebuilt for you and deployed as SelectManufacturingUI. The JSP page displays a list of tasks waiting for user action.
4-10
Summary
10. Access the prebuilt JSP Select Manufacturing application using Internet Explorer
or Mozilla Firefox.
http://localhost:9700/SelectManufacturingUI 11. Click the order under Title.
12. Provide a price in the Price field, and click Quote. This sends a form submit
message on a JSP and completes the task. After processing, a message appears saying that the task has completed.
13. Return to Oracle BPEL Console. 14. Click the Instances tab at the top. 15. Click the OrderBooking instance.
Summary
You have now built parallel flow logic to call the asynchronous BPEL process to receive supplier prices from two services for a client order. You performed the following key tasks:
Created a partner link that interacted with a second asynchronous service (Select Manufacturing). Designed parallel flow logic that called the two services (Rapid Distributors and Select Manufacturing). Designed the BPEL process to invoke the Select Manufacturing service. Deployed the BPEL process. Ran the deployed BPEL process from Oracle BPEL Console by completing and submitting an order form that was sent in parallel to the Rapid Distributors service and the Select Manufacturing service. Accessed the Select Manufacturing URL to manually submit a supplier price (the Rapid Distributors price was automated and did not require a manual submittal). Waited for both services to return price results. Reviewed the supplier price returned from the Rapid Distributors service and the Select Manufacturing service.
Summary
4-12
5
Adding Conditional Branching Logic
This chapter of the tutorial describes how to build conditional branching logic. This chapter contains the following topics:
Introduction Adding Conditional Branching Logic to the Order Booking Tutorial Summary
Introduction
This phase of the tutorial adds to the OrderBooking process you designed in Chapter 4, "Adding Parallel Flow". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you build conditional branching logic to select the lowest priced supplier. You perform the following key tasks:
Design conditional branching logic to select the lower price from the two services (Rapid Distributors and Select Manufacturing). Deploy the BPEL process. Run the deployed BPEL process from Oracle BPEL Console by completing and submitting an order form that is sent in parallel to the Rapid Distributors service and the Select Manufacturing service. Access the Rapid Distributors URL to manually submit a supplier price. Review the lower of the two supplier prices returned from the Rapid Distributors service and the Select Manufacturing service.
Creating a Switch Activity Creating an Assign Activity Under the Case Block for the Rapid Distributors Service Creating an Assign Activity Under the Otherwise Block for the Select Manufacturing Service Validating, Compiling, and Deploying the Order Booking Process Running the Order Booking Process
5-1
Drag and drop a Switch activity from the Component Palette section to below the GetPriceQuote Flow activity. Double-click the question mark for the Switch activity to display the Switch window. Enter SelectSupplier in the Name field. Click OK. Double-click <case> to display the Switch Case window. Enter the following expression in the Name field:
Is the Rapid Distributors price less than the Select Manufacturing price?
7.
Press Ctrl and then the space bar in the Expression field to display a list for selecting (double-clicking) the following syntax. Edit 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.
bpws:getVariableData('receiveRD_onResult_ InputVariable','payload','/ns1:SupplierInfo/ns1:SupplierPrice') < bpws:getVariableData('receiveSM_onResult_ InputVariable','payload','/ns1:SupplierInfo/ns1:SupplierPrice')
8. 9.
Creating an Assign Activity Under the Case Block for the Rapid Distributors Service
Summary: This Assign activity assigns the Rapid Distributors supplier to the supplier part of the input purchase order variable.
1. 2. 3. 4. 5. 6. 7. 8.
Drag and drop an Assign activity from the Component Palette section under the <case> section of the SelectSupplier Switch activity. Double-click the Assign activity. Click the General tab. Enter SelectRapidDistributors in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
5-2
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 From
Value
Type Expression
Expression concat(bpws:getVariableData('inputVariable','payload','/ns1:Purchase Order/ns1:OrderInfo/ns1:OrderComments'), - Selected: Rapid Distributors') Note: Press Ctrl and then the space bar to display a list for selecting (double-clicking) this syntax. The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear. Remove any trailing forward slashes (/) that appear at the end.
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments
9.
10. Click the Copy Rules tab. 11. Click Create to display the Create Copy Rule window. 12. Enter the following details to create a second statement: Field From
Value
Type Variables
Variable Expand and select Variables > receiveRD_onResult_InputVariable > payload > ns1:SupplierInfo Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:SupplierInfo
13. Click OK to close the Create Copy Rule window and the Assign window. 14. Select Save from the File main menu.
5-3
Creating an Assign Activity Under the Otherwise Block for the Select Manufacturing Service
Summary: This Assign activity assigns the Select Manufacturing supplier to the supplier part of the input purchase order variable.
1. 2. 3. 4. 5. 6. 7. 8.
Drag and drop an Assign activity from the Component Palette section under the <otherwise> section of the SelectSupplier Switch activity. Double-click the Assign activity. Click the General tab. Enter SelectManufacturing in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
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 From
Value
Type Expression
Expression concat(bpws:getVariableData('inputVariable','payload','/ns1:Purchase Order/ns1:OrderInfo/ns1:OrderComments'), - Selected: SelectManufacturing') Note: Press Ctrl and then the space bar to display a list for selecting (double-clicking) this syntax. The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear. Remove any trailing forward slashes (/) that appear at the end.
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments
9.
10. Click the Copy Rules tab. 11. Click Create to display the Create Copy Rule window. 12. Enter the following details to create a second statement:
5-4
Field From
Value
Type Variables
Variable Expand and select Variables > receiveSM_onResult_InputVariable > payload > ns1:SupplierInfo Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:SupplierInfo
13. Click OK to close the Create Copy Rule window and the Assign window.
14. Click the - sign next to the diamond to close the Switch activity. 15. Select Save from the File main menu.
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. Increment the version number of the project when prompted and click OK (for example, enter 1.3). This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
5-5
Summary
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears.
2.
Start the OrderBooking instance version you increased in Step 5 on page 5-5 in one of the following ways:
Open the CreateOrderBookingUI application at http://localhost:9700/CreateOrderBookingUI and provide inputs to initiate a process. Click OrderBooking in the Deployed BPEL Processes list and enter details in all fields of the HTML Form and click Post XML Message. Click OrderBooking in the Deployed BPEL Processes list and select XML Source from the Initiating a test instance list. 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. The BPEL Processes tab displays a message similar to the following:
Test Instance Initiated 3. 4. 5. 6.
Complete the manual price quote task for SelectManufacturing by using the graphical user interface JSP page, as described in Step 10 on page 4-11. Return to Oracle BPEL Console. Click the Instances tab at the top. Verify that the OrderBooking, CreditRatingService, TaskManager, SelectManufacturing, and RapidDistributors instances were created. All should appear in the Instance list. The Last Modified list displays the times at which they were created. Click the instances. Click the Audit link to follow the instance execution process. Click the More... link for each sequence to view the activity details. execution path of the condition logic. (Similar instance management can also be obtained in a graphical fashion under the Flow link.)
7. 8. 9.
10. Verify the results of conditional branching, the value of the price quote, and the
Summary
You have now built conditional branching logic to select the lowest priced supplier. You performed the following key tasks:
Designed conditional branching logic to select the lower price from the two services (Rapid Distributors and Select Manufacturing). Deployed the BPEL process.
5-6
Summary
Ran the deployed BPEL process from Oracle BPEL Console by completing and submitting an order form that was sent in parallel to the Rapid Distributors service and the Select Manufacturing service. Accessed the Rapid Distributors URL to manually submit a supplier price. Reviewed the lower of the two supplier prices returned from the Rapid Distributors service and the Select Manufacturing service. After the two supplier services (Rapid Distributors and Select Manufacturing) returned with a price quote, a conditional branching decision was taken to select the lowest priced supplier.
5-7
Summary
5-8
6
Creating Fault Handling and Exception Management
This chapter of the tutorial describes how to build fault handling and exception management capabilities to catch exceptions. This chapter contains the following topics:
Introduction
This phase of the tutorial adds to the OrderBooking process you designed in Chapter 5, "Adding Conditional Branching Logic". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you build fault handling and exception management capabilities to identify a bad credit history. You perform the following key tasks:
Design fault handling and exception management capabilities. Deploy the BPEL process. Run the deployed BPEL process from Oracle BPEL Console and submit an invalid social security card number to the Credit Rating service to check the clients credit history. Review the credit rating results returned from the Credit Rating service to the client to see if the invalid social security number is identified.
Creating a Catch All Branch in the Scope Activity Validating, Compiling, and Deploying the Order Booking Process Running the Order Booking Process
2.
Click Add Catch All Branch in the icons (third from the top) on the left side of GetCreditRating.
A new box displays to the right with the words Drop Activity Here.
3. 4. 5. 6. 7. 8. 9.
Drag and drop an Assign activity from the Component Palette section into the Catch branch you just created. Double-click the assign icon to display the Assign window. Click the General tab. Enter assignZeroCR in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. You now create two fault handling rules.
Value
Type Expression
Expression '0'
To
Type Variables
Variable Expand and select Variables > invokeCR_process_OutputVariable > payload > ns1:rating Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
11. Click OK. 12. Click the Copy Rules tab. 13. Click Create to again display the Create Copy Rule window. 14. Enter the following details to create a second statement: Field From
Value
Type Expression
To
Type
Variable
6-2
Field
Value Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments
Variables
15. Click OK to close the Create Copy Rule window and the Assign window.
16. Click the - sign to close the Scope activity. 17. Select Save from the File main menu.
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. Increment the version number of the project when prompted and click OK (for example, enter 1.4). This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears.
2.
Start the OrderBooking instance version you increased in Step 5 on page 6-3 in one of the following ways:
Summary
Click OrderBooking in the Deployed BPEL Processes list. Enter a nine-digit integer value that begins with zero in the CustID field of the HTML Form and click Post XML Message to post a message. This action invokes an exception in the Credit Rating service. Open the provided CreateOrderBookingUI application at http://localhost:9700/CreateOrderBookingUI and provide inputs to initiate a process. Ensure that you overwrite the default value with zero in the CustID field.
Complete the manual price quote task for SelectManufacturing by using the graphical user interface JSP page, as described in Step 10 on page 4-11. Return to Oracle BPEL Console. Click the Instances tab at the top. Verify that the OrderBooking instance was created. The instance should appear in the Instance list. The Last Modified list displays the time at which the instance was created. Click the OrderBooking instance. Click the Audit link to follow the instance execution process. Observe that the steps were executed and the exception was caught and handled in the process flow. Inside the scope block, a bad credit exception was raised, the exception was processed in the exception block, a default value of 0 was assigned, and processing continued.
7. 8. 9.
Summary
You have now built fault handling and exception management capabilities to catch exceptions in the Credit Rating service. You performed the following key tasks:
Designed fault handling and exception management capabilities in the BPEL process. Deployed the BPEL process. Ran the deployed BPEL process from Oracle BPEL Console and deliberately submitted an invalid social security card number to the Credit Rating service to check the clients credit history.
6-4
Summary
Reviewed the credit rating results returned from the Credit Rating service to the client. The invalid social security card number that you entered invoked the fault handling and exception management capabilities that you designed. A bad credit history message was returned to the client. The BPEL process was terminated before the Rapid Distributors and Select Manufacturing services were invoked.
Summary
6-6
7
Adding Transformation Logic
This chapter of the tutorial describes how to add transformation logic to a BPEL process. This chapter contains the following topics:
Introduction
This phase of the tutorial adds to the process you designed in Chapter 6, "Creating Fault Handling and Exception Management". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you add transformation logic to a new BPEL process. You perform the following key tasks:
Create a new BPEL process named POAcknowledge. Design the BPEL process to add transformation logic to transform incoming purchase order data into outgoing purchase order acknowledgement data. Test the transformation logic. This is a standalone test, and does not involve designing or deploying the complete process. You simply build and test the transformation logic from JDeveloper BPEL Designer.
Creating a POAcknowledge Project Importing Schema Files Creating a Transform Activity Testing the Transformation Logic
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. 2. 3. 4. 5.
Right-click OrderBookworkspace in the Applications Navigator section of the designer window. Select New Project. Double-click BPEL Process Project in the Items window to display the BPEL Process Project window. Enter POAcknowledge in the BPEL Process Name field. All other fields default to the correct values for creating an asynchronous BPEL process. Click OK. This creates the bpel.xml, POAcknowledge.bpel, and POAcknowledge.wsdl files in the Applications Navigator section of the designer window.
Copy OrderBookingPO.xsd and POAcknowledge.xsd from the Oracle_ Home\integration\orabpel\samples\tutorials\127.OrderBookingTu torial\PracticeFiles directory to the Oracle_ Home\integration\jdev\jdev\mywork\OrderBookworkspace\POAcknow ledge directory. Double-click POAcknowledge.bpel in the Applications Navigator section of the designer window to display the Structure section in the lower left section of JDeveloper BPEL Designer. Select and right-click Project Schemas in the Structure section of the designer window. Select Import Schema. The Import Schema window appears.
2.
3. 4.
5. 6.
Click the flashlight icon to access the Open window. Select OrderBookingPO.xsd from the POAcknowledge directory in which you placed it in Step 1 on page 7-2 and click Open. The file is added to the URL field of the Import Schema window.
7. 8.
Click OK. Verify that OrderBookingPO.xsd appears under POAcknowledge > Web Content > Miscellaneous Files in the Applications Navigator section of the designer window. OrderBookingPO.xsd also appears under Project Schemas in the Structure section. Select Save from the File main menu. POAcknowledgeRequestMessage > payload in the Structure section.
9.
10. Expand Message Types > Process WSDL - POAcknowledge.wsdl > 11. Right-click payload and select Edit Message Part to display the Edit Message Part
window.
12. Select Element and click the flashlight icon to the right of the Element field. 7-2 Oracle BPEL Process Manager Order Booking Tutorial
13. Expand Project Schema Files > OrderBookingPO.xsd. 14. Select PurchaseOrder. 15. Click OK to close the Type Chooser window and the Edit Message Part window.
window.
17. Select Import Schema.
placed it in Step 1 on page 7-2 and click Open. The file is added to the URL field of the Import Schema window.
20. Click OK. 21. Verify that POAcknowledge.xsd appears under POAcknowledge > Web Content
> Miscellaneous Files in the Applications Navigator section of the designer window. POAcknowledge.xsd also appears under Project Schemas in the Structure section.
22. Select Save from the File main menu. 23. Expand Message Types > Process WSDL - POAcknowledge.wsdl >
window.
25. Select Element and click the flashlight icon to the right of the Element field. 26. Expand Project Schema Files > POAcknowledge.xsd. 27. Select POAcknowledge. 28. Click OK to close the Type Chooser window and the Edit Message Part window. 29. Select Save from the File main menu.
You now use a Transform activity to create a transformation that maps incoming purchase order data into outgoing purchase order acknowledgement data.
1. 2. 3. 4. 5. 6.
Drag and drop a Transform activity between the receiveInput Receive activity and the callbackClient Invoke activity. Double-click the Transform activity. Click the General tab. Enter transformPO in the Name field. Click the Transformation tab to display the Transformation window. Select inputVariable in the Source Variable field (this automatically selects payload in the Source Part field).
7. 8. 9.
Select outputVariable in the Target Variable field (this automatically selects payload in the Target Part field). Leave the Mapper File field selection as Transformation_1. Click the second icon (the Create Mapping icon) to the right of the Mapper File field.
A 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
11. Drag and drop the following source elements to the following target elements. As
you perform this task, a line connects each source to its target.
Note: The namespace values that appear for the source (for example,
ns1, po) can vary. Use the namespace values that automatically appear.
7-4
To the Target... ShippingAddress Note: Click OK when prompted to confirm your mapping. Connecting this source and target automatically connects all subelements.
Note: If you drag and drop a source element to the wrong target
the concat function. This connects two source lines to the concat function.
16. Go to the ShippingAddress target section. 17. Drag the Name target element 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.
18. Drag and drop another concat function into the middle of the transformation
the concat function. This connects two source lines to the concat function.
21. Go to the BillingAddress target section. 22. Drag the Name target element 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.
23. Select and right-click the target Items. This displays a list of XSL functions.
7-6
subelements.
This defines a relationship that specifies a one-to-many (1:M) mapping between the source and target.
29. Drag and drop the remaining source purchase order elements to the target
Right-click in the transformation mapping window and select Test. This displays the Test XSL Map window.
2.
Select Generate to create sample XML test data. Test data appears in the upper left corner in the Source XML section.
3.
Click Test at the bottom right to test the translation logic. Sample test results appear in the upper right corner in the Target XML section.
4. 5. 6. 7.
Verify the results. Click Close to close the test window. Click Yes if prompted to save your transformation details. Close the Transformation window by clicking the x button on the Title tab.
7-8
Summary
A translation file named Transformation_1.xsl appears under POAcknowledge > Integration Content in the Applications Navigator section.
Summary
You have now added transformation logic to a BPEL process. You performed the following key tasks:
Created a new BPEL process named POAcknowledge. Designed the BPEL process to add transformation logic that transformed incoming purchase order data into outgoing purchase order acknowledgement data. Tested the transformation logic and reviewed the results. You did not design or deploy the complete process. That comes in later phases of this tutorial.
Summary
7-10
8
Using the File Adapters Read Functionality
This chapter of the tutorial describes how to add a file adapter to read data from a file and call the OrderBooking BPEL process as an external service. This chapter contains the following topics:
Introduction Designing the File Adapters Read Functionality to Activate a BPEL Process Summary
Introduction
This phase of the tutorial adds to the process you designed in Chapter 7, "Adding Transformation Logic". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you add a file adapter to read data from a file and call the previously created OrderBooking BPEL process as a service. You perform the following key tasks:
Create a new BPEL process named BatchOrderProcessing. Create a partner link that uses the file adapter (named FileReadAdapter) to read and then delete files from a directory (in this case, an incoming purchase order). Create a partner link with which to interact (in this case, the OrderBooking BPEL process you previously designed is now used as a service). Design the BPEL process to invoke both OrderBooking and FileReadAdapter. Deploy the BatchOrderProcessing BPEL process. Run the deployed BPEL process from Oracle BPEL Console. Place a file in a directory and observe that the file is read and then deleted after OrderBooking returns a response.
Creating a Batch Order Booking Process Creating a Partner Link that Uses the File Read Functionality of the File Adapter Creating an Order Booking Partner Link Creating Receive and Invoke Activities
Creating an Assign Activity Validating, Compiling, and Deploying the Order Process Running and Verifying the Order Process
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. 2. 3. 4. 5.
Right-click OrderBookworkspace in the Applications Navigator section of the designer window. Select New Project. Double-click BPEL Process Project in the Items window to display the BPEL Process Project window. Enter BatchOrderProcessing in the BPEL Process Name field. Select Empty BPEL Process from the Template list.
Note: Ensure that you select Empty BPEL Process from the
Template list. This project is different from previous projects that you created.
6. 7.
Ensure that the Use Default check box is selected. Click OK. This creates the bpel.xml, BatchOrderProcessing.bpel, and BatchOrderProcessing.wsdl files in the Applications Navigator section of the designer window.
8.
Copy OrderBookingPO.xsd and OrderBookingPO_1.xml from the Oracle_ Home\integration\orabpel\samples\tutorials\127.OrderBookingTu torials\PracticeFiles directory to the Oracle_ Home\integration\jdev\jdev\mywork\OrderBookworkspace\BatchOrd erProcessing directory. Double-click BatchOrderProcessing.bpel in the Applications Navigator section of the designer window to display the Structure section in the lower left section of the designer window.
9.
10. Select and right-click Project Schemas in the Structure section. 11. Select Import Schema.
8-2
you placed it in Step 8 on page 8-2 and click Open. The file is added to the URL field of the Import Schema window.
14. Click OK. 15. Verify that OrderBookingPO.xsd appears under BatchOrderProcessing > Web
Content > Miscellaneous Files in the Applications Navigator section of the designer window. OrderBookingPO.xsd also appears under Project Schemas in the Structure section.
Creating a Partner Link that Uses the File Read Functionality of the File Adapter
Summary: You now create a partner link that uses the file adapter in the inbound direction. You configure the file adapter to check a specific directory every 15 seconds for files with a specified extension. This partner link serves as the input point for the process, and reads the files and provides input data (create instance) to the process.
1. 2. 3. 4.
Ensure that Process Activities is selected in the drop-down list of the Component Palette section. Drag and drop a PartnerLink activity onto the right side of the designer window. Enter FileReadAdapter in the Name field. Click the third icon at the top (the Define Adapter Service icon). This starts the Adapter Configuration Wizard.
5. 6. 7. 8. 9.
Click Next on the Welcome window. Select File Adapter on the Adapter Type window and click Next. Enter FileRead in the Service Name field on the Service Name window and click Next. Select Read File as the Operation Type on the Operation window and click Next. Note that the Operation Name field is automatically filled in with Read. Select Directory Names are Specified as Physical Path.
10. Click Browse next to the Directory for Incoming Files (physical path) field. 11. Select the directory from which to read files (drive_letter:\temp on Windows
operating systems or /temp on UNIX operation systems). You must create this directory with the correct permissions if it does not exist.
12. Click Select. 13. Ensure that the Archive processed files check box is not selected. 14. Click Next. 15. Enter OrderBooking*.xml in the Include Files with Name Pattern field. This
convention specifies that any input files with this pattern are selected for processing.
16. Click Next. 17. Enter 15 seconds in the Polling Frequency field. 18. Ensure that the Delete files after successful retrieval check box is selected. 19. Click Next. 20. Click Browse next to the Schema File URL field on the Messages window to
The Schema File URL field (OrderBookingPO.xsd) and the Schema Element field (PurchaseOrder) are filled in.
23. Click Next. 24. Click Finish.
You are returned to the Partner Link window. All other fields are automatically completed. The window looks as follows:
Field Name WSDL File Value FileReadAdapter file:/c:/oraBPEL/integration/jdev/jdev/mywork/OrderBookworkspace/ BatchOrderProcessing/FileRead.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. Partner Link Type My Role Partner Role 25. Click OK. 26. Select Save from the File main menu. Read_plt Read_role Leave unspecified.
Note that FileRead.wsdl now appears under BatchOrderProcessing > Integration Content. This file contains the parameters you specified with the Adapter Configuration Wizard.
Drag and drop a PartnerLink activity from the Component Palette section onto the right side of the designer window. 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 WSIL Browser) to access the WSDL Chooser window for automatically selecting the OrderBooking service.
8-4
Value OrderBooking Access this URL by clicking the WSIL Browser flashlight icon and expanding and selecting LocalBPELServer > processes > default > OrderBooking http://localhost:9700/orabpel/default/OrderBooking/OrderBooking?w sdl See Also: "Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences" on page 1-5 if you receive a parsing error when attempting to add a WSDL file in the WSDL Chooser window.
Drag and drop a Receive activity from the Component Palette section into the designer window. Because you created an empty BPEL process in "Creating a Batch Order Booking Process" on page 8-2, the designer window does not include or require the receiveInput Receive and callbackClient Invoke activities that are automatically created with an asynchronous BPEL process. Double-click the Receive icon to display the Receive window. Enter the following details:
Value receive_FileIn FileReadAdapter Select this check box.
2. 3.
Click the first icon to the right of the Variable field. This is the automatic variable creation icon. Click OK on the Create Variable window that appears. A variable named receive_FileIn_Read_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of FileReadPurchaseOrder_msg.
6. 7.
Ensure that you selected the Create Instance check box, as mentioned in Step 3. Click OK.
8. 9.
Drag and drop an Invoke activity from the Component Palette section to below the receive_FileIn Receive activity. Double-click the Invoke icon to display the Invoke window.
10. Enter the following details: Field Name Partner Link Value invoke_OrderBooking OrderBooking
A variable named invoke_OrderBooking_initiate_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of OrderBookingRequestMessage.
13. Click OK. 14. Select Save from the File main menu.
Drag and drop an Assign activity from the Component Palette section to below the receive_FileIn Receive activity. Double-click the assign icon to display the Assign window. Click the General tab. Enter assignOrder in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
Value
Field From
Type Variables
To
Type
Variable
8-6
Field
Value Expand and select Variables > invoke_OrderBooking_initiate_ InputVariable > payload
Variables
9.
Click OK to close the Create Copy Rule window and the Assign window.
Go to the Applications Navigator section. Right-click BatchOrderProcessing. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears. Note that your BPEL process, BatchOrderProcessing and a series of subprocesses on which it depends, now appears in the Deployed BPEL Processes list.
2.
Copy the OrderBookingPO_1.xml file from the Oracle_ Home\integration\jdev\jdev\mywork\OrderBookworkspace\BatchOrd erProcessing directory to the directory you specified in Step 11 on page 8-3 (drive_letter:\temp on Windows operating systems or /temp on Unix operation systems). Refresh Oracle BPEL Console after allowing the polling frequency of 15 seconds that you set in Step 17 on page 8-4 to elapse. After the process starts, the file is
3.
Summary
read, deleted (if reading was successful), and sent to the OrderBooking process. Processing completes after OrderBooking returns a response.
4. 5. 6. 7. 8. 9.
Complete the manual price quote task for SelectManufacturing by using the graphical user interface JSP page, as described in Step 10 on page 4-11. Return to Oracle BPEL Console. Click the Instance tab at the top. Refresh Oracle BPEL Console and observe process instance creation and completion. Click the instance. Click the Audit link and click through other instances (of subprocesses) and follow the execution. management can also be obtained in a graphical fashion under the Flow link.)
10. Click the More link for each sequence to view the activity details. (Similar instance
Summary
You have now added a file adapter to read data from a file and call the previously created OrderBooking BPEL process as a service. You performed the following key tasks:
Created a new BPEL process named BatchOrderProcessing. Created a partner link that used the file adapter (named FileReadAdapter) to read and then delete files from a directory (in this case, an incoming purchase order). Created a partner link with which to interact (in this case, the OrderBooking BPEL process you previously designed is now used as a service). Designed the BPEL process to invoke both OrderBooking and FileReadAdapter. Deployed the BatchOrderProcessing BPEL process. Ran the deployed BPEL process from Oracle BPEL Console. Placed a file in a directory and observed that the file was read and then deleted after OrderBooking returned a response.
8-8
9
Using the File Adapters Write Functionality
This chapter of the tutorial describes how to add write functionality to the file adapter to accept input data in the form of a purchase order. This chapter contains the following topics:
Introduction Designing the File Adapters Write Functionality to Write the Order Acknowledgment Summary
Introduction
This phase of the tutorial adds to the process you designed in Chapter 8, "Using the File Adapters Read Functionality". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you add write functionality to the file adapter and use the transformation logic you designed in Chapter 7, "Adding Transformation Logic". You perform the following key tasks:
Return to the POAcknowledge BPEL process and create a partner link (named FileOutInbound) that uses the file adapter to write files to a directory (in this case, an outgoing purchase order acknowledgment). Design POAcknowledge to invoke FileOutInbound. Deploy POAcknowledge. Return to the OrderBooking BPEL process and create a partner link (named WritePOA) that interacts with POAcknowledge. Design OrderBooking to invoke WritePOA. Deploy the OrderBooking BPEL process. Run OrderBooking from Oracle BPEL Console by completing and submitting an order form to the Rapid Distributors and Select Manufacturing services. Copy the purchase order file to be read to a directory. Access the Rapid Distributors URL to manually submit a supplier price. Observe that the purchase order file is deleted and a purchase order acknowledgement file is written to the directory. Observe that the contents of the incoming purchase order file are transformed into an outgoing purchase order acknowledgement.
9-1
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
This section contains these tasks:
Creating a Partner Link that Uses the File Write Functionality of the File Adapter Creating an Invoke Activity Creating an Assign Activity Deploying the POAcknowledge Service Running and Verifying the POAcknowledge Process Creating a Partner Link Creating a Scope Activity Creating Invoke and Receive Activities Creating an Initial Assign Activity Creating a Second Assign Activity Validating, Compiling, and Deploying the Order Booking Process Running and Verifying the Order Booking Process
Creating a Partner Link that Uses the File Write Functionality of the File Adapter
Summary: You now create a partner link that uses the file adapter in the outbound direction. You configure the file adapter to write a file to a specified directory. In this phase, you work from the POAcknowledge project.
1. 2. 3. 4. 5.
Click the POAcknowledge project in the Applications Navigator section of the designer window. Double-click POAcknowledge.bpel. Drag and drop a PartnerLink activity from the Component Palette section onto the right side of the designer window. Enter FileOutbound in the Name field. Click the third icon at the top (the Define Adapter Service icon). This starts the Adapter Configuration Wizard.
6. 7. 8. 9.
Click Next on the Welcome window. Select File Adapter on the Adapter Type window and click Next. Enter FileWrite in the Service Name field on the Service Name window and click Next. Select Write File as the Operation Type on the Operation window and click Next. Note that the Operation Name field is automatically filled in with Write.
9-2
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
11. Click Browse next to the Directory for Outgoing Files (physical path) field. 12. Select the directory in which to create files (drive_letter:\temp on Windows
operating systems or /temp on Unix operation systems). You must create this directory with the correct permissions if it does not exist.
13. Click Select. 14. Enter po_%yyMMddHHmmss%.xml in the File Naming Convention field. 15. Unselect the Number of Messages Equal, Elapsed Time Exceeds, and File Size
The Schema File URL field (POAcknowledge.xsd) and the Schema Element field (POAcknowledge) are filled in.
19. Click Next. 20. Click Finish.
You are returned to the Partner Link window. All other fields are automatically completed. The window looks as follows:
Field Name WSDL File Value FileOutbound file:/c:/oraBPEL/integration/jdev/jdev/mywork/OrderBookworkspace/ POAcknowledge/FileWrite.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. Partner Link Type My Role Partner Role 21. Click OK. 22. Select Save from the File main menu. Write_plt Leave unspecified. Write_role
Note that FileWrite.wsdl now appears under POAcknowledge > Integration Content. This file contains the parameters you specified with the Adapter Configuration Wizard.
This Invoke activity writes order acknowledgment data results into a file.
1. 2.
Drag and drop an Invoke activity from the Component Palette section to below the transformPO Transform activity. Double-click the Invoke icon to display the Invoke window.
9-3
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
3.
Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon. Click OK on the Create Variable window that appears. A variable named invokeFileOut_write_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of FileWritePOAcknowledge_msg.
6. 7.
Drag and drop an Assign activity from the Component Palette section to above the invokeFileOut Invoke activity. Double-click the assign icon to display the Assign window. Click the General tab. Enter assignFileWriteIn in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following values:
Value
Field From
Type Variables
To
Type Variables
9.
Click OK to close the Create Copy Rule window and the Assign window.
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
3. 4.
Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears. Note that your BPEL process, POAcknowledge, now appears in the Deployed BPEL Processes list.
2. 3. 4. 5. 6. 7. 8.
Click POAcknowledge. Enter details in all fields of the HTML Form and click Post XML Message. Refresh Oracle BPEL Console. Click the Instances tab. Click the POAcknowledge instance. Click the Audit link to view the transformation logic. View the output file written in the directory you selected in Step 12 on page 9-3 (drive_letter:\temp on Windows operating systems or /temp on Unix operation systems).
Expand the OrderBooking process in the Applications Navigator section. Double-click OrderBooking.bpel. Drag and drop a PartnerLink activity from the Component Palette section onto the right side of the designer window. Enter the following values to create a partner link for the OrderBooking process:
Note: For the WSDL File field below, click the flashlight (the second icon from the left named WSIL Browser) to access the WSDL Chooser window for automatically selecting a purchase order acknowledgment service.
Field Name
Value WritePOA
9-5
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
Value Access this URL by clicking the WSIL Browser flashlight icon and expanding and selecting LocalBPELServer > processes > default > POAcknowledge. http://localhost:9700/orabpel/default/POAcknowledge/POAcknowled ge?wsdl See Also: "Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences" on page 1-5 if you receive a parsing error when attempting to add a WSDL file in the WSDL Chooser window.
Drag and drop a Scope activity from the Component Palette section to below the SelectSupplier Switch activity. Double-click the scope icon to display the Scope window. Enter WritePOAcknowledgment in the Name field of the General tab. Click OK. In this phase of the tutorial, you create the Invoke, Receive, and Assign activities inside this Scope activity.
5. 6.
Click the + sign to expand the Scope activity. Select Save from the File main menu.
Drag and drop an Invoke activity from the Component Palette section to inside the WritePOAcknowledgment Scope activity. Double-click the Invoke icon to display the Invoke window. Enter the following details:
Value invokeFileWrite WritePOA
9-6
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon. Click OK on the Create Variable window that appears. A variable named invokeFileWrite_initiate_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of POAcknowledgeRequestMessage.
6. 7.
Click OK. Drag and drop a Receive activity from the Component Palette section to below the invokeFileWrite Invoke activity inside the WritePOAcknowledgment Scope activity. Double-click the Receive icon to display the Receive window. Enter the following details:
Value receiveFileWrite WritePOA
8. 9.
creation icon.
11. Click OK on the Create Variable window that appears.
A variable named receiveFileWrite_onResult_InputVariable is automatically created in the Output Variable field. This variable is automatically assigned a message type of POAcknowledgeResponseMessage.
12. Click OK. 13. Select Save from the File main menu.
Drag and drop an Assign activity from the Component Palette section to above the invokeFileWrite Invoke activity inside the WritePOAcknowledgment Scope activity. Double-click the assign icon to display the Assign window. Click the General tab. Enter assignFileWriteIn in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following values:
Value
2. 3. 4. 5. 6. 7. 8.
Field From
9-7
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
Field
Value Variable Expand and select Variables > inputVariable > payload
Type Variables
To
Type Variables
9.
Click OK to close the Create Copy Rule window and the Assign window.
Drag and drop an Assign activity from the Component Palette section to below the receiveFileWrite Receive activity inside the WritePOAcknowledgment Scope activity. Double-click the assign icon to display the Assign window. Click the General tab. Enter assignFileWriteComments in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following values:
Note: Instead of manually entering an expression, you can press Ctrl
2. 3. 4. 5. 6. 7. 8.
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 From
Value
Type Expression
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments
9.
Click OK to close the Create Copy Rule window and the Assign window.
9-8
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
10. Click the - sign to close the WritePOAcknowledgment Scope activity. 11. Select Save from the File main menu.
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. Increment the version number of the project when prompted and click OK (for example, enter 1.5). This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears. Note that your BPEL processes, POAcknowledge and OrderBooking, appear in the Deployed BPEL Processes list.
2. 3.
Click the BPEL Processes tab. Note which OrderBooking version has an asterisk next to the version number. This is the default version.
9-9
Designing the File Adapters Write Functionality to Write the Order Acknowledgment
4.
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.
5. 6. 7.
Scroll down and click Mark as Default to make this the default version of OrderBooking. 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. If you have installed Patch 1, go to Step 8. Otherwise, you must first perform Steps 7a through 7c. See Chapter 1, "Introduction" for information about where to obtain Patch 1.
a. b. c.
Click Clear WSDL Cache under Related Tasks in the lower-left section. Click Back to Processes when prompted. Go to Step 8.
8. 9.
Click the Dashboard tab. Click the OrderBooking instance version you increased in Step 5 on page 9-9 and start it in one of the following ways:
Open the provided CreateOrderBookingUI application at http://localhost:9700/CreateOrderBookingUI and provide inputs to initiate a process. Enter details in all fields of the HTML Form and click Post XML Message. Select XML Source from the Initiating a test instance list. 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. You must use a
to invoke the process instance (drive_letter:\temp on Windows operating systems or /temp on Unix operation systems). This step is optional if the BatchOrderProcessing process of section "Running and Verifying the Order Process" on page 8-7 is complete.
11. Complete the manual price quote task for SelectManufacturing by using the
Verify that the instances were created. All should appear in the Instance list. The Last Modified list displays the times at which they were created.
15. Click the instance. 16. Check the contents of the directory (drive_letter:\temp on Windows
9-10
Summary
po_timestamp.xml should be created. Verify the attributes (for example the concatenation of the first and last names, and so on).
Summary
You have now added write functionality to the file adapter to accept input data in the form of a purchase order. This input data was transformed into a purchase order acknowledgment and the results were written to a file. You performed the following key tasks:
Returned to the POAcknowledge BPEL process and created a partner link (named FileOutInbound) that used the file adapter to write files to a directory (in this case, an outgoing purchase order acknowledgment). Designed POAcknowledge to invoke FileOutInbound. Deployed POAcknowledge. Returned to the OrderBooking BPEL process and created a partner link (named WritePOA) that interacted with POAcknowledge. Designed OrderBooking to invoke WritePOA. Deployed the OrderBooking BPEL process. Ran OrderBooking from Oracle BPEL Console by completing and submitting an order form to the Rapid Distributors and Select Manufacturing services. Copied the purchase order file to be read to a directory. Accessed the Rapid Distributors URL to manually submit a supplier price. Observed that the purchase order file was deleted and a purchase order acknowledgement file was written to the directory. Observed that the contents of the incoming purchase order file were transformed into an outgoing purchase order acknowledgement.
Summary
9-12
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:
Introduction Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables Summary
Introduction
This phase of the tutorial adds to the process you designed in Chapter 9, "Using the File Adapters 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:
Create a new BPEL process named FulfillOrder. Configure database connections and create sample database tables. Create a partner link that uses the database adapter (named DBInsert) to commit data to database tables in a 1:M relationship. Design the BPEL process to invoke DBInsert. Design the BPEL process to add transformation logic to transform data required by the database adapter. Return to the OrderBooking BPEL process and create a partner link (named FulfillOrder) that interacts with the FulfillOrder BPEL process. Design the BPEL process to invoke FulfillOrder. Add fault handling and exception management. Deploy the OrderBooking BPEL process. Run OrderBooking from Oracle BPEL Console to receive and send data to the database.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
This section contains these tasks:
Creating an Order Fulfillment Process Importing the Schema Creating a Database Connection and Samples Tables Creating a Partner Link that Uses the Database Adapter Creating an Invoke Activity Creating a Transform Activity and the Database Record Transformation Testing the Transformation Logic Validating, Compiling, and Deploying the FulFillOrder Process Running the FulFillOrder Process Verifying the Process Extending the Order Booking Process
Right-click OrderBookworkspace in the Applications Navigator section of the designer window. Select New Project. Double-click BPEL Process Project in the Items window to display the BPEL Process Project window. Enter FulfillOrder in the BPEL Process Name field. All other fields default to the correct values for creating an asynchronous BPEL process. Click OK. The bpel.xml, FulfillOrder.bpel, and FulfillOrder.wsdl files are created.
Copy OrderBookingPO.xsd from the Oracle_ Home\integration\orabpel\samples\tutorials\127.OrderBookingTu torial\PracticeFiles directory to the Oracle_ Home\integration\jdev\jdev\mywork\OrderBookworkspace\FulFillO rder directory. Double-click FulfillOrder.bpel in the Applications Navigator section of the designer window to display the Structure section in the lower left section of the designer window. Select and right-click Project Schemas in the Structure section. Select Import Schema. The Import Schema window appears.
2.
3. 4.
5. 6.
Click the flashlight icon to access the Open window. Select OrderBookingPO.xsd from the FulFillOrder directory in which you placed it in Step 1 on page 10-2 and click Open.
10-2
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
The file is added to the URL field of the Import Schema window.
7. 8.
Click OK. Verify that OrderBookingPO.xsd appears under FulfillOrder > Web Content > Miscellaneous Files in the Applications Navigator section of the designer window. OrderBookingPO.xsd also appears under Project Schemas in the Structure section. Expand Message Types > Process WSDL - FulfillOrder.wsdl > FulfillOrderRequestMessage > payload in the Structure section. window.
9.
10. Right-click payload and select Edit Message Part to display the Edit Message Part 11. Select Element and click the flashlight icon to the right of the Element field. 12. Expand Project Schema Files > OrderBookingPO.xsd. 13. Select PurchaseOrder. 14. Click OK to close the Type Chooser window and the Edit Message Part window.
You must create a database connection and database sample tables to use this portion of the tutorial. This section contains these tasks:
Configuring a Database Instance Design-Time Connection Configuring a BPEL Server Runtime Connection Creating a JDeveloper Database Connection Creating Sample Tables Testing the Database Connection
Select Manage Libraries from the Tools main menu. Select System Libraries > Oracle8i Lite. Oracle8i Lite appears in the Library Name field.
3. 4. 5.
Enter Oracle_Home\integration\orabpel\lib\olite40.jar in the Class Path field or click Edit to select the path. Leave the remaining fields as they are. Click OK.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Open a text editor. Open the Oracle_ Home\integration\orabpel\system\appserver\oc4j\j2ee\home\appl ication-deployments\default\DbAdapter\oc4j-ra.xml file. Locate the following connection factory settings in the file and ensure that the values in bold appear. If not, change them to these values.
<connector-factory location="eis/DB/BPELSamples" connector-name="Database Adapter"> <config-property name="driverClassName" value="oracle.lite.poljdbc.POLJDBCDriver"/> <config-property name="connectionString" value="jdbc:polite4@localhost:100:orabpel"/> <config-property name="userName" value="system"/> <config-property name="password" value="manager"/> <config-property name="minConnections" value="5"/> <config-property name="maxConnections" value="5"/> <config-property name="minReadConnections" value="1"/> <config-property name="maxReadConnections" value="1"/> <config-property name="usesExternalConnectionPooling" value="false"/> <config-property name="dataSourceName" value=""/> <config-property name="usesExternalTransactionController" value="false"/> <config-property name="platformClassName" value="oracle.toplink.internal.databaseaccess.DatabasePlatform"/> <config-property name="usesNativeSequencing" value="true"/> <config-property name="sequencePreallocationSize" value="50"/> <config-property name="tableQualifier" value=""/> </connector-factory>
3.
4.
Stop and restart Oracle BPEL Server from the Start Menu, as described in "Starting Oracle BPEL Process Manager Components" on page 1-4.
Return to JDeveloper BPEL Designer. Select Connection Navigator from the View main menu. Right-click Database in the Connections - Navigator window and select New Database Connection. This starts the Create Database Connection Wizard.
4. 5. 6. 7. 8. 9.
Click Next on the Welcome window. Enter myConnection in the Connection Name field of the Type window. Select Third Party JDBC Driver from the Connection Type list, and click Next. Enter system in the Username field of the Authentication window. Enter manager in the Password field. Leave the remaining fields as they are, and click Next.
10. Click New to the right of the Driver Class field on the Connection window.
10-4
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
newOracle8Lite).
14. Enter Oracle_Home/integration/orabpel/lib/olite40.jar in the Class Path field or
window.
18. Click Next. 19. Click Test Connection on the Test window.
Ensure that Oracle BPEL Server is running. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > 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.
4.
Messages appear indicating table creation and sample row insertion into the default Oracle Lite instance.
Select Connection Navigator from the View main menu. Expand Database. Right-click myConnection and select SQL Worksheet. Enter SELECT * FROM system.orders; in the Enter SQL Statement field. Right-click the statement and select Execute SQL Statement. The sample table created with data appears in the Results field.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Select Applications Navigator from the View main menu. Double-click FulFillOrder.bpel. Drag and drop a PartnerLink activity onto the right side of the designer window. Enter DBInsert in the Name field. Click the third icon at the top (the Define Adapter Service icon). This starts the Adapter Configuration Wizard.
6. 7. 8. 9.
Click Next on the Welcome window. Select Database Adapter on the Adapter Type window and click Next. Enter writeDB in the Service Name field on the Service Name window and click Next. Select the myConnection database connection setting you created in "Creating a Database Connection and Samples Tables" on page 10-3 from the list. field. The name is case sensitive. Ensure that it correctly matches the case of the connection name.
10. Ensure that eis/DB/BPELSamples displays in the Database Server JNDI Name
11. Click Next. 12. Select Perform an Operation on a Table. 13. Unselect Delete. 14. Click Next. 15. Click Import Tables. 16. Select ORDERS and ORDERITEMS.
10-6
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
17. Click > to move both tables to the Selected field. 18. Click OK. You are returned to the Select Table window of the wizard. 19. Select SYSTEM.ORDERS and click Next.
Remove Relationship. This ensures that only ORDERS(orderitemsCollection) has a 1:M relationship with ORDERITEMS appears.
21. Click Next. 22. Leave all attributes as default for the attributes to return from the query on the
page.
23. Click Next twice. 24. Click Finish.
The Partner Links window is automatically completed. The window looks as follows:
Field Name WSDL File Value DBInsert file:/c:/orabpel/integration/jdev/jdev/mywork/OrderBookworkspace/F ulFillOrder/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. Partner Link Type My Role Partner Role 25. Click OK. 26. Select Save from the File main menu. writeDB_plt Leave unspecified. writeDB_role
Note that writeDB.wsdl now appears under FulFillOrder > Integration Content. This file contains the parameters you specified with the Adapter Configuration Wizard.
Drag and drop an Invoke activity below the receiveInput Receive activity. Double-click the Invoke activity to display the Invoke window. Enter the following details:
Value writeDBrecord DBInsert
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
4. 5.
Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon. 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. 7.
Drag and drop a Transform activity below the receiveInput Receive activity. Double-click the Transform activity to display the Transform window. Click the General tab. Enter transformDBRecord in the Name field. Click the Transformation tab. Select inputVariable in the Source Variable field and payload in the Source Part field. Select writeDBrecord_merge_InputVariable in the Target Variable field and OrdersCollection in the Target Part field. Leave the Mapper File field selection as Transformation_1. Click the second icon (the Create Mapping icon) to the right of the Mapper File field.
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
10-8
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Source po:OrderStatus
Target 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
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.
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.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
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
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Right-click in the transformation mapping window and select Test. This displays the Test XSL Map window.
2.
Click Generate to create sample test data. Test data appears in the upper left corner in the Source XML section.
3.
Click Test to test the transformation logic. Sample test results appear in the upper right corner in the Target XML section.
4.
Verify the results. For example, note that the first and last names in the source code now appear as a single company name.
Note: If you click Validate, the following message appears:
Target XML is invalid for the target schema. <Line 6, Column 34>: XML-24525: (Error) Invalid text '2005-05-23' in element: 'orderdate'
You can ignore this message. This message displayed because the source PurchaseOrder:OrderInfo:OrderDate is a date field and the target orderCollections:orders:orderdate is a dateTime field.
5. 6. 7.
Click Close to close the test window. Click Yes if prompted to save your transformation details. Close the Transformation window by clicking the x button on the Title tab.
A file named Transformation_1.xsd appears under FulfillOrder > Integration Content in the Applications Navigator section.
Go to the Applications Navigator section. Right-click FulfillOrder. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open).
10-11
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
The Dashboard tab of Oracle BPEL Console appears. Note that your BPEL process, FulfillOrder, now appears in the Deployed BPEL Processes list.
2. 3. 4.
Refresh if necessary. Click FulfillOrder. Enter information in one of the following ways:
Enter details in all the fields of the HTML Form and click Post XML Message. Select XML Source from the Initiating a test instance list. Use a text editor to copy and paste the contents of OrderBookingPO_1.xml into the field that appears. Click Post XML Message.
5. 6. 7. 8. 9.
Refresh Oracle BPEL Console. Click the Instances tab at the top. Click the FulfillOrder instance. Click the Audit link to view the transformation logic and the output written into the database tables. 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.)
Return to JDeveloper BPEL Designer. Select Connection Navigator from the View main menu. Expand Database. 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. Right-click the SQL statement you entered in Step 4 on page 10-5 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.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Creating an Order FulFillment Partner Link Creating a Scope Activity Creating Invoke and Receive Activities Creating an Initial Assign Activity Creating a Second Assign Activity Adding Database Exception Handling Validating, Compiling, and Deploying the OrderBooking Process Running the Order Booking Process
Go to the OrderBooking process in the Applications Navigator section. Double-click OrderBooking.bpel. Drag and drop a PartnerLink activity from the Component Palette section onto the right side of the designer window. 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 WSIL Browser) to access the WSDL Chooser window for automatically selecting the FulFillOrder process as a service.
Value FulfillOrder Access this URL by clicking the WSIL Browser flashlight icon and expanding and selecting LocalBPELServer > processes > default > FulfillOrder. http://localhost:9700/orabpel/default/FulfillOrder/FulfillOrder?wsdl See Also: "Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences" on page 1-5 if you receive a parsing error when attempting to add a WSDL file in the WSDL Chooser window.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Drag and drop a Scope activity from the Component Palette section to below the SelectSupplier Switch activity. Double-click the scope icon to display the Scope window. Enter OrderFulFillment in the Name field of the General tab. Click OK. In this phase of the tutorial, you create the Invoke, Receive, and Assign activities inside this Scope activity.
5. 6.
Click the + sign to expand the Scope activity. Select Save from the File main menu.
Drag and drop an Invoke activity from the Component Palette section into the OrderFulFillment Scope activity. Double-click the Invoke icon to display the Invoke window. Enter the following details:
Value invokeFulfillOrder FulfillOrder
Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon. 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. 7.
Click OK. Drag and drop a Receive activity from the Component Palette section to below the invokeFulfillOrder Invoke activity inside the OrderFulFillment Scope activity. Double-click the Receive icon to display the Receive window. Enter the following details:
Value receiveFulfillOrder
8. 9.
Field Name
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Value FulfillOrder
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.
Drag and drop an Assign activity from the Component Palette section to above the invokeFulfillOrder Invoke activity inside the OrderFulFillment Scope activity. Double-click the assign icon to display the Assign window. Click the General tab. Enter assignDBIn in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following values:
Value
2. 3. 4. 5. 6. 7. 8.
Field From
Type Variables
To
Type Variables
Variable Expand and select Variables > invokeFulFillOrder_initiate_ InputVariable > payload
9.
Click OK to close the Create Copy Rule window and the Assign window.
Drag and drop an Assign activity from the Component Palette section to below the receiveFulfillOrder Receive activity inside the OrderFulFillment Scope activity. Double-click the assign icon to display the Assign window.
2.
10-15
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
3. 4. 5. 6. 7. 8.
Click the General tab. Enter assignDBWriteComments in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. 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 From
Value
Type Expression
To
Type Variables
Variable Expand and select > Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments
9.
Click OK to close the Create Copy Rule window and the Assign window. When complete, the designer window looks as follows:
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
10. Click the - sign to close the OrderFulfillment Scope activity. 11. Select Save from the File main menu.
Ensure that you are in the FulFillOrder process. If not, double-click FulFillOrder.bpel in the Applications Navigator section of the designer window. Drag and drop a Scope activity from the Component Palette section to below the transformDBRecord Transform activity. Double-click the Scope icon to display the Scope window. Enter db_write_scope in the Name field of the General tab. Click OK. Click the + sign to expand the Scope activity. Drag and drop the writeDBrecord Invoke activity into the db_write_scope Scope activity. Click Add Catch All Branch in the icons on the left side of db_write_scope.
10-17
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
A new box displays to the right with an asterisk and the words Drop Activity Here.
9.
10. Right-click Variables and select Create Variable. 11. Enter dbStatus in the Name field. 12. Select Simple Type and click the flashlight icon to the right of the Simple Type
field.
13. Select boolean. 14. Click OK to close the Type Chooser window and the Create Variable window. 15. Drag and drop an Assign activity from the Component Palette section to above
Value
Type Expression
Expression 0
To
Type Variables
23. Click OK to close the Create Copy Rule window and the Assign window. 24. Drag and drop another Assign activity from the Component Palette section to
below the writeDBrecord Invoke activity inside the db_write_scope Scope activity.
25. Double-click the Assign icon to display the Assign window. 26. Click the General tab. 27. Enter assign_db_1 in the Name field. 28. Click Apply.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
29. Click the Copy Rules tab. 30. Click Create to display the Create Copy Rule window. 31. Enter the following values: Field From
Value
Type Expression
Expression 10
To
Type Variables
32. Click OK to close the Create Copy Rule window and the Assign window. 33. 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.
34. Double-click the Assign icon to display the Assign window. 35. Enter assign_db_error in the Name field of the General tab. 36. Click Apply. 37. Click the Copy Rules tab. 38. Click Create to display the Create Copy Rule window. 39. Enter the following values: Field From
Value
Type Expression
Expression bpws:getVariableData('dbStatus') + 1
To
Type Variables
40. Click OK to close the Create Copy Rule window and the Assign window. 41. Drag and drop a Wait activity from the Component Palette section into the Catch
every 30 seconds until the FulFillOrder process is successful (that is, dbStatus is 1).
45. Click OK. 46. Drag and drop a While activity from the Component Palette section to
10-19
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
47. Click the - sign to close the db_write_scope Scope activity. 48. Expand the While activity. 49. Drag the db_write_scope Scope activity inside the While activity. 50. Double-click the While activity and press Ctrl and then the space bar to enter the
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. Increment the version number of the project when prompted (for example, enter 1.6) and click OK. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Designing the Database Adapter with a 1:M Relationship to Insert Order and Order Item Data into Database Tables
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears. Note that your BPEL process, OrderBooking, now appears in the Deployed BPEL Processes list.
2. 3. 4.
Click the BPEL Processes tab. Note which OrderBooking version has an asterisk next to the version number. This is the default version. 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.
5. 6. 7.
Scroll down and click Mark as Default to make this the default version of OrderBooking. 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. If you have installed Patch 1, go to Step 8. Otherwise, you must first perform Steps 7a through 7b on page 9-10. See Chapter 1, "Introduction" for information about where to obtain Patch 1. Click the Dashboard tab. Start the correct OrderBooking version instance in one of the following ways:
8. 9.
Open the provided CreateOrderBookingUI application at http://localhost:9700/CreateOrderBookingUI and provide inputs to initiate a process. Click OrderBooking in the Deployed BPEL Processes list. Enter details in all fields of the HTML Form and click Post XML Message. or Select XML Source from the Initiating a test instance list. 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.
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 Adapters Read Functionality").
10. Complete the manual price quote task for SelectManufacturing by using the
Summary
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 JDeveloper BPEL
Designer.
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.
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:
Created a new BPEL process named FulfillOrder. Configured database connections and created sample database tables. Created a partner link that used the database adapter (named DBInsert) to commit data to database tables in a 1:M relationship. Designed the BPEL process to invoke DBInsert. Designed the BPEL process to add transformation logic to transform data required by the database adapter. Returned to the OrderBooking BPEL process and created a partner link (named FulfillOrder) that interacts with the FulfillOrder BPEL process. Designed the BPEL process to invoke FulfillOrder. Added fault handling and exception management. Deployed the OrderBooking BPEL process.
Summary
Ran OrderBooking from Oracle BPEL Console to receive and send data to the database
10-23
Summary
11
Designing the Human Workflow System
This chapter of the tutorial describes how to add user tasks to handle the manual approval or rejection of a purchase order. This chapter contains the following topics:
Introduction Designing the Human Workflow System for Manual Approval of an Order Summary
Introduction
This phase of the tutorial adds to the process you designed in Chapter 10, "Designing the Database Adapter to Insert Data". Ensure that you have successfully completed that phase before performing this one. This phase extends the previous project steps by calling an external manual service through human task capabilities. It includes a call out to another web service that handles human tasks and uses predefined (default) graphical user interface screens for user actions. You perform the following key tasks:
Create a new BPEL process named OrderApproval. Design the BPEL process to add workflow functionality to handle the manual approval or rejection of a purchase order. Deploy the OrderApproval BPEL process. Run the OrderApproval BPEL process from Oracle BPEL Console. Access the Oracle BPEL Worklist Application URL to approve the order. Return to the OrderBooking BPEL process and create a partner link (named POAService) that interacts with the OrderApproval BPEL process. Design the BPEL process to invoke POAService. Deploy the OrderBooking BPEL process. Run the OrderBooking BPEL process from Oracle BPEL Console. Access the Oracle BPEL Worklist Application URL to approve the order.
Defining the Purchase Order Approval Service Creating a Partner Link for the Order Approval Service
Designing the Human Workflow System 11-1
Creating a Scope Activity Creating Invoke and Receive Activities Creating an Initial Assign Activity Creating a Second Assign Activity Validating, Compiling, and Deploying the Order Process Running and Verifying the Order Process
Creating a New Project Importing a Project Schema Creating a User Task Activity Creating Assign Activities Inside the Switch Activity Validating, Compiling, and Deploying the Order Approval Process Running the Order Approval Process
Right-click OrderBookworkspace in the Applications Navigator section of the designer window. Select New Project. Double-click BPEL Process Project in the Items window to display the BPEL Process Project window. Enter OrderApproval in the BPEL Process Name field. All other fields default to the correct values for creating an asynchronous BPEL process. Click OK.
Copy OrderBookingPO.xsd, OrderBookingPO_1.xml, and Order.xsl from the ORACLE_ HOME\integration\orabpel\samples\tutorials\127.OrderBookingTu torial\PracticeFiles directory to the ORACLE_ HOME\integration\jdev\jdev\mywork\OrderBookworkspace\OrderApp roval directory. Double-click OrderApproval.bpel in the Applications Navigator section of the designer window. Select and right-click Project Schemas in the Structure section. Select Import Schema. The Import Schema window appears.
2. 3. 4.
5.
11-2
6.
Select OrderBookingPO.xsd from the OrderApproval directory in which you placed it in Step 1 on page 11-2 and click Open. The file is added to the URL field of the Import Schema window.
7. 8.
Click OK. Verify that OrderBookingPO.xsd appears under OrderApproval > Web Content > Miscellaneous Files in the Applications Navigator section of the designer window. OrderBookingPO.xsd also appears under Project Schemas in the Structure section. Expand Message Types > Process WSDL - OrderApproval.wsdl > OrderApprovalRequestMessage > payload in the Structure section. window.
9.
10. Right-click payload and select Edit Message Part to display the Edit Message Part 11. Select Element and click the flashlight icon to the right of the Element field. 12. Expand Project Schema Files > OrderBookingPO.xsd. 13. Select PurchaseOrder. 14. Click OK to close the Type Chooser window and the Edit Message Part window.
window.
17. Select Element and click the flashlight icon to the right of the Element field. 18. Expand Project Schema Files > OrderBookingPO.xsd. 19. Select PurchaseOrder. 20. Click OK to close the Type Chooser window and the Edit Message Part window.
Ensure that Process Activities is selected in the drop-down list of the Component Palette section. Drag and drop a User Task activity from the Component Palette section to below the receiveInput Receive activity. This starts the Workflow Wizard.
3.
Leave the Create New Workflow button selected and click Next. The Workflow Pattern window appears.
4.
Select Sequential Workflow from the Workflow Patterns list and click Next. The Task Details window appears.
5. 6.
Click the icon to the right of the Task Title field to display the XPath Expression Builder window. Press Ctrl and then the space bar to add the following in the Expression Builder field:
Designing the Human Workflow System 11-3
Click OK when complete to return to the Task Details window. Click the flashlight icon to the right of the Payload field to display the Variable XPath Builder window. Expand and select Process > Variables > inputVariable > payload > ns1:PurchaseOrder.
display.
12. Leave the Task Creator field empty. 13. Select 10 for the Minutes field of the Expiration Duration section. 14. Click Next.
11-4
29. Leave the remaining field blank on this window. 30. Click Next.
The Finish window displays your selections for workflow name, pattern, and outcome.
31. Click Finish.
A Scope activity and Switch activity are automatically created. Both activities contain the details you entered in the Workflow Wizard.
32. Select Save from the File main menu.
Drag and drop an Assign activity from the Component Palette section to below the copyPayloadFromTask Assign activity in the <case Task outcome is ACCEPT> section of the Switch activity. Double-click the assign icon to display the Assign window. Click the General tab. Enter assignOrderApproval1 in the Name field. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
Note: Instead of manually entering an expression, you can press Ctrl
2. 3. 4. 5. 6. 7. 8.
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 From
Value
Type Expression
Expression string(Accepted)
To
Type Variables
Variable Select and expand Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
9.
Click OK to close the Create Copy Rule window and the Assign window. copyPayloadFromTask Assign activity in the <case Task outcome is REJECT> section. Enter the same details as described above, with the following exceptions:
copyPayloadFromTask Assign activity in the <otherwise> section. Enter the same details as described above, with the following exceptions:
12. Drag and drop an Assign activity from the Component Palette section to below
Value
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
To
Type Variables
Variable Expand and select Variables > outputVariable > payload > ns1:PurchaseOrder
20. Click OK to close the Create Copy Rule window and the Assign window.
11-6
Go to the Applications Navigator section. Right-click OrderApproval. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears.
2. 3.
Click OrderApproval in the Deployed BPEL Processes list. Enter details in all fields of the HTML Form. You can also use a text editor to copy and paste these details from the contents of the OrderBookingPO_1.xml file:
Note: Do not copy and paste from Internet Explorer or Mozilla
Select XML Source from the Initiating a test instance list. Copy and paste the contents of OrderBookingPO_1.xml into the field that appears.
4.
Click Post XML Message. The BPEL Processes tab displays a message similar to the following:
Test Instance Initiated
5. 6.
Click the Instances tab at the top. Click the OrderApproval instance. A message appears indicating that the instance is active.
7.
Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager 10.1.2 > Sample Worklist Application to access the login window for Oracle BPEL Worklist Application: Log in as jcooper/welcome. This displays Oracle BPEL Worklist Application. A task waiting to be approved appears.
8.
9.
The task details and payload information appear. Since this task is configured to be approved by two users, the task is routed to jstein, the manager of jcooper if it is accepted. If the task is rejected, the OrderApproval process identifies the task as rejected and completes processing.
11. Review the information. For example, the following information appears if you
11-8
12. Select Accept from the Task Action list and click Go. 13. Log out as user jcooper. 14. Log into Oracle BPEL Worklist Application as jstein/welcome. 15. Select Accept from the Actions list and click Go.
OrderApproval process.
Ensure that you are in the OrderBooking process. Double-click OrderBooking.bpel. Ensure that Process Activities is selected in the drop-down list of the Component Palette section. Drag and drop a PartnerLink activity onto the right side of the designer window. Enter the following values to create a partner link for the OrderApproval service:
Note: For the WSDL File field below, click the flashlight (the second icon from the left named WSIL Browser) to access the WSDL Chooser window for automatically selecting the OrderApproval service.
Value POAService Access this URL by clicking the WSIL Browser flashlight icon and expanding and selecting LocalBPELServer > processes > default > OrderApproval. http://localhost:9700/orabpel/default/OrderApproval/OrderApproval? wsdl See Also: "Setting the Hostname in Your JDeveloper BPEL Designer Web Browser Preferences" on page 1-5 if you receive a parsing error when attempting to add a WSDL file in the WSDL Chooser window.
Click OK.
7.
Drag and drop a Scope activity from the Component Palette section to below the SelectSupplier Switch activity. Double-click the scope icon to display the Scope window. Enter UserApproval in the Name field of the General tab. Click OK. In this phase of the tutorial, you create the Invoke, Receive, and Assign activities inside this Scope activity.
5. 6.
Click the + sign to expand the Scope activity. Select Save from the File main menu.
Drag and drop an Invoke activity from the Component Palette section into the UserApproval Scope activity. Double-click the Invoke icon to display the Invoke window. Enter the following details:
Value invokePOAService POAService
Click the first icon to the right of the Input Variable field. This is the automatic variable creation icon. Click OK on the Create Variable window that appears. A variable named invokePOAService_initiate_InputVariable is automatically created in the Input Variable field. This variable is automatically assigned a message type of OrderApprovalRequestMessage.
6. 7. 8. 9.
Click OK. Drag and drop a Receive activity to below the invokePOAService Invoke activity inside the UserApproval Scope activity. Double-click the Receive icon to display the Receive window. Enter the following details:
Value receivePOAService POAService
creation icon.
11. Click OK on the Create Variable window that appears.
A variable named receivePOAService_onResult_InputVariable is automatically created in the Variable field. This variable is automatically assigned a message type of OrderApprovalResponseMessage.
12. Click OK. 13. Select Save from the File main menu.
Drag and drop an Assign activity from the Component Palette section to above the invokePOAService Invoke activity and inside the UserApproval Scope activity. Double-click the Assign icon to display the Assign window. Enter assignPOADataIn in the Name field of the General tab. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window. Enter the following details:
Value
2. 3. 4. 5. 6. 7.
Field From
Type Variables
To
Type Variables
Variable Expand and select Variables > invokePOAService_initiate_ inputVariable > payload
8. 9.
Click OK to close the Create Copy Rule window and the Assign window. Select Save from the File main menu.
Drag and drop an Assign activity from the Component Palette section to below the receivePOAService Receive activity and inside the UserApproval Scope activity. Double-click the Assign icon to display the Assign window. Enter UserResponse in the Name field of the General tab. Click Apply. Click the Copy Rules tab. Click Create to display the Create Copy Rule window.
Designing the Human Workflow System 11-11
2. 3. 4. 5. 6.
7.
Field From
Type Variables
Variable Expand and select Variables > receivePOAService_onResult_ InputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments Note: The namespace number values (for example, ns1, ns2) can vary. Use the namespace values that automatically appear.
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderStatus
8. 9.
Click OK. Click Create in the Copy Rules tab to again display the Create Copy Rule window.
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 From
Value
Type Expression
To
Type Variables
Variable Expand and select Variables > inputVariable > payload > ns1:PurchaseOrder > ns1:OrderInfo > ns1:OrderComments
11. Click OK to close the Create Copy Rule window and the Assign window.
12. Click the - sign to close the UserApproval Scope activity. 13. Select Save from the File main menu.
Go to the Applications Navigator section. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. Increment the version number of the project when prompted (for example, enter 1.7) and click OK. This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). Click the BPEL Processes tab. Note which OrderBooking version has an asterisk next to the version number. This is the default version. 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.
Designing the Human Workflow System 11-13
2. 3. 4.
Scroll down and click Mark as Default to make this the default version of OrderBooking. 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. If you have installed Patch 1, go to Step 8. Otherwise, you must first perform Steps 7a through 7b on page 9-10. See Chapter 1, "Introduction" for information about where to obtain Patch 1. Click the Dashboard tab. Verify that the processes are deployed (OrderApproval, OrderBooking, and all other processes, including TaskActionHandler). OrderApproval uses TaskActionHandler with a more sophisticated user interaction flow compared to the simpler TaskManager used by SelectManufacturing.
8. 9.
10. Start the correct OrderBooking version instance in one of the following ways:
Copy Oracle_ Home\integration\orabpel\samples\tutorials\127.OrderBookin gTutorial\PracticeFiles\OrderBookingPO_1.xml to a temporary directory (drive_letter:\temp on Windows operating systems or /temp on Unix operation systems). Click the process and provide input to the default graphical user interface page in either of the following ways: Enter details in all fields of the HTML Form and click Post XML Message. Select XML Source from the Initiating a test instance list. 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.
Firefox. You must use a text editor to perform this task. Open the provided CreateOrderBookingUI application at http://localhost:9700/CreateOrderBookingUI and provide inputs to initiate a process.
11. Verify that the OrderBooking process has started. 12. Provide a price quote for SelectManufacturing from the following graphical user
interface:
http://localhost:9700/SelectManufacturingUI
After providing a quote, watch the process instance execute and invoke the user approval service at OrderApproval. Go to Oracle BPEL Console and verify that the OrderApproval process and TaskActionHandler process have both started.
13. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process
Manager 10.1.2 > Sample Worklist Application to access the login window for Oracle BPEL Worklist Application.
14. Log in as jcooper/welcome. Default users are provided at install time in the
Home\integration\orabpel\system\appserver\oc4j\j2ee\home\config\jazn-data.xml
17. Approve or reject the task by selecting Accept or Reject from the Task Action list,
Summary
20. View the task details, the comments section, and so on. 21. Approve or reject the task in the Actions list and click Go.
After the jstein comments, the approved tasks of jcooper are returned to the process.
22. View Oracle BPEL Console, database tables, or temporary directory you specified
(drive_letter:\temp on Windows operating systems or /temp on Unix operation systems) for completion of the process (as examined in previous tutorial phases).
Summary
You have now added user tasks to handle the manual approval or rejection of a purchase order. This phase extended the previous project steps by calling an external manual service through human task capabilities. It included a call out to another service that handled human tasks and used predefined (default) graphical user interface screens for user actions. You performed the following key tasks:
Created a new BPEL process named OrderApproval. Designed the BPEL process to add workflow functionality to handle the manual approval or rejection of a purchase order. Deployed the OrderApproval BPEL process. Ran the OrderApproval BPEL process from Oracle BPEL Console. Accessed the Oracle BPEL Worklist Application URL to approve the order. Returned to the OrderBooking BPEL process and created a partner link (named POAService) that interacted with the OrderApproval BPEL process. Designed the BPEL process to invoke POAService. Deployed the OrderBooking BPEL process. Ran the OrderBooking BPEL process from Oracle BPEL Console. Accessed the Oracle BPEL Worklist Application URL to approve the order.
12
Using Sensors
This chapter of the tutorial describes how to insert sensors on activities in the OrderBooking process. This chapter contains the following topics:
Introduction
This phase of the tutorial adds to the process you designed in Chapter 11, "Designing the Human Workflow System". Ensure that you have successfully completed that phase before performing this one. In this phase of the tutorial, you insert sensors on activities in the OrderBooking process. Sensors capture and publish business event information to Java Message Service (JMS) queues. This provides business analysts with real-time access to critical business performance indicators. Business analysts can use this information to analyze and improve the speed and effectiveness of critical business activities and remove delays in managing and executing critical business processes. You perform the following key tasks:
Create sensors on activities in the OrderBooking BPEL process. Deploy the OrderBooking BPEL process. Run the OrderBooking BPEL process from Oracle BPEL Console. Observe the sensor results.
Adding Sensors
This section contains these tasks:
Creating Sensors Running, Validating, and Deploying the OrderBooking Process Running the Order Booking Process
Creating Sensors
1. 2.
Double-click OrderBooking.bpel in the Applications Navigator section. Double-click the receiveInput Receive activity.
Adding Sensors
3. 4. 5. 6. 7.
Click the Sensors tab. Click Create to access the Create Activity Sensor window. Enter InstanceStart in the Name field. Select Completion from the Evaluation Time list. Click Create in the Activity Variable Sensors section. The Create Activity Variable Sensor window appears.
8.
Click the icon to the right of the Variable XPath field. The Variable XPath Builder window appears.
9.
The Create Activity Variable Sensor window displays the following details:
11. Click OK to return to the Create Activity Sensor window. 12. Click Add in the Sensor Actions section.
window.
19. Click Add in the Sensor Actions section.
12-2
Adding Sensors
Field JMS Connection Factory Publish Target Filter Enable 23. Click OK.
25. Click OK in the Create Activity Sensor window and the Receive window. 26. Select Save from the File main menu.
The receiveInput Receive activity now includes a sensor icon in the upper right.
Adding Sensors
27. Repeat the steps in this section to create additional sensors on the following
OrderBooking process activities. For all these activities, add both existing sensor actions: ReportsPublisher and BAMPublisher. You do not need to create additional sensor actions.
Create Sensor on Activity... receiveInput receiveSM receiveRD Evaluation Time Variable XPath To To Select... Select... Completion Completion Completion Completion Completion Completion $inputVariable/payload $receiveSM_onResult_ InputVariable/payload $receiveRD_onResult_ InputVariable/payload $inputVariable/payload $inputVariable/payload $inputVariable/payload
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). Click the latest OrderBooking instance process to undeploy in the Dashboard tab. Click the Manage link. Click Undeploy at the bottom of the window. Click OK when prompted to mark all open instances for this process as stale. Click Done when prompted. Go to the Applications Navigator section in JDeveloper BPEL Designer. Right-click OrderBooking. Select Deploy > LocalBPELServer > Deploy to default domain.
2. 3. 4. 5. 6. 7. 8. 9.
10. Increment the version number of the project when prompted and click OK.
This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). Click the BPEL Processes tab. Note which OrderBooking version has an asterisk next to the version number. This is the default version.
2. 3.
12-4
Adding Sensors
4.
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.
5. 6. 7.
Scroll down and click Mark as Default to make this the default version of OrderBooking. 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. If you have installed Patch 1, go to Step 8. Otherwise, you must first perform Steps 7a through 7b on page 9-10. See Chapter 1, "Introduction" for information about where to obtain Patch 1. Click the Dashboard tab. Verify that the OrderBooking instance appears under the Dashboard tab.
8. 9.
10. Click the OrderBooking instance. 11. Select XML Source from the Initiating a test instance list. 12. Use a text editor to copy and paste the contents of OrderBookingPO_1.xml into
Note that the SelectManufacturing process is pending and waiting for a price quote.
15. Provide a price quote for SelectManufacturing from the following graphical user
interface:
http://localhost:9700/SelectManufacturingUI 16. Refresh Oracle BPEL Console and note that the process is pending on
POAService.
17. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process
Manager 10.1.2 > Sample Worklist Application to access the login window for Oracle BPEL Worklist Application.
18. Log in as jcooper/welcome.
Summary
Summary
You have now added sensors to the OrderBooking process. You performed the following key tasks:
Created sensors on activities in the OrderBooking BPEL process. Deployed the OrderBooking BPEL process. Ran OrderBooking BPEL process from Oracle BPEL Console. Observed the sensor results.
12-6
13
Using Notifications
This chapter of the tutorial describes how to add notifications. This chapter contains the following topics:
Introduction
This phase of the tutorial adds notifications to the POAcknowledge process. Ensure that you have successfully completed the phases in Chapter 9, "Using the File Adapters Write Functionality" and Chapter 12, "Using Sensors" before performing this phase. Notifications enable you to send notification about an event to a user, group, or destination address. You can send a notification by e-mail, voice mail, or Short Message Service (SMS). In this phase, you send an e-mail notification to confirm receipt of an order. You perform the following tasks:
Configure your company e-mail environment. Create a notification activity in the POAcknowledge process. Deploy the POAcknowledge BPEL process. Run POAcknowledge from Oracle BPEL Console to send an e-mail notification.
Configuring Your Company E-Mail Environment Creating a Notification Activity Validating, Compiling, and Deploying the POAcknowledge Process Running the POAcknowledge Process
Go to the Oracle_ Home\integration\orabpel\system\services\config directory. Make a backup copy of the ns_emails.xml file. Open a text editor.
4.
Open ns_emails.xml and replace the values in bold with ones appropriate to your company environment.
<EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"> <EmailAccount> <Name>Default</Name> <GeneralSettings> <FromName>Oracle BPM</FromName> <FromAddress>[email protected]</FromAddress> </GeneralSettings> <OutgoingServerSettings> <SMTPHost>sunbox4254.us.mycompany.com</SMTPHost> <SMTPPort>225</SMTPPort> </OutgoingServerSettings> <IncomingServerSettings> <Server>sunbox4254.us.mycompany.com</Server> <Port>2110</Port> <Protocol>pop3</Protocol> <UserName>bpm1</UserName> <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">welcome</Pas sword> <UseSSL>false</UseSSL> <Folder>Inbox</Folder> <PollingFrequency>1</PollingFrequency> <PostReadOperation> <MarkAsRead/> </PostReadOperation> </IncomingServerSettings> </EmailAccount>
5.
Double-click POAcknowledge.bpel in the Applications Navigator. Drag and drop a Notification activity from the Component Palette section to below the InvokeFileOut Invoke activity. This starts the Notification Wizard.
3. 4. 5.
Click Next on the Welcome page. Select Email on the Select a Notification channel window. Enter the following details:
Note: Instead of manually entering an expression, you can press Ctrl
and then the space bar in the Body field. Scroll through the list of values that appear 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.
Description Default
13-2
Description Enter a valid e-mail address. Enter a valid e-mail address. Enter a valid e-mail address. Enter a valid e-mail address. PO Acknowledgment for Items Ordered and Price Press the icon to the right of this field to display the XPath Expression Builder window. Use this window to build the following expression, and click OK when complete. concat(string('Dear Customer, Your order number '),bpws:getVariableData('inputVariable','payload','/ns1:PurchaseOrder /ns1:ID'),string(' for customer '),bpws:getVariableData('inputVariable','payload','/ns1:PurchaseOrder /ns1:CustID'),string(' has been confirmed. The order status is "'),bpws:getVariableData('inputVariable','payload','/ns1:PurchaseOrde r/ns1:OrderInfo/ns1:OrderStatus'),string('". Thanks for using Order Booking Application from Oracle BPEL Process Manager. Administrator.'))
6. 7.
Go to the Applications Navigator section. Right-click POAcknowledge. Select Deploy > LocalBPELServer > Deploy to default domain. Enter the domain password of bpel when prompted. Increment the version number again of the project when prompted and click OK (for example, enter 1.1). This compiles the BPEL process. Review the bottom of the window for any errors. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 5 on page 2-14.
Log into Oracle BPEL Console by selecting Start > All Programs > Oracle Oracle_Home > Oracle BPEL Process Manager 10.1.2 > BPEL Console (or refresh the page if it is already open). The Dashboard tab of Oracle BPEL Console appears. Note that your BPEL process, POAcknowledge, now appears in the Deployed BPEL Processes list.
2. 3. 4. 5. 6.
Click the POAcknowledge version you increased in Step 5 on page 13-3 in the Deployed BPEL Processes list. Enter details in all fields of the HTML Form and click Post XML Message. Refresh Oracle BPEL Console. Click the Instances tab. Click the POAcknowledge instance.
Summary
7. 8.
Click the Audit link to view progress. Check your e-mail account to verify that e-mail has been delivered (there can be an e-mail server-based delivery delay).
Summary
You have now added notification logic to the process. With the completion of this phase, the OrderBooking process is now completely configured for order acknowledgement through e-mail notification.
13-4
Index
A
activity sensors creating, 12-3 Adapter Configuration Wizard configuring the database adapter, 10-6 configuring the file adapter, 8-3, 9-2 assign activities creating, 2-9, 2-11, 2-12, 3-5, 4-7, 5-2, 5-4, 8-6, 9-4, 9-7, 9-8, 10-15, 11-5, 11-11 asynchronous services, 3-1, 3-8 creating a partner link, 3-2 creating an assign activity, 3-5 creating invoke and receive activities, 3-3 running the OrderBooking process, 3-7 starting and testing your services, 3-2 summary, 3-8 validating, compiling, and deploying, 3-6 audit link following the instance execution process, 2-15, 3-7, 4-10, 5-6, 6-4, 8-8, 9-5, 10-12, 10-22, 13-4 concat function using in transformations, 7-5, 7-6, 10-9 conditional branching logic, 5-1 creating a switch activity, 5-2 creating an assign activity under the switch activity case block, 5-2 creating an assign activity under the switch activity otherwise block, 5-4 running the OrderBooking process, 5-6 summary, 5-6 validating, compiling, and deploying a process, 5-5 connecting to a database, 10-3, 10-5 to Oracle BPEL Server, 1-5 connections configuring a database instance design-time connection, 10-3 configuring a JDeveloper database connection, 10-4 testing the database connection, 10-5 console starting, 1-4 copy rules creating, 2-10, 2-11, 2-13, 3-5, 4-7, 5-2, 8-6, 9-4, 9-7, 9-8, 10-15, 10-16, 10-18, 10-19, 11-5, 11-6, 11-11, 11-12 CreateOrderBookingUI application, 5-6, 6-4, 9-10, 10-21 CreditRatingService process, 2-2 selecting for a partnerlink, 2-6
B
BatchOrderProcessing process deploying, 8-7 running, 8-7 BPEL errors section errors during validation, compilation, and deployment, 2-14 browser requirements, 1-5 setting browser preferences in JDeveloper BPEL Designer, 1-5
D
Dashboard tab viewing deployed processes, 3-7, 8-7, 9-5, 9-9, 10-21, 11-7, 13-3 viewing started services, 2-2, 3-2 database adapter, 10-1 adding exception handling, 10-17 configuring a BPEL server runtime connection, 10-4 configuring a database instance design-time connection, 10-3 configuring the oc4j-ra.xml file, 10-4 creating a database connection and sample
C
catch all branches creating, 6-1, 10-17 compiling BatchOrderProcessing process, 8-7 FulfillOrder process, 10-11 OrderApproval process, 11-7 OrderBooking process, 2-14, 3-6, 4-9, 5-5, 6-3, 9-9, 10-20, 11-13, 12-4 POAcknowledge process, 9-4, 13-3
Index-1
tables, 10-3 creating a JDeveloper database connection, 10-4 creating a partner link, 10-6, 10-13 creating a project, 10-2 creating a scope activity, 10-14 creating a transform activity, 10-8 creating an assign activity, 10-15 creating an invoke activity, 10-7 creating invoke and receive activities, 10-14 creating sample tables, 10-5 importing a schema, 10-2 running the FulfillOrder process, 10-11 running the OrderBooking process, 10-21 summary, 10-22 testing the database connection, 10-5 testing transformation logic, 10-11 validating, compiling, and deploying, 10-11, 10-20 verifying that the database table is properly inserted, 10-12 database tables, 10-3 creating, 10-5 DBInsert process selecting for a partner link, 10-7 deploying BatchOrderProcessing process, 8-7 FulfillOrder process, 10-11 OrderApproval process, 11-7 OrderBooking process, 2-14, 3-6, 4-9, 5-5, 6-3, 9-9, 10-20, 11-13, 12-4 POAcknowledge process, 9-4, 13-3 developer prompt starting, 1-4 using, 2-2, 3-2, 10-5 domain passwords, 2-14, 3-6, 4-9, 5-5, 6-3, 8-7, 9-5, 9-9, 10-11, 10-20, 11-7, 11-13, 13-3
F
fault handling and exception management, 6-1, 10-17 creating a catch all branch, 6-1, 10-17 running the OrderBooking process, 6-3 summary, 6-4 validating, compiling, and deploying, 6-3 file adapter read functionality, 8-1 creating a partner link, 8-3, 8-4 creating a project, 8-2 creating an assign activity, 8-6 creating receive and invoke activities, 8-5 running, 8-7 summary, 8-8 validating, compiling, and deploying, 8-7 write functionality, 9-1 creating a partner link, 9-2, 9-5 creating a scope activity, 9-6 creating an assign activity, 9-4, 9-7, 9-8 creating an invoke activity, 9-3 creating invoke and receive activities, 9-6 POAcknowledge process, 9-5 running the OrderBooking process, 9-9 summary, 9-11 validating, compiling, and deploying, 9-4, 9-9 FileReadAdapter process selecting for a partnerlink, 8-4 flow activities creating, 4-3 flow link following the instance execution process, 2-16, 3-7, 4-10, 5-6, 6-4, 8-8, 10-22 for-each node using in transformations, 7-7, 10-9 FulfillOrder process deploying, 10-11 running, 10-11 selecting for a partner link, 10-13
E
e-mail configuration for notifications, 13-1 errors during validation, compilation, and deployment, 2-14 invalid settings, 2-7 parsing errors when creating a partner link, 2-6, 3-3, 4-3, 8-5, 9-6, 10-13, 11-9 validation errors during transformation testing, 10-11 Esc key stopping creation of XPath expressions, 2-11, 5-2, 9-7, 9-8, 10-15, 10-16, 10-18, 10-19, 11-5, 11-6, 11-11, 11-12 exception management, 6-1 Expression field using keyboard shortcuts to enter information, 2-11, 5-3, 5-4, 9-8, 10-16, 11-5, 11-12, 13-2
H
human workflow, 11-1 creating a new project, 11-2 creating a partner link, 11-9 creating a scope activity, 11-10 creating a user task activity, 11-3 creating an assign activity, 11-11 creating an assign activity inside the switch activity, 11-5 creating invoke and receive activities, 11-10 importing a schema, 11-2 running the OrderApproval process, 11-7 running the OrderBooking process, 11-13 summary, 11-16 validating, compiling, and deploying, 11-7, 11-13
I
importing
Index-2
schemas, 2-3, 7-2, 10-2, 11-2 insertTable.sql, 10-5 installation, 1-1 instances state, 2-15, 4-10, 4-11 verifying creation of process instances, 2-15, 3-7, 4-10, 5-5, 5-6, 6-4, 8-8, 9-10 Internet Explorer do not copy and paste with, 3-7, 4-9, 5-6, 9-10, 10-21, 11-7, 11-14, 12-5 supported browser version, 1-5 introduction adding conditional branching logic, 5-1 adding parallel flow, 4-1 adding transformation logic, 7-1 creating fault handling and exception management, 6-1 designing human workflow, 11-1 designing the database adapter to insert data, 10-1 invoking a synchronous service, 2-1 invoking an asynchronous service, 3-1 using notifications, 13-1 using sensors, 12-1 using the file adapters read functionality, 8-1 using the file adapters write functionality, 9-1 invalid settings error, 2-7 invoke activities creating, 2-7, 3-3, 4-5, 8-5, 9-3, 9-6, 10-7, 10-14, 11-10
N
notification activities creating, 13-2 Notification Wizard using, 13-2 notifications, 13-1 creating a notification activity, 13-2 running, 13-3 summary, 13-4 through e-mail, 13-1 validating, compiling, and deploying, 13-3 ns_emails.xml file configuring for e-mail notifications, 13-1
O
obant running, 2-2, 3-2 oc4j-ra.xml file configuring for the database adapter, 10-4 Oracle BPEL Console accessing, 2-2, 2-14, 3-7, 4-9, 5-6, 6-3, 8-7, 9-5, 9-9, 10-11, 10-21, 11-7, 11-13, 12-4, 13-3 password, 2-2 running a process, 2-14, 3-7, 4-9, 5-6, 6-3, 8-7, 9-5, 9-9, 10-11, 10-21, 11-7, 11-13, 12-4, 13-3 starting, 1-4 Oracle BPEL Process Manager starting components, 1-4 Oracle BPEL Server configuring a connection, 10-4 connecting to, 1-5 LocalBPELServer connection, 1-5 starting, 1-4 Oracle BPEL Worklist Application accessing, 11-8, 11-14, 12-5 approving or rejecting a task, 11-8, 11-14, 12-5 Order Booking business goal, 1-2 business problem, 1-2 business solution, 1-2 deploying, 2-14 how to use this tutorial, 1-4 overview of tutorial, 1-1 OrderApproval process deploying, 11-7 running, 11-7 OrderBooking process compiling, 5-5 deploying, 3-6, 4-9, 6-3, 9-9, 10-20, 11-13, 12-4 running, 2-14, 3-7, 4-9, 5-6, 6-3, 9-9, 10-21, 11-13, 12-4 selecting for a partner link, 8-5 OrderBookingPO_1.xml file copying and pasting content of, 3-7, 4-9, 5-6, 9-10, 10-21, 11-7, 11-14, 12-5 overview of tutorial, 1-1
J
JDeveloper BPEL Designer setting hostname in Web browser preferences, 1-5 starting, 1-4
K
keyboard shortcuts using to enter information in Expression fields, 2-11, 5-3, 5-4, 9-8, 10-16, 11-5, 11-12, 13-2
L
LocalBPELServer automatically creating a connection to Oracle BPEL Server, 1-5 using to deploy a process, 3-6, 4-9, 5-5, 6-3, 8-7, 9-5, 9-9, 10-11, 10-20, 11-7, 11-13, 12-4, 13-3
M
mapper file creating transformation mappings in, 10-8 Mozilla Firefox supported browser version, 1-5 7-4, 7-9,
Index-3
P
parallel flow, 4-1 creating a flow activity, 4-3 creating a partner link, 4-2 creating an assign activity, 4-7 creating invoke and receive activities, 4-5 running the OrderBooking process, 4-9 starting and testing your services, 4-2 summary, 4-11 validating, compiling, and deploying, 4-9 partner links creating, 2-5, 4-2, 8-3, 8-4, 9-2, 9-5, 10-6, 10-13, 11-9 creating asynchronous services, 3-2 passwords domain, 2-14, 3-6, 4-9, 5-5, 6-3, 8-7, 9-5, 9-9, 10-11, 10-20, 11-7, 11-13, 13-3 Oracle BPEL Console, 2-2 phase 1 invoking a synchronous service, 2-1 phase 10 designing human workflow, 11-1 phase 11 using sensors, 12-1 phase 12 using notifications, 13-1 phase 2 invoking an asynchronous service, 3-1 phase 3 adding parallel flow, 4-1 phase 4 adding conditional branching logic, 5-1 phase 5 creating fault handling and exception management, 6-1 phase 6 adding transformation logic, 7-1 phase 7 using the file adapters read functionality, 8-1 phase 8 using file adapters write functionality, 9-1 phase 9 designing the database adapter to insert data, 10-1 POAcknowledge process deploying, 9-4, 13-3 running, 9-5, 13-3 POAService process selecting for a partner link, 11-9 preface heading PH PrefaceHead, ix PT PrefaceTitle, ix process instances verifying creation of, 2-15, 3-7, 4-10, 5-5, 5-6, 6-4, 8-8, 9-10 processes incrementing versions, 6-3, 9-9, 10-20, 11-13 projects creating, 2-3, 7-1, 8-2, 10-2, 11-2 Index-4
do not include special characters in project names, 2-3, 7-2, 8-2 PT PrefaceTitle, ix
R
RapidDistributors process, 3-2 selecting for a partnerlink, 3-3 receive activities creating, 3-3, 4-5, 8-5, 9-6, 10-14, 11-10 running BatchOrderProcessing, 8-7 FulfillOrder, 10-11 OrderApproval, 11-7 OrderBooking, 2-14, 3-7, 4-9, 5-6, 6-3, 9-9, 10-21, 11-13, 12-4 POAcknowledge, 9-5, 13-3
S
schema importing, 2-3, 7-2, 10-2, 11-2 scope activities creating, 2-7, 9-6, 10-14, 11-10 creating a catch all branch inside a scope activity, 6-1, 10-17 Select Manufacturing user application accessing to enter a price quote, 4-2, 4-10, 5-6, 6-4, 8-8, 10-21, 11-14, 12-5 SelectManufacturing process, 3-2 selecting for a partnerlink, 4-3 sensor actions creating, 12-2 sensors, 12-1 creating, 12-1 creating activity sensors, 12-3 creating sensor actions, 12-2 running the OrderBooking process, 12-4 summary, 12-6 validating, compiling, and deploying, 12-4 server starting, 1-4 special characters do not use in project or element names, 2-3, 7-2, 8-2 SQL Worksheet running, 10-12 starting developer prompt, 1-4 JDeveloper BPEL Designer, 1-4 Oracle BPEL Console, 1-4 Oracle BPEL Process Manager components, 1-4 Oracle BPEL Server, 1-4 server, 1-4 summary, 3-8 conditional branching logic, 5-6 database adapter, 10-22 fault handling and exception management, 6-4 file adapter read functionality, 8-8
write functionality, 9-11 human workflow, 11-16 notifications, 13-4 parallel flow, 4-11 sensors, 12-6 synchronous services, 2-17 transformation logic, 7-9 switch activities creating, 5-2 synchronous services, 2-1 creating a new workspace and project, 2-3 creating a partner link, 2-5 creating an assign activity, 2-9, 2-11, 2-12 creating scope and invoke activities, 2-7 importing the schema, 2-3 running the OrderBooking process, 2-14 starting and testing your services, 2-2 summary, 2-17 validating, compiling, and deploying, 2-14
8-6, 9-7, 10-8, 10-14, 10-15, 11-10, 11-11 manually creating, 10-18 versions of processes, 6-3, 9-9, 10-20, 11-13
W
wait activities creating, 10-19 Web browser requirements, 1-5 setting browser preferences in JDeveloper BPEL Designer, 1-5 while activities creating, 10-19 Workflow Wizard running, 11-3 workspace creating, 2-3 WritePOA process selecting for a partner link, 9-5 WSDL file selecting for a partner link, 2-6, 3-3, 4-2, 8-4, 9-3, 9-5, 10-7, 10-13, 11-9 WSIL browser selecting a service, 2-6, 3-3, 4-2, 8-4, 9-3, 9-5, 10-7, 10-13, 11-9
T
TaskActionHandler process, 2-2 TaskManager process, 2-2 testing transformation logic, 7-8, 10-11 text editor use for copying and pasting, 3-7, 4-9, 5-6, 9-10, 10-21, 11-7, 11-14, 12-5 transform activities creating, 7-3, 10-8 transformation logic, 7-1 creating a POAcknowledge project, 7-1 creating a transform activity, 7-3, 10-8 importing a schema, 7-2 summary, 7-9 testing, 7-8, 10-11 transformation_1 mapper file, 7-4, 7-9, 10-8 transformations mapping sources and targets, 7-4, 10-8 using a concat function, 7-5, 7-6, 10-9 using a for-each mode, 7-7, 10-9 validation errors, 10-11 tutorial how to use, 1-4
X
XPath expressions creating, 2-10, 2-11, 2-13, 3-5, 4-7, 5-2, 8-6, 9-4, 9-7, 9-8, 10-15, 10-16, 10-18, 10-19, 11-5, 11-6, 11-11, 11-12
U
user task activities creating, 11-3
V
validating BatchOrderProcessing process, 8-7, 10-20 FulfillOrder process, 10-11, 11-13, 12-4 OrderApproval process, 11-7 OrderBooking process, 2-14, 3-6, 4-9, 5-5, 6-3, 9-9 POAcknowledge process, 9-4, 13-3 variables automatically creating, 2-8, 3-4, 3-5, 4-6, 4-7, 8-5, Index-5
Index-6