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

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

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

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:

12.1 Introduction

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:

12.2 Adding Sensors

This section contains these tasks:

12.2.1 Creating Sensors

  1. Double-click OrderBooking.bpel in the Application Navigator section.

  2. Double-click the receiveInput Receive activity.

  3. Click the Sensors tab.

  4. Click Create to access the Create Activity Sensor window.

  5. Enter InstanceStart in the Name field.

  6. Select Completion from the Evaluation Time list.

  7. 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. Expand and select Variables > inputVariable > payload.

  10. Click OK.

    The Create Activity Variable Sensor window displays the following details:

    Description of obph11sen1.gif follows
    Description of the illustration obph11sen1.gif

  11. Click OK to return to the Create Activity Sensor window.

  12. Click Add in the Sensor Actions section.

    The Sensor Action Chooser window appears.

  13. Select Sensor Actions and click the Create icon.

  14. Select Sensor Action from the list that appears.

    The Create Sensor Action window appears.

  15. Enter ReportsPublisher in the Name field.

  16. Select Database from the Publish Type list.

  17. Click OK.

    The Sensor Action Chooser window appears.

  18. Select ReportsPublisher and click OK to return to the Create Activity Sensor window.

  19. Click Add in the Sensor Actions section.

    The Sensor Action Chooser window appears.

  20. Select Sensor Actions and click the Create icon.

  21. Select Sensor Action from the list that appears.

    The Create Sensor Action window appears.

  22. 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.

  23. Click OK.

    The Sensor Action Chooser window appears.

  24. Select BAMPublisher and click OK to return to the Create Activity Sensor window.

    The Create Activity Sensor window appears as follows:

    Description of obph11sen2.gif follows
    Description of the illustration obph11sen2.gif

  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.

    Description of obph11sen3.gif follows
    Description of the illustration obph11sen3.gif

  27. 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

  28. Select Save from the File main menu.

12.2.2 Running, Validating, and Deploying the OrderBooking Process

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

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

    Field Value
    Username oc4jadmin
    Password password

    Where password is the value you entered during installation.

  3. Click the latest OrderBooking instance process to undeploy in the Dashboard tab.

  4. Click the Manage link.

  5. Click Undeploy at the bottom of the window.

  6. Click OK when prompted to mark all open instances for this process as stale.

  7. Click Done when prompted.

  8. Go to the Application Navigator section in Oracle JDeveloper.

  9. Right-click OrderBooking.

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

  11. 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.

12.2.3 Running the Order Booking Process

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

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

    Field Value
    Username oc4jadmin
    Password password

  3. Verify that the OrderBooking instance appears under the Dashboard tab.

  4. Click the OrderBooking instance.

  5. Click the XML Source radio button.

  6. Use a text editor to copy and paste the contents of OrderBookingPO_1.xml into the field that appears.

    Note:

    Do not copy and paste from Internet Explorer or Mozilla Firefox. You must use a text editor to perform this task.
  7. Click Post XML Message.

  8. Click Audit Instance.

    Note that the SelectManufacturing process is pending and waiting for a price quote.

  9. Provide a price quote for SelectManufacturing from the following graphical user interface:

    http://localhost:8888/SelectManufacturingUI
    
  10. Refresh Oracle BPEL Control and note that the process is pending on POAService.

  11. Select Start > All Programs > Oracle - Oracle_Home > Oracle BPEL Process Manager > Sample Worklist Application to access the login window for Oracle BPEL Worklist Application.

  12. Log in as jcooper/welcome1.

    The list shows the task awaiting user actions.

  13. Select Claim in the Actions list and click Go to claim a task.

  14. Select Approve from the Task Action list, and click Go.

  15. Log out as user jcooper.

  16. Log in as jstein/welcome1 (the default manager of jcooper in the hierarchy).

  17. Select Approve in the Task Action list, and click Go.

  18. Refresh Oracle BPEL Control and confirm that the instance has completed.

  19. Click the Sensor Values link to confirm the sensor results.

12.3 Summary

You have now added sensors to the OrderBooking process. You performed the following key tasks: