Oracle® BPEL Process Manager Order Booking Tutorial 10g (10.1.3.1.0) Part Number B28987-01 |
|
|
View PDF |
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 Task 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) topics. 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 Control.
Observe the sensor results.
This section contains these tasks:
Double-click OrderBooking.bpel in the Application 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 the Create icon.
Select Sensor Action 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 the Create icon.
Select Sensor Action from the list that appears.
The Create Sensor Action window appears.
Enter the following details.
Field | Description |
---|---|
Name | BAMPublisher |
Publish Type | JMS Topic |
JMS Connection Factory | jms/TopicConnectionFactory |
Publish Target | jms/demoTopic |
Filter | Leave empty. |
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 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 Control by selecting Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > BPEL Control (or refresh the page if it is already open).
Enter the following details to log into Oracle BPEL Control and click Login:
Field | Value |
---|---|
Username | oc4jadmin |
Password | password |
Where password
is the value you entered during installation.
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 Application Navigator section in Oracle JDeveloper.
Right-click OrderBooking.
Select Deploy > my_integration_server_connection > Deploy to default domain.
Increment the version number of the project when prompted and click OK.
This compiles the BPEL process. Check for errors by clicking the buttons at the bottom of the window. If there are no errors, deployment was successful. If deployment was unsuccessful, see Step 4.
Log into Oracle BPEL Control by selecting Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > BPEL Control (or refresh the page if it is already open).
Enter the following details to log into Oracle BPEL Control and click Login:
Field | Value |
---|---|
Username | oc4jadmin |
Password | password |
Verify that the OrderBooking instance appears under the Dashboard tab.
Click the OrderBooking instance.
Click the XML Source radio button.
Use a text editor to copy and paste the contents of OrderBookingPO_1.xml
into the field that appears.
Click Post XML Message.
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:8888/SelectManufacturingUI
Refresh Oracle BPEL Control and note that the process is pending on POAService.
Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > Sample Worklist Application to access the login window for Oracle BPEL Worklist Application.
Log in as jcooper
/welcome1
.
The list shows the task awaiting user actions.
Select Claim in the Actions list and click Go to claim a task.
Select Approve from the Task Action list, and click Go.
Log out as user jcooper
.
Log in as jstein
/welcome1
(the default manager of jcooper
in the hierarchy).
Select Approve in the Task Action list, and click Go.
Refresh Oracle BPEL Control and confirm that the instance has completed.
Click the Sensor Values link to confirm the sensor results.