Protocol Modelling is a graphical language for modelling behaviour. It uses a combination of state diagrams and data :
The picture shows a Protocol Model of a banking system. There are two objects in the model: Customer and Account. A customer is modelled by the single machine Customer shown at the top. Once a customer has registered (with the action Register) she can open any number of accounts (with the action Open). Each account is modelled using two machines:
The state of the Funds Check machine (customer in credit or customer overdrawn) is calculated based on whether the total balance of all the accounts held by the customer is positive or negative. Using calculated states (a feature unique to Protocol Modelling) allows complex behavioural rules to be represented easily. ModelScope is an interpreter that supports direct execution of Protocol Models. This allows a model to be demonstrated and confirmed with stakeholders easily and quickly, thereby ensuring that the abstractions and rules used in the model are correct.
The screenshot shows ModelScope execution of the model described above. The user has just attempted to withdraw from account number 004 owned by customer Fred. As the amount of the attempted withdraw was greater than Fred's total available funds of £30 it was not allowed and a pop-up error alert displayed. You can run this model yourself by:
|
|