Roles are symbolic placeholders describing the participation of objects within a given context. Targeted objects are necessarily symbolic but can be active (roles played by agents in activities, aka actors) or passive (roles as functional relationships). While the former usage is straightforward, the latter overlaps with standard relationships and can be ignored.
Roles are Symbolic Placeholders
Roles may or may not be associated with identified individuals, and what they do may or may not be recorded persistently.
Roles, Actors, References
Roles (aka “actors” in UML use cases) describe the part played by objects within the context of activities. While they are inherently transient and represented as such with the corresponding activity, roles can also be recorded persistently if their contribution is to be registered independently of the impact on referenced individuals.
Roles and Identities
As for their identification, three levels may be considered depending on their bind to performing agents:
- Anonymous: performing agents or targeted objects do not have to be identified.
- Transient: individual identities are required for the duration of the performance, for instance for confidentiality.
- Bound: the agent’s identity is required and recorded in order to keep track of what has been done and maintain consistency.
Roles must be represented as such if they have to be traced to identified agents.
Roles and Composition
Roles may be combined using the standard operators for aggregation, composition or alternative.
When roles are to be played by different agents in different activities they may eventually be detached from context and associated with abstract representations. But it must be reminded that such a decision should not be done at requirements level lest it preempts modeling decisions by analysts.
Roles and Polymorphism
Roles and polymorphism are dual facets of indirection:
- The former are static descriptions used when different types of objects can play the same part in activities.
- The latter is a dynamic description used when objects with undefined type are to behave differently when receiving the same message.
Combining both levels of indirection is pivotal for the modeling of heterogeneous systems along time. Roles are used when types are known beforehand, polymorphism when collaboration is to be supported without prior knowledge. That is especially useful for architectures:
- Services (i.e roles played by systems), are understood or implemented differently by the systems (agents) performing them.
- Roles played at system boundaries must be characterized depending on communication channels: analog, numeric, or symbolic.
- Within system boundaries, one should distinguish between passive roles, played by symbolic objects, e.g planners or strategists, and active ones, played by processes, e.g controllers.
Roles are placeholders describing the participation of objects within a given context. Targeted objects are necessarily symbolic but can be active (roles played by agents in activities, aka actors) or passive (roles as functional relationships). While the former usage is straightforward, the latter overlaps with standard relationships and can be ignored.