oliot epcis at a glance

36
Jaewook Byun Korea Advanced Institute of Science and Technology Real-time and Embedded Systems Laboratory(RESL) [email protected] Oliot EPCIS At a glance

Upload: -

Post on 22-Jan-2017

488 views

Category:

Services


1 download

TRANSCRIPT

Page 1: Oliot epcis at a glance

Jaewook ByunKorea Advanced Institute of Science and TechnologyReal-time and Embedded Systems Laboratory(RESL)

[email protected]

Oliot EPCIS At a glance

Page 2: Oliot epcis at a glance

Table of Contents

1. Introduction2. Installation3. Tutorial4. Programming Guide

Page 3: Oliot epcis at a glance

Introduction – RFID & GS1 EPC global

• Radio Frequency IDentification (RFID)• Identifiable and Traceable everyday-objects• The Internet of Things (IoT)

• GS1 EPCglobal• A complete suite of RFID standards

Page 4: Oliot epcis at a glance

Introduction – EPCIS Standard

• EPC Information Service (EPCIS)• Recent version: version 1.1, May 2014• A distributed repository, which can capture and share EPC-based event/vocabulary accompanying 4W

(i.e. What, When, Where and Why)

Page 5: Oliot epcis at a glance

Introduction – EPCIS Event

• EPCISEvent – Base event type• See. 7.2. section

Object Event Aggregation Event Transaction Event Transformation Event

Receiving time at Capturing ApplicationReceiving time at EPCIS repositoryTimeZone, offset from UTC

Extends

Page 6: Oliot epcis at a glance

Introduction – EPCIS Event

• ObjectEvent• Observation of object(s)

(Optional)Instance level master data: e.g. expiration date

(Optional)

(Optional)

List of Observed objects

e.g. Created, Observed, Destroyed

c.f Red: new in EPCIS v1.1

Page 7: Oliot epcis at a glance

Introduction – EPCIS Event

• AggregationEvent• Association between containing/contained object(s)

Aggregation Event(e.g. box, case, pallet)

e.g. Box, case, pallet

e.g. Trade items in box

e.g. child added, observed, or deleted from parents

(Optional)

Page 8: Oliot epcis at a glance

Introduction – EPCIS Event

• Transaction Event• (Dis)Association of object(s) to business transaction(s)

Transaction Event(Optional)

e.g. Item (dis)associated to the BizTransaction

Business Step Business process e.g. Loading, Packing, Shipping, Receiving

Disposition Status of object Available for sale, in Storage

Business Transaction Transaction information e.g. Purchase, Invoice

Page 9: Oliot epcis at a glance

Introduction – EPCIS Event

• Transformation Event• Capture the relationship between the input (source) and the outputs (product)

Input Outputs

(Optional)

c.f Red: new in EPCIS v1.1

COW Slides of Beef

Page 10: Oliot epcis at a glance

Introduction – EPCIS Vocabulary

• Vocabulary (i.e. Master Data)• Represent static information on EPC

• Core Business Vocabulary (CBV)• supports base vocabularies for Supply Chain Management

• User Vocabulary• defined by user

• Vocabularies• Location: address, zip code, etc• Business Semantic

• Business Step: activity within a business process• Disposition: business state of an object• Business Transaction: purchase order

• Class-level item

[Examples of CBV]

Page 11: Oliot epcis at a glance

Introduction – EPCIS Service

• EPCIS Services• Event Capture• Immediate Query• Scheduled Query

Page 12: Oliot epcis at a glance

Introduction – Oliot EPCIS open source

• Oliot EPCIS• Open source web service compatible with EPCIS v1.1

• How implemented• Model Generation

• JAXB on standard XSD• Service Binding

• SOAP based on standard WSDL• Verification

• XSD verification• Running Environment

• Java Web Service ( Java v1.8, Servlet v3.1 )• Tomcat WAS ( v8.x )• MongoDB ( v3.x )

• Services• Service Bindings: SOAP, REST• Capture Service

• Event data / Master data• Query Service

• Standard ‘SimpleEventQuery’ (See EPCIS 8.2.7 )

BackendRepository

Event Data Master Data

Capture Service Listener

Cap

ture

Lay

er

Application

Quer

y La

yer

Poll Subscription

Scheduler

Schedule Destination

App

Query Service Receiver

Oliot-EPCIS

SOAP/HTTPREST/HTTP

Object-Relational Mapper(POJO Storage Unit)

JAXB Marshaller(XMLPOJO)

Document Validator

Capture

Immediate QueryStanding Query

EPCIS DOC

ResultSOAP/HTTPREST/HTTP

JAXB Unmarshaller (POJO XML)

Object-Relational Mapper(Storage Unit POJO)

XML/JSON

Page 13: Oliot epcis at a glance

Installation - Prerequisite

• Install Java 8

• Install Tomcat 8

• Install MongoDB 3

• Download ‘epcis.war’ from

• https://github.com/gs1oliot/oliot-epcis-1.1/tree/master/epcis/target or

• https://github.com/JaewookByun/epcis/tree/master/epcis/target

• Locate ‘epcis.war’ into [tomcat-folder]/webapps

Page 14: Oliot epcis at a glance

Installation

• Run MongoDB• Run Tomcat Server• See it starts• Access [ip:port]/epcis

