openepcis / epcis-testdata-generator

EPCIS 2.0 Testdata Generator
https://openepcis.io
Apache License 2.0
3 stars 2 forks source link

Need better advanced approach to link the corrective eventID #26

Open Aravinda93 opened 1 year ago

Aravinda93 commented 1 year ago

Currently, for eventID we have 2 options either UUID or Hash-ID both of which calculated by the application, there isn't a option to include user-specific eventID, need to add an option to include the user-defined eventID.

sboeckelmann commented 1 year ago

Static eventIDs don't make much sense in testdata generator. It leads to unwanted behavior with eventCount > 1. It must be linked to some generator rule which will create individual, unique eventIDs. I am not sure if this is actually required, because uuid and hash is safe; user-defined isn't.

Aravinda93 commented 1 year ago

@sboeckelmann

Surely, then I will not implement this issue. However, during the process of designing examples based on the GS1 implementation Guidelines, I encountered an issue where I required a specific eventId in UUID format, which was subsequently utilized in the error event. As our system generates random UUIDs, it posed a challenge to reproduce the same UUID for a subsequent event. To address this concern, I propose adding a functionality that allows users to specify their own UUID-formatted eventID. This way, they can reuse the same eventID in subsequent events.

If you confirm we do not need this feature then will close this issue.

sboeckelmann commented 1 year ago

Ok, but this is only related to error declaration, isn't it? We should discuss how this can be implemented using auto-generated UUIDs then. Allowing user-defined eventId may be an option, but then we have to assure eventCount == 1

RalphTro commented 1 year ago

Interesting issue. Though I tend to say that this scenario seems to be an edge case, two comments from my POV:

(a) Instead of a user-defined eventID, what is your take on an event ID value which is inherited from a subsequent event similar to e.g. an EPC? That way, the tool could provide a scalable solution for users who e.g. want to generate 1.000 (incorrect) object events followed by 1.000 corresponding error decaration and 1.000 corrective events. In all 1.000 cases, the eventID of the original event (if needed) is taken over in the errorDeclaration event, and the correctiveEventID(s) are taken over in the corrective events.

(b) It does not necessarily need to be a UUID. Back then we introduced the error declaration feature, we only had the UUID, but it should also work for EPCIS Event Hash IDs. The original event does not even require to have an eventID field in the first place - though it makes sense IMHO to link an error declaration event with the corrective event, if there is one.

Hope this helps. :-)