Closed RalphTro closed 1 year ago
Dear @RalphTro
Thanks a lot for testing. If possible can you please also share the Design Template? Currently, you have provided the InputTemplate. With DesignTemplate it's a bit easier to track the issue.
You are welcome on the <details>
, even I learned that from our OpenEPCIS documentation page :)
Thanks and best regards, Aravinda
Dear @Aravinda93 , Oh, I unfortunately already closed the respective tabs. If you want/it does help, I can create the event sequence/design template anew this afternoon? Kind regards, Ralph
Dear @RalphTro
Np, based on the scenario I have created the Design template so please do not create again.
As per the current flow:
We only keep a single event (Parent event) in memory to ensure we are not using too much memory and to support large event generation. Hence, when creating the AggregationEvent
with DELETE
we are only tracking the previous ObjectEvent
with receiving
. Hence, currently, we do not have a direct way to adopt the SGTIN/LGTIN into the final ObjectEvent
.
One temporary fix is to recreate those identifiers again for the last ObjectEvent
using the IdentifiersNode
(Note: this would only work if you use range
or none
option during the generation of the identifier because for random
it would again generate random identifiers). Attaching the DesignTemplate for your reference).
The second is to chain the link b/w the AggregationEvent
where SGTIN/LGTIN is aggregated into the final ObjectEvent
(Not sure if you will be happy with the design).
Just suggesting these workarounds as we do not have a direct option to adopt currently, Let us know if in case these would suffice your needs. Meanwhile, We will again discuss this internally and see if we can come up with a better solution to handle this. If we want to support these kinds of inheritance may mean that we need to keep track of all events and their identifiers.
Thanks and best regards, Aravinda
Ingenious. Many thanks, @Aravinda93 !
From my POV, we can already close this ticket as both workarounds you suggested (especially the second one) should satisfy the need to support such scenarios.
Dear @RalphTro
Glad you are happy with the solution and everything is working as expected. Based on your confirmation closing the ticket.
Thanks and best regards, Aravinda
Dear @Aravinda93 , In testing https://github.com/openepcis/epcis-testdata-generator/issues/31, I came up with the following chain of events:
See this input template:
```json { "events": [{ "nodeId": 8, "eventType": "ObjectEvent", "eventCount": 1, "locationPartyIdentifierSyntax": "WebURI", "ordinaryEvent": true, "action": "ADD", "eventID": false, "eventTime": { "timeZoneOffset": "+02:00", "specificTime": "2023-08-21T08:00:08+02:00" }, "recordTimeType": "SAME_AS_EVENT_TIME", "businessStep": "COMMISSIONING", "readPoint": { "gcpLength": null, "gln": "4012345123456", "extensionType": "static" }, "referencedIdentifier": [{ "identifierId": 14, "epcCount": 0, "inheritParentCount": 0, "classCount": 1, "quantity": 10 }], "outputReferencedIdentifier": [], "parentReferencedIdentifier": {}, "epcList": [], "quantityList": [], "outputEPCList": [], "outputQuantityList": [] }, { "nodeId": 9, "eventType": "AggregationEvent", "eventCount": 1, "locationPartyIdentifierSyntax": "WebURI", "ordinaryEvent": true, "action": "ADD", "eventID": false, "eventTime": { "timeZoneOffset": "+02:00", "specificTime": "2023-08-25T08:01:43.000+02:00" }, "businessStep": "PACKING", "readPoint": { "gcpLength": 7, "gln": "4012345123456", "extensionType": "static" }, "referencedIdentifier": [{ "parentNodeId": 8, "epcCount": 0, "inheritParentCount": 0, "classCount": 1, "quantity": 5 }, { "parentNodeId": 16, "epcCount": 5, "inheritParentCount": 0, "classCount": 0, "quantity": 0 } ], "outputReferencedIdentifier": [], "parentReferencedIdentifier": { "identifierId": 15, "parentCount": 1 }, "epcList": [], "quantityList": [], "outputEPCList": [], "outputQuantityList": [] }, { "nodeId": 10, "eventType": "ObjectEvent", "eventCount": 1, "locationPartyIdentifierSyntax": "WebURI", "ordinaryEvent": true, "action": "OBSERVE", "eventID": false, "eventTime": { "timeZoneOffset": "+02:00", "specificTime": "2023-08-25T08:02:37.000+02:00" }, "businessStep": "SHIPPING", "readPoint": { "gcpLength": null, "gln": "4012345123456", "extensionType": "static" }, "referencedIdentifier": [{ "parentNodeId": 9, "epcCount": 0, "inheritParentCount": 1, "classCount": 0, "quantity": 0 }], "outputReferencedIdentifier": [], "parentReferencedIdentifier": {}, "epcList": [], "quantityList": [], "outputEPCList": [], "outputQuantityList": [] }, { "nodeId": 11, "eventType": "ObjectEvent", "eventCount": 1, "locationPartyIdentifierSyntax": "WebURI", "ordinaryEvent": true, "action": "OBSERVE", "eventID": false, "eventTime": { "timeZoneOffset": "+02:00", "specificTime": "2023-08-25T08:03:42.000+02:00" }, "businessStep": "RECEIVING", "readPoint": { "gcpLength": null, "gln": "4000001000005", "extensionType": "static" }, "referencedIdentifier": [{ "parentNodeId": 10, "epcCount": 1, "inheritParentCount": 0, "classCount": 0, "quantity": 0 }], "outputReferencedIdentifier": [], "parentReferencedIdentifier": {}, "epcList": [], "quantityList": [], "outputEPCList": [], "outputQuantityList": [] }, { "nodeId": 12, "eventType": "AggregationEvent", "eventCount": 1, "locationPartyIdentifierSyntax": "WebURI", "ordinaryEvent": true, "action": "DELETE", "eventID": false, "eventTime": { "timeZoneOffset": "+02:00", "specificTime": "2023-08-25T08:04:59.000+02:00" }, "businessStep": "UNLOADING", "referencedIdentifier": [{ "parentNodeId": 11, "epcCount": 0, "inheritParentCount": 1, "classCount": 0, "quantity": 0 }], "outputReferencedIdentifier": [], "parentReferencedIdentifier": {}, "epcList": [], "quantityList": [], "outputEPCList": [], "outputQuantityList": [] }, { "nodeId": 13, "eventType": "ObjectEvent", "eventCount": 1, "locationPartyIdentifierSyntax": "WebURI", "ordinaryEvent": true, "action": "OBSERVE", "eventID": false, "eventTime": { "timeZoneOffset": "+02:00", "specificTime": "2023-08-25T08:05:33.000+02:00" }, "businessStep": "STORING", "readPoint": { "gcpLength": null, "gln": "4000001000005", "extensionType": "static" }, "referencedIdentifier": [{ "parentNodeId": 12, "epcCount": 0, "inheritParentCount": 0, "classCount": 1, "quantity": 1 }], "outputReferencedIdentifier": [], "parentReferencedIdentifier": {}, "epcList": [], "quantityList": [], "outputEPCList": [], "outputQuantityList": [] }, { "nodeId": 16, "eventType": "ObjectEvent", "eventCount": 1, "locationPartyIdentifierSyntax": "WebURI", "ordinaryEvent": true, "action": "ADD", "eventID": false, "eventTime": { "timeZoneOffset": "+02:00", "specificTime": "2023-08-25T08:12:36.000+02:00" }, "businessStep": "COMMISSIONING", "referencedIdentifier": [{ "identifierId": 17, "epcCount": 5, "inheritParentCount": 0, "classCount": 0, "quantity": 0 }], "outputReferencedIdentifier": [], "parentReferencedIdentifier": {}, "epcList": [], "quantityList": [], "outputEPCList": [], "outputQuantityList": [] } ], "identifiers": [{ "identifierId": 2, "objectIdentifierSyntax": "WebURI", "instanceData": null, "classData": null, "parentData": { "sscc": { "identifierType": "sscc", "gcpLength": null, "gcp": "4012345", "serialType": "random" } } }, { "identifierId": 3, "objectIdentifierSyntax": "WebURI", "instanceData": null, "classData": { "lgtin": { "identifierType": "lgtin", "gcpLength": 7, "quantityType": "Fixed Measure Quantity", "uom": null, "lgtin": "04012345123456", "serialType": "random", "quantity": 8 } }, "parentData": null }, { "identifierId": 14, "objectIdentifierSyntax": "WebURI", "instanceData": null, "classData": { "lgtin": { "identifierType": "lgtin", "gcpLength": 7, "quantityType": "Variable Measure Quantity", "uom": "KGM", "lgtin": "04012345123456", "serialType": "random", "quantity": 10 } }, "parentData": null }, { "identifierId": 15, "objectIdentifierSyntax": "WebURI", "instanceData": null, "classData": null, "parentData": { "sscc": { "identifierType": "sscc", "gcpLength": null, "gcp": "4012345", "serialType": "random" } } }, { "identifierId": 17, "objectIdentifierSyntax": "WebURI", "instanceData": { "sgtin": { "identifierType": "sgtin", "gcpLength": null, "sgtin": "04012345123456", "serialType": "random", "randomType": "NUMERIC", "randomMinLength": 3, "randomMaxLength": 5 } }, "classData": null, "parentData": null } ] } ```Everything until the receiving event looks good.
And if I make use of the option that an Aggregation event with DELETE must not even have a childEPC/childQuantityList, even the unpacking event still is fine.
I asked myself though: what if a user requires the contained child elements (in this case, SGTINs and an LGTIN) after the parentID was disaggregated? For instance, the latter are required so that they can appear in subsequent events (e.g. the storing event). In this spirit, the tool (correctly) throws an error message indicating that the required identifiers are not available. Do you want to support such scenarios?
BTW: many thanks for making me aware of the trick of embedding a long code block into a
<details>
container! ;-) This makes some issues far more reader-friendly.Many thanks in advance for sharing your thoughts on this matter!
Kind regards, Ralph