Page 15: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Based on GS1 Global Forum 2015 tutorial• You can access it via [ip:port]/epcis/tutorialPage.jsp

How?

Guide three fundamental events

Page 16: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Capture your event 1

Page 17: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Standard XML format for Event 1

Page 18: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Capture your event 2

Page 19: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Standard XML format for Event 2

Page 20: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Capture your event 3

Page 21: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Standard XML format for Event 3

Page 22: Oliot epcis at a glance

Tutorial: How to make EPCIS document

• Visualize it via queries to Oliot EPCIS

Page 23: Oliot epcis at a glance

Tutorial: How to make EPCIS document (Bonus)

• When you want to insert Extra data beyond specification• Use extension field

• If your sensor generates two sensing values• sensorValue1: Float• sensorValue2: List of Integer

• Envelop your values using extension field• ObjectEvent can be a good candidate as an event type• The extra fields should be under a namespace

• e.g. device namespace• (Optional) if you formally define the fields using XSD

• We can get global consensus

sensorValue1: 15

sensorValue2: 10 12 14 19 23

[Example of EPCIS Document]

[(Optional)Example of your XSD]

Page 24: Oliot epcis at a glance

Programming Guide

• Oliot EPCIS is web service• Write a code in language independent way

• e.g. C++, Java, Javascript, Python and etc.• Postman

• Good Tool for your testing• Sending your HTTP call

• e.g. POST, GETMethod Description

GetStandardVersion Return the standard version of EPCIS

EventCapture Capture your EPCIS Document into your backend storage

VocabularyCapture Capture your EPCIS Master Data Document into your backend storage

GetQueryNames Return a list of all query names available

Poll Return events/vocabularies stored in repository in interest immediately

GetSubscriptionIDs Return a list of all subscriptionIDs currently subscribed to the specified named query

Subscribe Register a subscriber for a previously defined query having the specified name

Unsubscribe Remove a previously registered subscription having the specified subscriptionID

Page 25: Oliot epcis at a glance

Programming Guide

• Postman Example (GetStandardVersion)• Return the standard version of EPCIS

• Set URL• Then, Send with GET• See a version if succeed

Page 26: Oliot epcis at a glance

Programming Guide

• Postman Example (Event Capture)• Make you capture your events

• Set URL• Prepare EPCIS document• Then, Send with POST• See HTTP.OK (200) if succeed

Page 27: Oliot epcis at a glance

Programming Guide

• Postman Example (Vocabulary Capture)• Make you capture your vocabularies

• Set URL• Prepare EPCIS document• Then, Send with POST• See HTTP.OK (200) if succeed

Page 28: Oliot epcis at a glance

Programming Guide

• Postman Example (GetQueryNames)• Return a list of all query names available

• Set URL• Then, Send with GET• See result if succeed

Page 29: Oliot epcis at a glance

Programming Guide

• Postman Example (Poll Event Data)• Provide you stored events under

conditions you made

• Set URL with Parameter• Then, Send with GET• See result if succeed

• For more query examples• See [url:port]/epcis/rest-like-query-examples.html

Page 30: Oliot epcis at a glance

Programming Guide

• Postman Example (Poll Master Data)• Provide you stored vocabularies under

conditions you made

• Set URL with Parameter• Then, Send with GET• See result if succeed

• For more query examples• See [url:port]/epcis/rest-like-master-query-

examples.html

Page 31: Oliot epcis at a glance

Programming Guide

• Postman Example (Subscribe)• Provide you ‘periodically’ stored events

to ‘designated URL’ under conditions you made

• Set URL with Parameter• You can use ‘Poll’ parameters• Set additional Parameter

• e.g. dest: Your callback URL• e.g. cronExpression:

• See Rationale• See Cron Expression

• Then, Send with GET• Receive periodic result in Callback URL

Page 32: Oliot epcis at a glance

Programming Guide

• Postman Example (GetSubscriptionIDs)• Returns a list of all subscriptionIDs currently

subscribed to the specified named query.

• Set URL• Then, Send with GET• See ID list if succeed

Page 33: Oliot epcis at a glance

Programming Guide

• Postman Example (Unsubscribe)• Set URL with Parameter• Then, Send with GET• Receive periodic result in Callback URL

Page 34: Oliot epcis at a glance

Further Information

• EPCIS v1.1 specification• Detailed description on • 4 core event types and master data• SimpleEventQuery• ...

• Embedded documentation• Access [base_url:port]/epcis after running your

Oliot EPCIS• Introduction• Service description

• Github• https://github.com/gs1oliot/oliot-epcis-1.1• https://github.com/JaewookByun/epcis

Page 35: Oliot epcis at a glance

Reference

• GS1 EPCglobal: http://www.gs1.org/epcglobal• EPCIS v1.1: http://www.gs1.org/sites/default/files/docs/epc/epcis_1_1-standard-20140520.pdf• CBV v1.1: http://www.gs1.org/sites/default/files/docs/epc/cbv_1_1-standard-20140520.pdf• Oliot Homepage: http://gs1oliot.github.io/oliot/• Github

• https://github.com/gs1oliot/oliot-epcis-1.1• https://github.com/JaewookByun/epcis

Page 36: Oliot epcis at a glance

Thank you