blob: 2093d06da9d15f11a3666b6e514bf7be4df97bec [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.epf.uma:ContentDescription xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:org.eclipse.epf.uma="http://www.eclipse.org/epf/uma/1.0.5/uma.ecore"
xmlns:epf="http://www.eclipse.org/epf" epf:version="1.5.0" xmlns:rmc="http://www.ibm.com/rmc"
rmc:version="7.5.0" xmi:id="-V_0kmI76XRz-UHHq2rP2Ag"
name="using_method_content_variability,_8YIMYCNQEdycLddDalDmbA" guid="-V_0kmI76XRz-UHHq2rP2Ag"
changeDate="2008-10-17T01:48:42.829-0700" version="7.1.0">
<mainDescription>&lt;p>&#xD;
This guideline explains how to utilize method content variability to modify an existing element without directly&#xD;
changing the original element's base definition, or to create a new element based on an existing element. Changes are&#xD;
defined in a separate content package or plug-in, and the original plug-in is kept intact. Thus, it allows you to&#xD;
change method elements by simply changing a configuration (in other words, changing what plug-ins and packages are&#xD;
included in the configuration).&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
Variability involves textual attributes and relationships.&amp;nbsp; In other words you can use variability to add, delete&#xD;
change, or reuse&amp;nbsp;both text and relationships.&amp;nbsp;&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
Variability is defined between two elements of the same type:&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Base element: The target of the variability; the element being changed (or used as a base for new element)&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Variability element: The element containing the changes (or new content or relationships) to be combined with the&#xD;
base&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;p>&#xD;
The base element is never changed directly. All changes (or new content) is defined in the variability element. The&#xD;
variability element specifies which element is the base.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
As shown in Figure 1, when both the base element and the varaibility element are inlcluded in a configuration, the&#xD;
configuration &quot;resolves&quot; the variability to produce the result, where that result depends on what variability was used.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
&lt;strong>Figure 1. Method content variability elements&lt;/strong>&lt;br />&#xD;
&lt;/p>&lt;br />&#xD;
&lt;p>&#xD;
&lt;img alt=&quot;variability_elements&quot; src=&quot;./resources/variability.gif&quot; border=&quot;0&quot; />&amp;nbsp;&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
There are different types of variability, each with their own characteristics, rules, pros and cons. Table 1 provides a&#xD;
summary of the different types of variability and when you might want to use them.&lt;br />&#xD;
&lt;br />&#xD;
&lt;/p>&#xD;
&lt;table title=&quot;Method Content Variability Summary&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;85%&quot;&#xD;
summary=&quot;summary of different types of method content variability&quot; border=&quot;1&quot;>&#xD;
&lt;caption>&#xD;
&lt;strong>Table 1. Method Content Variability Summary&lt;/strong>&#xD;
&lt;/caption>&#xD;
&lt;tbody>&#xD;
&lt;tr>&#xD;
&lt;td>&#xD;
&lt;strong>Variability Type&lt;/strong>&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;strong>Result&lt;/strong>&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;strong>Possible Uses&lt;/strong>&#xD;
&lt;/td>&#xD;
&lt;/tr>&#xD;
&lt;tr>&#xD;
&lt;td>&#xD;
Contributes&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;p>&#xD;
Contributing element adds to the base element&lt;br />&#xD;
(result = base element plus contributed characteristics)&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Contributing (variability) element adds to the base element.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
The base appears in the published Web site, but the contributing element does not.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Incoming and outgoing relationships from the contributing element are added to the base&lt;br />&#xD;
Exception: If the relationship is a &quot;to one&quot; relationship (for example, a task has at most one&#xD;
primary performing role) then the relationship in the contributor is ignored if the base already&#xD;
has one.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Text from the contributing element is appended to corresponding base sections.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
A base element can have more then one contributor.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Contributes works transitively (a contributing element contributes its own contributors).&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Add guidance to an existing element&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Add steps to an existing task&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Add responsibility for a work product to a role&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Add a primary performing role to a task&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Add a work product to a task (as an input or output work product)&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Add text to existing elements&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Adding method elements to existing categories&lt;br />&#xD;
&lt;br />&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;/tr>&#xD;
&lt;tr>&#xD;
&lt;td>&#xD;
Replaces&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;p>&#xD;
Replacing element replaces parts of the base element (incoming relationships remain)&lt;br />&#xD;
(result = new element, no base element)&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Replacing (variability)&amp;nbsp;element replaces parts of the base element.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
The replacing element&amp;nbsp;appears in the published Web site but the base element does not.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Outgoing relationships in the replacing element are maintained, and the base's are ignored.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Incoming relationships to the base are maintained and added to the replacing element.&lt;br />&#xD;
Exception: If the replacing element has an incoming to-one relationship (for example, a replacing a&#xD;
role that includes a task performs the role relationship),&amp;nbsp;the replacing element&amp;nbsp;replaces&#xD;
that relationship in the&amp;nbsp;base element.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Text in the replacing element is left maintained, the base's text is ignored.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
A base element can only be replaced by one replacing element at a time. If two elements replace the&#xD;
same base element,&amp;nbsp;only one can be used for interpretation (the plug-in containing one of the&#xD;
replacing elements needs to be removed from the configuration or no replacement will take place).&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Replacement works transitively (if a replacing element is replaced itself, then&amp;nbsp;the final&#xD;
replacing element will prevail).&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Replace an existing method content element with another method content element&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;/tr>&#xD;
&lt;tr>&#xD;
&lt;td>&#xD;
Extends&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;p>&#xD;
Extending element inherits characteristics of the base element&lt;br />&#xD;
(result = base element + new element)&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Extending (variability) element inherits characteristics of the base element. The base element is&#xD;
unchanged.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Both the extending element&amp;nbsp;and the base appear in the published Web site.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Outgoing relationships from the base are added to the extending element.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Incoming relationships in the extending element&amp;nbsp;are maintained, and the base's are ignored.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Text is included in the extending element from the base element if the extending element&amp;nbsp;did&#xD;
not include any text for the given section.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Extends works transitively (if an extending element is extended itself the second extension&#xD;
inherits from its direct and indirect base elements).&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Define a new element that looks just like an existing element, with some modifications (in other&#xD;
words, define a variant or a specialization of an existing element)&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Extends is not used to modify an existing element&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;/tr>&#xD;
&lt;tr>&#xD;
&lt;td>&#xD;
Extends-Replaces&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;p>&#xD;
Replacing element replaces only values that have been redefined in the replacer&lt;br />&#xD;
(result = new element, no base element)&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Combines the effects of extends and replaces variability, allowing you to selectively replace&#xD;
specific attributes and relationships of the base element.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Extending-replacing (variability) element replaces values in the base element that have been&#xD;
redefined in the&amp;nbsp;extending-replacing element . All other values of the base element are&#xD;
unaffected.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Both the extending-replacing element&amp;nbsp;and the base appear in the published Web&#xD;
site.&amp;nbsp;&amp;nbsp;&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;td>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Rename an existing element&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Replace a specific textual attribute of a method element&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Replace the outgoing relationships of an existing method element&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Replace the incoming relationships of an existing method element&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;/td>&#xD;
&lt;/tr>&#xD;
&lt;/tbody>&#xD;
&lt;/table>&#xD;
&lt;p>&#xD;
For detailed information on how the different kinds of method content variability affect the different method element&#xD;
relationships, see the attached spreadsheet (&lt;a href=&quot;./resources/Variability%20Cheat%20Sheet.xls&quot;&#xD;
target=&quot;_blank&quot;>Variability Cheat Sheet.xls&lt;/a>).&#xD;
&lt;/p>&#xD;
&lt;h3>&#xD;
Order of Evaluation&#xD;
&lt;/h3>&#xD;
&lt;p>&#xD;
Contribution precedes replacement (the contributes relationship is resolved first, followed by the replaces&#xD;
relationship). The evaluation of contribution and replacement is performed top-down in the specialization hierarchy.&#xD;
&lt;/p>&#xD;
&lt;h3>&#xD;
Handy Tricks&#xD;
&lt;/h3>&#xD;
&lt;p>&#xD;
If you ever find that you want to create an element that looks just like an existing element, but includes some&#xD;
additional content, you can use a combination of extends and contributes to achieve the desired result.&amp;nbsp; To do&#xD;
this, perform the following steps:&#xD;
&lt;/p>&#xD;
&lt;ol>&#xD;
&lt;li>&#xD;
Define a method element that that extends the original base element. This results in a new element that looks just&#xD;
like the original element.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Define another method element that contributes to the extending element and add the desired content. This results&#xD;
in adding the new content to the new element that already includes the original content.&#xD;
&lt;/li>&#xD;
&lt;/ol>&#xD;
&lt;p>&#xD;
The net resutl:&amp;nbsp;A new element that includes the original content plus the new content.&#xD;
&lt;/p></mainDescription>
</org.eclipse.epf.uma:ContentDescription>