The EPCIS Connector application is installed with WebSphere® Premises Server and the source for the application is provided in the WebSphere Premises Server Toolkit as a sample.
Use the application to convert tag reads and aggregated tag read generic events into EPCIS XML events, messages that adhere to a standard EPCIS schema, that then are augmented with information either from the database or from the generic event. After the EPCIS Connector creates the EPCIS XML messages, it submits them to an EPCIS (such as RFID Information Center) by publishing them to a WebSphere Premises Server MQ queue that is shared between the systems.
Use the EPCIS Connector by enabling the EPCIS persistence parameters in the SystemAgent. The relevant properties are:
If set to true, then all events are sent to the EPCIS Connector. If set to false, then the events are not sent to the EPCIS Connector. The default value is false.
Specifies the queue manager to which the EPCIS XML messages should be written. For example, IBM.DC.QM.
Specifies the queue to which the EPCIS XML messages should be written. For example, EPCIS.Q.
Required event attributes are provided to the EPCIS Connector sample application in one of two ways:
If the attributes are not in the tag event as payload metadata, the application checks the database based on the location that generated the event. The OBJECTINSTANCEMETADATA database table stores the attributes.
At setup time, this database table can be populated directly or through using SQL, as shown in the Example database configuration at the end of this topic. At runtime, the attributes contained in this table can be manipulated using the WebSphere Premises Server API methods, getLocationMetaData and setLocationMetaData. Running applications should not update the database table using SQL statements directly.
The EPCIS XML messages, or events, are of one of four types: ObjectEvent, AggregationEvent, TransactionEvent, and QuantityEvent. The EPCIS Connector sample application can generate all four types of events. Each of these events requires special attributes.
ObjectEvent | AggregationEvent | TransactionEvent | QuantityEvent |
---|---|---|---|
|
|
|
|
You can add information beyond the attributes listed in Table 1 to the EPCIS XML message by using extensions. To add an attribute as an extension to the event, the name of the attribute needs to start with extension., for example extension.expirationDate.
In addition to the required attributes and the extension mechanism, there are four special values of attributes provided either as tag payload-metadata or in the database. These special attributes allow you to decide which type of event to create, as well as how to determine the parent tag from a group of tags in an aggregation message.
An example of this attribute value is: urn:epc:tag:sgtin-96:3.0614141.100734.1
If you want to specify multiple possible EPC tags that might be the parent, then this attribute value could look like this:
urn:epc:tag:sgtin-96:3.0614141.100734.1 urn:epc:tag:sgtin-96:3.0614141.100734.2 urn:epc:tag:sgtin-96:3.0614141.100734.3
If multiple EPCs from the group of tags match the PARENTTAG list, only the first match from the group is used as the parentID in the generated EPCIS event; however, all matching parent tags are removed from the list of childEPCs in the generated EPCIS event.
If multiple EPCs from the group of tags match the PARENTTAGTYPE and PARENTTAGFILTER combination, only the first match from the group is used as the parentID in the generated EPCIS event; however, all matching parent tags are removed from the list of childEPCs in the generated EPCIS event.
ALIAS.hls = urn:epcglobal:hls:1 hls.xsd
This special attribute can be added multiple times for different aliases, resulting in multiple namespace aliases in the XML header of the generated EPCIS event.
The following is an example of the SQL code required to configure the EPCIS Connector to create AggregationEvents from the P2 location:
insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','EVENTTYPE','AggregationEvent',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','PARENTTAGTYPE','sscc-96',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','PARENTTAGFILTER','0',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','action','ADD',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','bizStep','urn:epcglobal:epcis:bizstep:commissioning',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','disposition','urn:epcglobal:epcis:disp:active',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','readPoint','urn:epcglobal:hls:loc:1234567.12345',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','bizLocation','urn:epcglobal:hls:loc:1234567.12345.0001',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','bizTransaction','urn:epcglobal:epcis:trans:1234567',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','bizTransactionType','urn:epcglobal:fmcg:btt:po',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','eventTimeZoneOffset','-5:00',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','extension.batchNo','XYZ123',''); insert into SAGE.OBJECTINSTANCEMETADATA values ('P2','extension.expirationDate','01 Jan 2009',''); commit;