StefanLazar? wrote asking about Role patterns. I forwarded the query to MartinFowler who gave this reply... ''Stefan Buehlmann: No, have a look at http://www.martinfowler.com/apsupp/roles.pdf
I haven't done any work trying to come up with patterns about defining and using roles (although it is a good idea to do something along those lines). Peter Coad [1] has a very brief outline in his Actor-Transaction pattern, but like most of his patterns its a very generic outline, useful but not that detailed. There are also some ideas discussed by David Hay [2] in his chapter on Contracts. (Hay's book is not an object-oriented book, but is conceptual and thus still very valuable.)
There is divided opinion about how much you should use roles. Coad's style is really to use roles all the time, while Hay's style is to avoid using roles except for very rare cases. This difference in style between Coad and Hay is echoed right across the modeling community.
My own preference is to start without using roles, just putting features on Person, Organization or their supertype: Party. If you find that in different contexts Parties get at significantly different behaviour, then that is the force that leads you to roles. I wouldn't use them without that force (don't build a complication you don't need.)
There is always an alternative to using roles, that is to look at the relationship itself. For example, you can model a person being employed by a company in four ways.
All this is off the top of my head, and is probably a little too general for your particular problem, but I hope it is helpful. If you have any more questions feel free to email me and I will do what I can to help further.Someday I may even write a pattern on this.
[1]Coad, P., North, D. and Mayfield, M. Object Models: strategies, patterns and applications, Prentice Hall, Englewood Cliffs, 1995.
[2]Hay, D. Data Model Patterns: conventions of thought, Dorset House, New York, NY, 1996.
[3]Fowler, M. "Modelling Organization Structures," Report on Object Analysis and Design, 2,2, (1995), pp. 20-23.
I have worked on money transfer systems at banks where the concept of "role" is currently in use (but is now being questioned).
A money transfer involves moving cash from one bank to another - often through a third bank (or other financial institution). Each bank may be a "sending institution" on one money transfer, a "receiving institution" on a second money transfer and a "correspondent bank" (an intermediary) on a third money transfer. Since the information about a bank does not change from one money transfer to the next it is useful to keep the bank information (which remains constant on all of the transactions) separated from the transaction information. The role information currently describes the sequence in which parties in the transaction will send money to one another.
Since the responsibilities of a bank remain constant (pass the money along to the next party in the payment chain) no matter what the role, there have been some discussions about changing the system (an international interbank network) to just have a list of parties.