My first Publication Agile-Data-Warehouse-Design-eBook | Page 254

234 Chapter 8 How Many measured end-to-end. If this happens stakeholders will instinctively tell process stories with multiple when details, as described in Chapter 2, that represent the milestones that must be reached to complete the process. Retrospectively as evolving: You can remodel an evolving event from multiple discrete events, when you discover, with the help of an event matrix, that they represent a process sequence (as described in Chapter 4). Adding milestone details is straight- forward when there is a 1:1 relationship between events When an evolving event can have repeating milestones, the most recent or total milestone details are stored as part of the event Ask how many questions to discover repeating milestones Whichever route you come to it, modeling an evolving event involves adding multiple milestone details to an event table, as in the Figure 8-4 example which shows shipment, and delivery milestones added to CUSTOMER ORDERS. Adding these milestone details is straightforward when there is a 1:1 relationship between all the events, because their granularity is unchanged by merging them; for exam- ple, if each order is associated with exactly one shipment, followed by exactly one delivery, all the details would naturally align and no information is lost by aggre- gating multiple events, or “made up” by allocating portions of events. However, if an evolving event story can have repeating milestones (multiple occur- rences of a specific milestone) there is a 1:M relationship between events, and something has to be done to bring everything to the same granularity. For example, if a single order line item for 100 units results in 4 staggered shipments from the warehouse that are then batched up in 2 deliveries by the carrier, the 4 shipment events and 2 delivery events need to be reduced to a single record to match the order event. The simplest way to align the multiple milestones is to record the totals for their additive quantities and the most recent values for all other details. For example, DELIVERY DATE and CARRIER, in Figure 8-4, hold the last deliv- ery date and the last carrier (if more than one carrier was used) and DELIVERED QUANTITY holds the running total number of items delivered, so far, for each order line item. You discover the cardinality of milestones by asking how many questions about each milestone verb—these are hidden in the prepositions for the milestone details, particularly in the milestone when details. For the evolving CUSTOMER ORDERS event you would ask the following questions based on SHIP DATE: How many shipments can there be for an ordered product ? If the stakeholders’ answer is “more than one”, you should ask: When there is more than one ship date for an order, which one will you use to measure the order process? The best way to ask this type of question, about multiple milestone values, is to get stakeholders to fill out the evolving event table with example stories.