Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GS1 EPCIS Events #552

Closed
wants to merge 1 commit into from
Closed

GS1 EPCIS Events #552

wants to merge 1 commit into from

Conversation

nissimsan
Copy link
Collaborator

@nissimsan nissimsan changed the title feat: EPCIS Events GS1 EPCIS Events Aug 30, 2022
term: EPCISAssociationEvent
'@id': https://ref.gs1.org/epcis/AssociationEvent
title: EPCIS Association Event
description: The event type AssociationEvent describes the association or disassociation of one or several physical objects with a parent object or a specific physical location. Like the AggregationEvent, the AssociationEvent is also used to capture associations where there is a strong physical relationship between the containing and the contained objects such that they will all occupy the same location at the same time, until such time as they are disaggregated. However, the AggregationEvent does not allow for associations of objects with physical locations; if action is DELETE while omitting the childEPC and childQuantityList field, all contained children are disaggregated from the containing parent. Because there are situations in which associations are more permanent, i.e. beyond the physical flow of goods (e.g. packing/unpacking and loading/unloading), an AssociationEvent SHOULD be used (a) when objects need to be associated with a physical location or (b) when the parent object could also be subject to other, more temporary associations (i.e. captured using AggregationEvent).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: The event type AssociationEvent describes the association or disassociation of one or several physical objects with a parent object or a specific physical location. Like the AggregationEvent, the AssociationEvent is also used to capture associations where there is a strong physical relationship between the containing and the contained objects such that they will all occupy the same location at the same time, until such time as they are disaggregated. However, the AggregationEvent does not allow for associations of objects with physical locations; if action is DELETE while omitting the childEPC and childQuantityList field, all contained children are disaggregated from the containing parent. Because there are situations in which associations are more permanent, i.e. beyond the physical flow of goods (e.g. packing/unpacking and loading/unloading), an AssociationEvent SHOULD be used (a) when objects need to be associated with a physical location or (b) when the parent object could also be subject to other, more temporary associations (i.e. captured using AggregationEvent).
description: The event type AssociationEvent describes the association or disassociation of one or several physical objects with a parent object or a specific physical location. Like the AggregationEvent, the AssociationEvent is used to capture associations where there is a strong physical relationship between the containing and the contained objects, such that they will all occupy the same location at the same time, until such time as they are disaggregated. However, the AggregationEvent does not allow for associations of objects with physical locations; if action is DELETE while omitting the childEPC and childQuantityList field, all contained children are disaggregated from the containing parent. Because there are situations in which associations are more permanent, i.e., beyond the physical flow of goods (e.g., packing/unpacking and loading/unloading), an AssociationEvent SHOULD be used (a) when objects need to be associated with a physical location or (b) when the parent object could also be subject to other, more temporary associations (i.e., captured using AggregationEvent).

- eCommerce
description: >-
The document recording a transaction between the seller and the buyer. Commercial invoices are normally prepared by sellers.
The commercial invoice on itself does not grant any ownership of the goods, unless it has an attached document proving the importer's payment for the total amount. The number of copies of the invoice (both original and copies) required for the delivery of the goods, must be agreed with the importer. Usually, invoices are issued with the original and two copies. Although normally the legislation in different countries does not limit the number of originals, it is not advisable to make more than those strictly necessary in order to accomplish with the customs needs required by the buyer. It is advisable that the importer confirms with the exporter all data that the invoice must provide before its issuing, as well as the particularities it must include in order to accomplish with the regulation of the destination country.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The commercial invoice on itself does not grant any ownership of the goods, unless it has an attached document proving the importer's payment for the total amount. The number of copies of the invoice (both original and copies) required for the delivery of the goods, must be agreed with the importer. Usually, invoices are issued with the original and two copies. Although normally the legislation in different countries does not limit the number of originals, it is not advisable to make more than those strictly necessary in order to accomplish with the customs needs required by the buyer. It is advisable that the importer confirms with the exporter all data that the invoice must provide before its issuing, as well as the particularities it must include in order to accomplish with the regulation of the destination country.
In itself, the commercial invoice does not grant any ownership of the goods, unless it has an attached document proving the importer's payment for the total amount. The number of copies of the invoice (both original and copies) required for the delivery of the goods, must be agreed with the importer. Usually, invoices are issued with the original and two copies. Although normally the legislation in different countries does not limit the number of originals, it is not advisable to make more than those strictly necessary in order to comply with the customs needs required by the buyer. It is advisable that the importer confirm with the exporter all data that the invoice must provide before its issuing, as well as the particularities it must include in order to comply with the regulation of the destination country.

