Selectively applying roles to certain bases only
This is a simple example of an automatic teller machine (ATM). Using a known account it is possible to pay cash and to check the balance. Accounts of foreign banks are handled differently from home bank accounts. Additionally, it is possible to participate in special conditions to gain bonus for certain withdrawals.
The latter two requirements are used for demonstrating how roles can be applied selectively to only certain base objects. The desired effect is achieved by means of several guard predicates OTJLD §5.4.