# Extends

An extending element inherits characteristics of the base element. Extension allows Method Plug-ins to easily reuse elements from a base plug-in by providing a kind of inheritance for the extending element. Attribute values and association instances are inherited from the "based-on" element to the extending element. The result is that the extending element has the same properties as the "based-on" element, but might define its own additions. Extends is not used to modify content of the base plug-in, but to provide the ability for the extending plug-in to define its own content which is a variant of content already defined. For example, a special version of a generic Review Record for a specific type of review. The effect of this is that the base element and any number of extending elements can be used side by side, but refer to each other through the extends relationship. Extends also provides the key mechanism for binding capability patterns to processes: A pattern is applied by defining an extends relationship from an activity of the applying processes to the capability pattern. The activity inherits association instances from the pattern and the pattern appears to be part of the resulting process after interpretation.

Use the Content Variability section on the Description tab to make an element extend another element. Select Extends as the Variability Type, and then select the base element which this element extends. The base element must be the same type of element as the extending element.

Any information you enter in the extending element is added to the base element in creating an additional element. Text fields in the extending element are added at the end of the respective text fields in the base element.

Extends only defines inheritance for the extending element. The base remains untouched. If the extending element is allowed an association to only one other element and has such an element defined itself, inheritance will not override this association.

Extends rules:

- Attribute values of the base element are inherited to the extending element if the extending element has not defined its own values.
- Outgoing to-many associations of the base element are inherited to the extending element.
- Outgoing to-one associations are only inherited if the extending element does not define its own to-one association.
- Extends works transitively, i.e. if an extending element is extended itself, the second extension inherits from its direct and indirect base elements.
- Contribution precedes Extends, i.e. contribution is evaluated first and then extending elements inherit afterwards from the base element (including all of its contribution).
- Replace precedes Extends, i.e. if a base element has a replace and extends relationship, the extending element inherits from the replacing element.

See Variability Associations for more information on the associations for each element type.
Related concepts
Variability
Replaces
Contributes