@mgh128
Copy link

mgh128 commented Aug 30, 2022

Thanks for preparing this. I clicked on the link and although I definitely don't want to discourage you, I have a few comments:

The part that somewhat resembles an EPCIS event won't validate against our schema at https://ref.gs1.org/standards/epcis/epcis-json-schema.json or
https://ref.gs1.org/standards/epcis/epcis-shacl.ttl

because

  • eventList is not expected as a direct property of EPCISDocument - it is a property of the EPCISBody class that is the range of the epcis:epcisBody property of an EPCISDocument - so if you'd like the EPCIS event to be valid, you can't really skip or omit epcis:epcisBody - please see the example below.
  • eventTime is missing from the event - so there's no indication of the timestamp of the event
  • Neither a parentID nor childQuantityList or childEPCs are present - so there is no indication of which objects were involved
  • "bizStep" : "assembling" only works if the standard JSON-LD context for EPCIS is referenced (at https://ref.gs1.org/standards/epcis/epcis-context.jsonld ), since this maps the bare word "assembling" to the CURIE cbv:BizStep-assembling (which in turn corresponds to https://ref.gs1.org/cbv/BizStep-assembling - and that URL should resolve directly to the term as soon we correct that temporary glitch when somebody changed the server configuration during July/August, even though it had been working previously).
  • Also, both schema:globalLocationNumber and gs1:globalLocationNumber expect a 13-digit numeric string representation of a GLN - without any dots or any of the other weird re-arrangement that the EPC URN formats use. (Thankfully, a constrained subset of GS1 Digital Link URIs can now be used in EPCIS / CBV 2.0 instead of EPC URNs, while the recently ratified GS1 Tag Data Standard 2.0 introduces new EPC binary encodings that avoid the rearrangement and also translate in a more straightforward way to/from GS1 Digital Link URIs or element strings and eschew the EPC URN notation altogether for those new EPC schemes)

If it's easier to take an example of an AssociationEvent that should validate, please consider using something such as https://ref.gs1.org/docs/epcis/examples/association_event-a.jsonld - it's already fairly minimal

@nissimsan
Copy link
Collaborator Author

@mgh128,

Excellent feedback. Not discouraged at all! :) Your first 4 points I 100% expected. Like I said, I only aimed for a super basic starting point, so all those points were expected. So thanks for confirming!

I'm not exactly sure how to deal with bullet 4. Will need some nerding around. Any input on how to make it work with the trace-vocab constraints is appreciated.

Your last bullet we also discussed on the trace call yesterday. We have a Place class already which also has a GLN, and was hinting at using it. But it isn't the exact same, so probably won't be compatible that way.

@mgh128
Copy link

mgh128 commented Aug 31, 2022

@nissimsan

Regarding bullet point 4, did you already try referencing (within your existing @context declaration) our standard JSON-LD context for EPCIS ( https://ref.gs1.org/standards/epcis/epcis-context.jsonld ) - and if so, did it break anything? If not, then I'd expect that it addresses bullet point 4.

Regarding the last bullet point, https://ref.gs1.org/epcis/bizLocation already has a rdfs:range of gs1:Place (which is modelled on schema:Place but extends it in some ways). If instead of using a URN (URI that typically Resolves Nowhere) such as urn:epc:id:sgln:4012345.00002.0 you instead use a corresponding GS1 Digital Link URI such as https://id.gs1.org/414/4012345000023 then it can much more easily link to any Linked Data about that gs1:Place or schema:Place .

Typically within EPCIS event data, we avoid bloating the event data by minimising the amount of unnecessary 'master data' / static data and instead just use URIs, assuming that if anyone needs the master data, they can look it up via the URI. Obviously that's much more practical with a Web URI than a URN. So we wouldn't typically include schema:globalLocationNumber or gs1:globalLocationNumber within the event data, nor any other descriptive details that are the same each time that URI appears within an event.

In case you're wondering what /414/ is within https://id.gs1.org/414/4012345000023 it's the GS1 Application Identifier for a GS1 Global Location Number of a physical location. (414 = physical location GLN, 417 = GLN of an organisation)

@nissimsan
Copy link
Collaborator Author

Closing this Draft PR - I will move this discussion to an issue.

@nissimsan nissimsan closed this Sep 13, 2022
@nissimsan nissimsan mentioned this pull request Sep 14, 2022
@nissimsan nissimsan deleted the epcis-event-schemas branch January 17, 2023 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants