Are there any design patterns or best practices around logging events for use in reporting and BI systems.
For example in a system which manages orders from a website, it would be beneficial if a customer support worker could type in an order number and see that it the order was placed on a certain day, dispatched on a certain day and delivered on another.
I can see 2 ways around this. I have an order object which has the fields:
OrderDate DespatchDate DeliveryDate
and populate them if they have happend otherwise they will be null
log some sort of events like which are messages like:
Order Number - "12312312" - Ordered on '2014/01/01' Order Number - "12312312" - Despatched on '2014/01/01'
and add store the events in a database.
Are there any guidelines for this? For example how does the work item history in TFS work?