EPCIS support in BizTalk RFID 2009 - Part 1

13.04.2009 04:15 - category: Technologies: Programming - Source: msdn

BizTalk RFID 2009 provides support for generating EPCIS events and converting the EPCIS events into EPCIS documents. We will start with a pictorial of the EPCIS support in this release.

image

As you see, there is good support to generate EPCIS compliant documents with the EPCIS Object Model and with the set of samples provided in the product.

Generating EPCIS Documents from a RFID Business Process

The RFID Business process is designed to receive Tag Read Events or Tag List Events asynchronously and components within the business may transform such events appropriate to their business logic. In BizTalk RFID 2009, we provide two sample event handlers to generate EPCIS events (not EPCIS documents) from within a process.

Transform EH

Using this EH, you may transform a raw tag read event into an EPCIS event. This sample generates only EPCIS Object events. You will need to extend this event handler to generate EPCIS Aggregation or EPCIS Quantity events. The configuration screen for the event handler is shown below.

clip_image003

If you have static data for the properties, you may enter it in the configuration dialog. The properties need to be entered in the URN format and some examples are shown below

BizLocation: urn:epc:id:sgln:0614141.12345.0

Business Step: urn:shipping

Disposition:urn: active

ReadLocation: urn:Contoso:ReceivePortal1

MSMQ EH

The MSMQ Sample EH that ships with BizTalk RFID 2009 enables you to store any object into a user specified queue. When you provide the Queue name, please make sure to provide the full path to the Q, such as .PRIVATE$<Queue Name>. If you omit the full path and just provide the Queue name, the sample will be unable to post to the Queue.

Using the above 2 event handlers, you now have EPCIS events in a queue. The next step is to take the events out of this queue and post it to a capture service, which we shall describe in the EPCIS Posting application.

Generating EPCIS Documents from a .NET Application

In this scenario, we look at a .net application receiving Tag Read Events from BizTalk RFID and needs to generate EPCIS Documents. The application would use the EPCIS Object Model (implemented in the namespace Microsoft.Rfid.Epcis) to first convert the raw events to EPCIS events. The application would then use the Capture client classes in the EPCIS OM to serialize the events into an EPCIS document and forward it to the capture service. We illustrate this via some sample code

Sample code

This sample code illustrates

  • Creation of a custom EPCIS event "TemperatureEvent" using the BizTalk RFID EPCIS OM
  • Forwarding the custom EPCIS event to a capture service

You could modify this code sample to send base EPCIS events to the capture service instead of the temperature event.

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SensorServices.Rfid.Epcis;
using Microsoft.SensorServices.Rfid.Epcis.Serialization;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.IO.SensorServices.Rfid.Client;
using System.Collections.ObjectModel;
using Microsoft.SensorServices.Rfid;
using Microsoft.SensorServices.Rfid.TagDataTranslation;

// Assumptions:
// You have a real/simulated device 'DockDoor1'
// You are running the sample Capture Service

namespace EPCISOMSamples
{
// We are creating a user defined event - TemperatureEvent

Original text is here

www.sitename.com

  Add comment

Name: 
E-Mail: 
Comment: 
Enter code: