Oracle® BPEL Process Manager Order Booking Tutorial
10g Release 2 (10.1.2) B15813-02 |
|
Previous |
Next |
This chapter of the tutorial describes how to insert sensors on activities in the OrderBooking process.
This chapter contains the following topics:
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.
This section contains these tasks:
Double-click OrderBooking.bpel in the Applications Navigator section.
Double-click the receiveInput Receive activity.
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.
Click the icon to the right of the Variable XPath field.
The Variable XPath Builder window appears.
Expand and select Variables > inputVariable > payload.
Click OK.
The Create Activity Variable Sensor window displays the following details:
Click OK to return to the Create Activity Sensor window.
Click Add in the Sensor Actions section.
The Sensor Action Chooser window appears.
Select Sensor Actions and click Create.
Select Sensor Actions from the list that appears.
Enter ReportsPublisher in the Name field.
Select Database from the Publish Type list.
Click OK.
The Sensor Action Chooser window appears.
Select ReportsPublisher and click OK to return to the Create Activity Sensor window.
Click Add in the Sensor Actions section.
The Sensor Action Chooser window appears.
Select Sensor Actions and click Create.
Select Sensor Actions from the list that appears.
The Create Sensor Action window appears.
Enter the following details.
Field | Description |
---|---|
Name | BAMPublisher |
Publish Type | JMS Queue |
JMS Connection Factory | jms/QueueConnectionFactory |
Publish Target | jms/demoQueue |
Filter | Leave unselected. |
Enable | Leave selected. |
Click OK.
The Sensor Action Chooser window appears.
Select BAMPublisher and click OK to return to the Create Activity Sensor window.
The Create Activity Sensor window appears as follows:
Click OK in the Create Activity Sensor window and the Receive window.
Select Save from the File main menu.
The receiveInput Receive activity now includes a sensor icon in the upper right.
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... | Name to Give Sensor... | Evaluation Time To Select... | Variable XPath To Select... |
---|---|---|---|
receiveInput | InstanceStart | Completion | $inputVariable/payload |
receiveSM | ReceivedSMPrice | Completion | $receiveSM_onResult_InputVariable/payload |
receiveRD | ReceivedRDPrice | Completion | $receiveRD_onResult_InputVariable/payload |
invokePOAService | UserReviewStart | Completion | $inputVariable/payload |
receivePOAService | UserReviewComplete | Completion | $inputVariable/payload |
callbackClient | InstanceCompletion | Completion | $inputVariable/payload |
Select Save from the File main menu.
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.
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.
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.
The Managing this BPEL Process window appears.
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. 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.
Click the OrderBooking instance.
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.
Click Audit Instance.
Note that the SelectManufacturing process is pending and waiting for a price quote.
Provide a price quote for SelectManufacturing from the following graphical user interface:
http://localhost:9700/SelectManufacturingUI
Refresh Oracle BPEL Console and note that the process is pending on POAService.
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
.
The list shows the task awaiting user actions.
Select Acquire in the Actions list and click Go to acquire a task.
Select Accept from the Task Action list, and click Go.
Log out as user jcooper
.
Log in as jstein
/welcome
(the default manager of jcooper
in the hierarchy).
Select Accept in the Task Action list, and click Go.
Refresh Oracle BPEL Console and confirm that the instance has completed.
Click the Sensor Values link to confirm the sensor results.