Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle SOA Suite
11g Release 1 (11.1.1.4.0)

Part Number E10224-06
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

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

47 Defining Composite Sensors

This chapter describes how to define composite sensors in a SOA composite application.

This chapter includes the following sections:

47.1 Introduction to Composite Sensors

Composite sensors provide a method for implementing trackable fields on messages. Composite sensors enable you to perform the following tasks:

You define composite sensors on service and reference binding components in Oracle JDeveloper. This functionality is similar to variable sensors in BPEL processes. During runtime, composite sensor data is persisted in the database.

47.1.1 Restrictions on Use of Composite Sensors

Note the following restrictions on the use of composite sensors:

  • Functions can only be used with the payload. For example, XPath functions such as concat() and others cannot be used with properties.

  • Any composite sensor that uses expressions always captures values as strings. This action makes the search possible only with the like comparison operator. Also, even if the value is a number, you cannot use other logical operators such as <, >, =, and any combination of these.

  • Composite sensors only support two types of sensor actions: Enterprise Manager and JMS.

  • Header-based sensors are only supported for web service bindings.

  • Sensor actions for Oracle B2B, service data objects (SDOs), web services invocation framework (WSIF), and Oracle Business Activity Monitoring bindings are not supported.

  • Sensor values can only be one of the following types.

    1. The following scalar types:

      • STRING

      • NUMBER

      • DATE

      • DATE_TIME

    2. Complex XML elements

  • When creating an XPath expression for filtering, all functions that return a node set must be explicitly cast as a string:

    xpath20:upper-case(string($in.request/inp1:updateOrderStatus/inp1:orderStatus) ) = "PENDING"
    

47.2 Adding Composite Sensors

You add sensors to service or reference binding components of a SOA composite application in the SOA Composite Editor.

47.2.1 How to Add Composite Sensors

To add composite sensors:

  1. Use one of the following options to add a composite sensor in the SOA Composite Editor.

    1. Right-click a specific service or reference binding component in the Exposed Services or External References swimlane to which to add a composite sensor, and select Composite Sensors.

      The Composite Sensors dialog for the selected binding component appears, as shown in Figure 47-1.

      Figure 47-1 Composite Sensors Dialog for the Selected Binding Component

      Description of Figure 47-1 follows
      Description of "Figure 47-1 Composite Sensors Dialog for the Selected Binding Component"

    2. Click the Add icon.

    or

    1. Click the Composite Sensor icon above the SOA Composite Editor, as shown in Figure 47-2.

      Figure 47-2 Composite Sensor Icon

      Description of Figure 47-2 follows
      Description of "Figure 47-2 Composite Sensor Icon"

      The Composite Sensors dialog for the SOA composite application appears, as shown in Figure 47-3.

      Figure 47-3 Composite Sensors Dialog

      Description of Figure 47-3 follows
      Description of "Figure 47-3 Composite Sensors Dialog"

    2. Select the specific service or reference to which to add a composite sensor, then click the Add icon.

    The Create Composite Sensor dialog appears, as shown in Figure 47-4.

    Figure 47-4 Create Composite Sensor Dialog

    Description of Figure 47-4 follows
    Description of "Figure 47-4 Create Composite Sensor Dialog"

  2. Enter the details shown in Table 47-1.

    Table 47-1 Create Composite Sensor Dialog

    Name Description

    Name

    Enter a name for the composite sensor. You must enter a name to enable the Edit icon of the Expression field.

    Service

    Displays the name of the service. This field only displays if you are creating a composite sensor for a service binding component. This field cannot be edited.

    Service sensors monitor the messages that the service receives from the external world or from another composite application.

    Reference

    Displays the name of the reference. This field only displays if you are creating a composite sensor for a reference binding component. This field cannot be edited.

    Reference sensors monitor the messages that the reference sends to the external world or to another composite application.

    Operation

    Select the operation for the port type of the service or reference.

    Expression

    Click the Edit icon to invoke a dropdown list for selecting the type of expression to create:

    • Variables: Select to create an expression value for a variable. See Section 47.2.2, "How to Add a Variable" for instructions.

    • Expression: Select to invoke the Expression Builder dialog for creating an XPath expression. See Section 47.2.3, "How to Add an Expression" for instructions.

    • Properties: Select to create an expression value for a normalized message header property. These are the same properties that display under the Properties tab of the invoke activity, receive activity, reply activity, OnEvent branch of a scope activity (in BPEL 2.0), and OnMessage branch of a pick activity and a scope activity (in BPEL 2.0). See Section 47.2.4, "How to Add a Property" for instructions.

    Filter

    Click the Edit icon to invoke the Expression Builder dialog to create an XPath filter for the expression. You must first create an expression to enable this field.

    For example, you may create an expression for tracking purchase order amounts over 10,000:

    $in.inDict/tns:inDict/ns2:KeyValueOfstringstring/ns2:Value > 10000.00
    

    Composite Sensor Actions

    Displays the supported sensor actions. This feature enables you to store runtime sensor data. You can select both Enterprise Manager and either JMS Queue or JMS Topic.

    • Enterprise Manager

      Select to make runtime sensor data searchable in the Instances tab of a SOA composite application in Oracle Enterprise Manager Fusion Middleware Control Console. This selection is the same as the DBSensorAction selection of previous releases.

      Note: When Enterprise Manager is selected, sensor data is sent to the trackable fields tables. When it is not selected, data is not sent. However, in both cases, Oracle Enterprise Manager Fusion Middleware Control Console still displays the fields that enable you to search for composite instances based on that sensor.

      For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

    • JMS Queue

      Select to store composite sensor data (XML payload) in a JMS queue. You must specify the JMS connection factory and queue name.

    • JMS Topic

      Select to store composite sensor data (XML payload) in a JMS topic. You must specify the JMS connection factory and topic name.

    Notes: The JMS Queue and JMS Topic selections enable the composite sensor data (XML payload) to be used by other consumers, including Oracle Business Activity Monitoring and Oracle Complex Event Processing (CEP). Both selections use the native JMS support provided with Oracle WebLogic Server, and not the Oracle SOA Suite JMS adapter described in Oracle Fusion Middleware User's Guide for Technology Adapters. You can view JMS messages in the Oracle WebLogic Server Administration Console.

    For information about using sensor data with Oracle Business Activity Monitoring, see Chapter 50, "Integrating Oracle BAM with SOA Composite Applications."


  3. Click Apply to add more composite sensors.

  4. Click OK when complete.

    A composite sensor icon displays on the service or reference binding component, as shown in Figure 47-5.

47.2.2 How to Add a Variable

The Select XPath Expression dialog shown in Figure 47-6 enables you to select an element for tracking.

To add a variable:

  1. Expand the tree and select the element to track.

  2. Click OK when complete.

47.2.3 How to Add an Expression

The Select Properties shown in Figure 47-7 enables you to create an expression for tracking.

To add an expression:

  1. Build an XPath expression of an element to track.

  2. Click OK when complete.

47.2.4 How to Add a Property

The Select Property shown in Figure 47-8 enables you to select a normalized message header property for tracking.

To add a property:

  1. Select a normalized message header property to track.

  2. Click OK when complete.

47.3 Monitoring Composite Sensor Data During Runtime

During runtime, composite sensor data can be monitored in Oracle Enterprise Manager Fusion Middleware Control Console:

For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.