FreeRole anti-pattern
- Full name
Free Role Specialization
- Type
Logical; Scope
- Feature
Role; Relator
- Description
A «Role» type connected to a «Relator» type through a «Mediation» association, is specialized in one or more «Role» types, which in turn are not connected to an additional «Mediation» association
- Justification
Identify the condition required for the instantiation of the subtypes of the role that are not connected to any relator, since no particular condition was defined.
- Constraints
The Free Role Specialization (FreeRole) anti-pattern occurs when a «Role» type connected to a «Relator» through a «Mediation» association, is specialized in other «Role» types, which do not directly own an additional «Mediation» association. Every free role must meet the following requirements:
- Examples

- Refactoring Plans
[OCL] Set derived role as derived: The instantiation of a free role defined by a derivation rule, which can be defined as follows:
context FreeRole-1 :: allInstances() : Set(FreeRole-1)derive : DefinedRole.allInstances()->select( x | <CONDITION>)[New] Add independent relator: a free role is defined by another relator which has no relation to DefiningRelator. Implies the creation of a relator and a mediation, like in the structure:

[New] Add a redefining material relation: a free role is defined by a redefining material relation, like in the structure:

References:
Prince Sales, Tiago. (2014). Ontology Validation for Managers.