Skip Headers
Oracle® BPEL Process Manager Order Booking Tutorial
10g Release 2 (10.1.2)
B15813-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

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 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:

12.2 Adding Sensors

This section contains these tasks:

12.2.1 Creating Sensors

  1. Double-click OrderBooking.bpel in the Applications 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 Create.

  14. Select Sensor Actions 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 Create.

  21. Select Sensor Actions from the list that appears.

    The Create Sensor Action window appears.

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

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

  28. Select Save from the File main menu.

12.2.2 Running, Validating, and Deploying the OrderBooking Process

  1. 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).

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

  3. Click the Manage link.

  4. Click Undeploy at the bottom of the window.

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

  6. Click Done when prompted.

  7. Go to the Applications Navigator section in JDeveloper BPEL Designer.

  8. Right-click OrderBooking.

  9. Select Deploy > LocalBPELServer > Deploy to default domain.

  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.

12.2.3 Running the Order Booking Process

  1. 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).

  2. Click the BPEL Processes tab.

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

  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. Scroll down and click Mark as Default to make this the default version of OrderBooking.

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

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

  8. Click the Dashboard tab.

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

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

  13. Click Post XML Message.

  14. Click Audit Instance.

    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.

    The list shows the task awaiting user actions.

  19. Select Acquire in the Actions list and click Go to acquire a task.

  20. Select Accept from the Task Action list, and click Go.

  21. Log out as user jcooper.

  22. Log in as jstein/welcome (the default manager of jcooper in the hierarchy).

  23. Select Accept in the Task Action list, and click Go.

  24. Refresh Oracle BPEL Console and confirm that the instance has completed.

  25. 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: