WebSphere brand IBM WebSphere Premises Server 6.1 Feature Pack for Sensor Event Services

Aggregation

The Aggregation Reusable Component records aggregation of tags to a parent in the back-end system.

The association between children and parent allows for complex queries such as inference of siblings to enhance read results by querying the Inference Reusable Component. Recorded aggregations can be undone by calling the Disaggregation Reusable Component.

The Aggregation Reusable Component can collect multiple events into a single aggregate action. The API methods for this capability are: start, addToAggregation or addToAggregationEvent, and stop. When called in this order, multiple events can be collected by multiple calls to addToAggregation or addToAggregationEvent. The aggregate action is triggered when the stop method is called.

Optional agent properties can be used to control how the collection of events takes place:

allowCrossLocationAggregation
The possible values for this property are true or false. The default value is false. When the value for this property is set to false, all locations (sourceId) of the events must match. Any call to addToAggregation or addToAggregationEvent from a different location results in a CrossLocationAggregationNotEnabledException message, and excludes that event from the single generated aggregation event.

When set to true, this property allows events with different locations to be included in the same aggregation. Also when the value of this property is set to true, you must set the primeLocation property to tell the Reusable Component which location to use for the single generated aggregation event.

primeLocation
The value for this property is a location string.

All IBM® Sensor Event data and payload metadata is maintained in a call to the EPCIS Connector. Because the EPCIS Connector applies metadata to the EPCIS event based on the location (sourceId), the primeLocation property can have an important role. For building an EPCIS aggregation event, certain metadata is required to specify which tags in the payload are the parent tags. For more information, see Working with the EPCIS Connector sample application.

WebSphere Premises Server configuration

Table 1. Aggregation agent properties
Name Description PID Agent properties
AggregationAgent RUC Aggregation Agent com.ibm.premises.reusable.aggregation.AggregationAgent
  • ruc.targetBackend=ruc.epcis
  • aggregate.output.success=rucresponse/aggregation/aggregate/success
  • aggregate.output.failure=rucresponse/aggregation/aggregate/failure
  • start.output.success=rucresponse/aggregation/start/success
  • start.output.failure=rucresponse/aggregation/start/failure
  • add.output.success=rucresponse/aggregation/add/success
  • add.output.failure=rucresponse/aggregation/add/failure
  • stop.output.success=rucresponse/aggregation/stop/success
  • stop.output.failure=rucresponse/aggregation/stop/failure

WebSphere Application Server configuration

Table 2. Aggregation specification values
Name JNDI name Destination type Destination JNDI name Message selector Bus name
AggregationRUCAS eis/AggregationRUCAS Topic jms/ibmse ibmse LIKE ‘rucaction/aggregation/%’ OR ibmse LIKE ‘%/rucaction/aggregation/%’ ibmsensorevent

Methods

Using the Aggregation Reusable Component

To invoke the Aggregation Reusable Component using IBM Sensor Events or XML, the payload must include:
  • PassiveRFIDTagRead
  • PassiveRFIDAggregatedTagRead
Generic payload created from a map can also be used. It must include either of the following:
  • AggregationRUCConstants.TAG_KEY_INOUT
  • AggregationRUCConstants.TAGLIST_KEY_INOUT
Note: TAG_KEY_INOUT takes a String value. TAGLIST_KEY_INOUT takes a value of java.util.List populated with Strings.
doe
To publish to Reusable Components MDBs, set the following values for the JMS topic and eventType. For multi-action Reusable Components, the topic is checked in the message selector and in the MDB code.
  • aggregate: profileid/rucaction/aggregation/aggregate
  • start: profileid/rucaction/aggregation/start
  • addToAggregation: profileid/rucaction/aggregation/add
  • stop: profileid/rucaction/aggregation/stop
The JMS topic and eventType for the MDB output from the Reusable Component comes from the agent properties. Default output topics for success and failure for each action are shown in Table 1. There is no payload.

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.