The following tools can help you evolve a system:
You can check a UML model for missing specifications, missing implementations, and circular trace relationships.
You can discover the specifications and implementations of a context element; that is, you can discover elements that are related to the context element through a trace relationship to understand why the context element exists, how the element is implemented, and to clarify the purpose of the element.
Traceability queries check the system to find elements that are related to the context element by one of the following trace relationships:
An implied trace relationship exists between element X and element Y if X is a type of lifeline in a sequence diagram that is contained in collaboration Y.
Derived abstractions are created when the UML-to-Java transformation runs.
The four queries in the following table can help you discover elements that depend on the context element:
| Query | Usage |
|---|---|
| All Specifications | This query starts at a context element and follows all trace relationships in the forward direction to discover all elements in higher levels of abstraction. Another way to phrase this query is, "From which specifications does this element derive?" |
| Specifications | This query is similar to All Specifications, but discovers only the elements in the next higher level of abstraction. |
| All Implementations | This query starts at a context element and follows all trace relationships in the reverse direction to discover all elements in lower levels of abstraction. Another way to phrase this query is, "Which implementations derive from this element?" |
| Implementations | This query is similar to All Implementations, but discovers only the elements in the next lower level of abstraction. |
You can generate trace relationship hyperlinks when a UML model is published in HTML format; in the Web Publish wizard, on the Types tab, select the Specifications section.
You can discover the clients and suppliers of a context element that might be impacted by changes, and then visualize them in a diagram. In other words, you can discover elements that are related to the context element by any dependency relationship, either directly or indirectly, that might need to change as a result of changes to the context element.
The results of impact analysis queries are supersets of the results that traceability queries return. The difference between the results of traceability analysis queries and impact analysis queries is that traceability queries restrict the results to include only elements that are related to the context element by a dependency relationship that spans levels of abstraction, while the impact analysis queries check the system to find elements that are related to the context element by any dependency relationship.
So, the results of impact analysis queries include all elements that are related to the context element by one of the following relationships:
The following table shows the four available impact analysis queries:
| Query | Usage |
|---|---|
| All Suppliers | This query starts at a context element and follows all dependencies in the forward direction to discover all elements that are suppliers of this element. Another way to phrase this query is, "On which elements does this element depend", or "Which elements, if changed or removed, could impact this element?" |
| Suppliers | This query is similar to All Suppliers, but discovers only the elements that are direct suppliers of this element. |
| All Clients | Another way to phrase this query is, "Which elements depend on this element?" or "If this element is changed or removed, which elements could be impacted?" |
| Clients | This query is similar to All Clients, but discovers only the elements that are direct clients of this element. |
You can view the results of traceability and impact analysis queries in a new diagram. You can explore both trace relationships and dependency relationships in a diagram by using the capabilities on the Explore tab of the Palette. The Explore section of the Palette has the following queries:
You can run the traceability and impact analysis queries directly from the diagram to discover relationships one level at a time, as needed. You can discover direct clients and suppliers, or direct specifications and implementations. You select the query item that you want to run and then click the element you want to analyze. For example, to discover direct specifications of a UML class, in the Palette, click the Specifications item and click the UML class in the diagram. Direct specifications, if any exist, are visualized in the diagram.
Also note that the exploration capabilities that are available in a diagram provide a scalable solution to exploring dependencies between elements in the diagram. In complex systems, running a query that searches all levels of abstraction can take a lot of time, and the amount of returned elements might be so large that the results are unusable. To prevent the scalability problem, you can first visualize an element in a diagram and then use the explore capabilities to explore trace and dependency relationships one level at a time, as needed. This is a scalable approach to exploring these relationships in UML diagrams.
To take advantage of the benefits that traceability offers, the process that is used to develop elements must be designed with traceability in mind. Here is what a sample development process looks like: