There are three types of data that can appear on the output of a system. The three types of data are determined by the mechanism that is used to provide the data item.
The three types of data are:
- Data entered into the system from outside the system
- Data calculated in the system with data in the system
- Data created by processes in the system
To describe the three different data types, consider the following example report. Students are allowed to withdraw money from an account. A limit is applied to how much a student can withdraw each month. A student can choose to override the limit but any override needs to be approved by a responsible adult. This report shows those transactions that override the limit.
- In order to identify whether appropriate limit breaches are being approved
- As a Parent
- I want to see transactions that breach the limit, along with the reason and the approver.
Data entered into the system from outside the system
In this example, the Student Name, Monthly Limit, Withdrawal Amount and reason to override the limit. All of these data items need to be enter either via a user interface or a system interface.
Values are either entered free format, or selected from a list of permitted values (The items in the list of permitted values are originally entered free format.
Data calculated in the system with data in the system
These are the values that are calculated within the system. In this example the balance and the % above limit. To indicate that these are calculated value, I prefix the name with “get”. Account.getBalance and Transaction.get%AboveLimit.
Account.getBalance(QueryDate) = Sum(Transaction.Amount) where transaction.date before QueryDate and after 1st Day of monthMonth
Transaction.Transaction.get%AboveLimit = ( Account.getBalance(Transaction.Date) – Account.Limit ) / Account.Limit )
Data created by processes in the system
These values are created by processes in the system. In this example, Date, Approved by and Approval Date. These values are all populated in a THEN in a GIVEN-WHEN-THEN statement. We start at the last step in the process which in this case is the approval.
- THEN Approved by is set to the logged in user.
- AND the Approval Date is set to the current Date & Time.
- WHEN the withdrawal is approved
- GIVEN the approval screen is displayed
- AND a withdrawal above the limit is on the screen
- AND the user is logged on
- AND the user is an approver for the Account
Similarly (and ignoring the approval e:mail steps in between)
- THEN the Date is set to the current Date & Time
- AND an approval is sent to list of users who are approvers for the account.
- WHEN the student overrides the limit
- GIVEN the student is on the limit override screen
Understanding the three types of data means you ensure the correct approach for populating them is adopted.
This blog post was inpired by a conversation with Rekha Kusumanchi about the Cotswold Way. My thanks to Rekha.