You must create a pattern instance as the first part of applying
a pattern to your model design. Patterns that you can apply always appear
in the Pattern Explorer view. You can drag the pattern
to a UML 2.0 model or to a model's diagram editor.
The Apply Pattern wizard is another, more
structured, tool option to apply patterns and it creates the pattern instance
in the UML 2.0 model. You can create multiple concurrent instances of the
same pattern.
You can only drag a pattern to elements that can own the
type of pattern you are applying (collaboration, class, or package pattern).
To
create a pattern instance, complete either of the following steps:
- In the Pattern Explorer view, drag a pattern
to the diagram editor owned by a UML 2.0 model. A pattern
instance is created both in the diagram editor and in the model.
- In the Pattern Explorer view, drag a pattern's
template parameter to a matching element type in a UML 2.0 model in the Model
Explorer view (or to an element in the diagram editor). A
pattern instance is created in the model (and on the diagram editor if that
is where you dropped the parameter) with the model target element bound to
the dragged template parameter.
After a pattern instance is created, you can modify it by supplying
arguments for one or more of the pattern's template parameters.
The arguments depend on the pattern design and your requirements for use of
the pattern.