The Aggregation Reusable Component records the 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.
A very important field for an aggregation event is the parent EPC, under which children EPCs become aggregated. Specify the parent EPC using one of these options:
See EPCIS Connector for more information on these options.
If using the start method to collect events, you may optionally specify these fields as parameters. Pass null for the parameters you do not wish to set.
Optional agent properties can be used to control how the collection of events takes place:
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 EPCIS Connector.
For more details on the possible values for the available task agent properties, see Aggregation agent.
Name | Description | PID | Agent properties |
---|---|---|---|
AggregationAgent | RUC Aggregation Agent | com.ibm.premises.reusable.aggregation.AggregationAgent |
|
See Configuring the messaging interface for the WebSphere® Application Server configuration details.
To invoke the Aggregation Reusable Component using IBM Sensor Events or XML, the payload must include:
Generic payload created from a map can also be used. It must include either of the following:
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.
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.
In addition to the exceptions listed in Troubleshooting the Reusable Components, the following exception can occur with the Aggregation Reusable Component: