WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Working with the EPCIS Connector sample application

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.

Setting the persistence parameters

Use the EPCIS Connector by enabling the EPCIS persistence parameters in the SystemAgent. The relevant properties are:

Providing event attributes

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.

Required event attributes

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.

Table 1. Attributes for the events
ObjectEvent AggregationEvent TransactionEvent QuantityEvent
  • action
  • bizStep
  • disposition
  • readPoint
  • bizLocation
  • bizTransaction
  • bizTransactionType
  • eventTimeZoneOffset
  • action
  • bizStep
  • disposition
  • readPoint
  • bizLocation
  • bizTransaction
  • bizTransactionType
  • eventTimeZoneOffset
  • action
  • bizStep
  • disposition
  • readPoint
  • bizLocation
  • bizTransaction
  • bizTransactionType
  • eventTimeZoneOffset
  • epcClass
  • quantity
  • bizStep
  • disposition
  • readPoint
  • bizLocation
  • bizTransaction
  • bizTransactionType
  • eventTimeZoneOffset

Adding attributes as extensions

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.

Special event attributes

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.

Note: The names of these attributes are case-sensitive, so you must use the capitalization documented here.
EVENTTYPE
Set this attribute to choose which of the four types of events to create. The value for EVENTTYPE should be ObjectEvent, AggregationEvent, TransactionEvent, or QuantityEvent. If no EVENTTYPE is specified, the EPCIS Connector defaults to ObjectEvent.
PARENTTAG
This attribute is used in the AggregationEvent and TransactionEvent types to determine which of the tags in a group of tags is the parent. The value can be a specific EPC tag value or a list of EPC tags separated by spaces. If any value is provided, this attribute has priority over the alternative attributes, PARENTTAGTYPE and PARENTTAGFILTER, which will be ignored.

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.

PARENTTAGTYPE
This attribute is used in the AggregationEvent and TransactionEvent types to determine which of the tags in a group of tags is the parent. For example, in an aggregated tag read, this value tells the EPCIS Connector the tag type of the pallet. An example of this attribute value is sscc-96.
PARENTTAGFILTER
This attribute identifies the EPC tag filter value of the parent. This value is used in combination with the PARENTTAGTYPE to identify the parent tag from a group. An example of this attribute value is 0.

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.alias_name
This attribute allows you to insert a namespace alias into the XML header of the generated EPCIS event. This alias can then be used within the event XML to qualify metadata tags and values that you specify for other attributes. The value of this special attribute must include the full namespace for this alias and should also include the XSD schema file name (including the relative path or URL). These two items should be separated by a space. For example:
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.

Example database configuration

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; 

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.