Activity Model
- id - unique id for the Activity(string)
- name - (string)
- description - (string)
- used - Array of UsedEntity objects. UsedEntity stores a Reference to an Entity (id & version) and a flag if this entity was "executed" as part of the Activity
- etag - optimistic concurrency flag. Changes with each update (string)
- createdOn
- modifiedOn
- createdBy
- modifiedBy
Used & GeneratedBy
Used links are stored directly in the Activity model object as an array. We have added an additional flag that marks a used entity as "executed" for display purposes.
wasGeneratedBy links are stored for each version of each Entity. Thus you update the entity with the activity id that generated it. You can ask the entity service which activity generated it, and conversely you can ask the activity service what entity versions were generatedBy a given activity.
Modifications to the current Entity API
...