You add argument values to a pattern instance in the Model Explorer
view or in the diagram editor by using the Pattern Parameters page of
the Apply Pattern wizard. In the diagram editor, you
can also use drag and drop gestures to specify values.
Before you can specify arguments for a pattern's parameter, you need
to add a pattern instance to a UML 2.0 model in the Model Explorer
view or to its freeform or class diagram editor.
You can specify arguments for multiple concurrent instances of
the same pattern. An argument value can participate in more than one instance.
Specifying values is a dynamic process: each argument is immediately bound
to the parameter and the pattern's expansion instructions are invoked to perform
the intended modifications to your model. There is no parameter sequence to
follow however, the pattern design may require that certain argument values
be supplied before complete expansion can occur. Consult the pattern documentation
if you have any questions.
Some options to create the pattern instance
also specify an argument at the same time.
The following list represents
the ways you can specify arguments:
- To create a new element with a default name that is added to the model,
hover the cursor over the template parameter and click an element icon in
the action bar.

- To specify an existing element as an argument by dragging it, drag a model
element from the Model Explorer view or in the diagram
editor (the element becomes translucent so you can see the instance) over
the template parameter and drop it.

- To specify an existing element in the model by supplying its name: Hover
the cursor over the template parameter, click the text or value box icon
in the action bar and type the name of an element.

- To create and name a new element that is added to the model, hover the
cursor over the template parameter, click the text or value box icon
in the action bar, and type a unique name next to the parameter to
add the new element.

- To select a value for a template parameter from a set of values, hover
the cursor over the template parameter, click the element icon in the action
bar and double-click one of the values.

To specify argument values for a pattern instance, do one of the following
steps:
- To add values with the Pattern Parameters page of
the Apply Pattern wizard, right-click the instance and
click Pattern Parameters. Follow the
instructions to apply a pattern with the Apply Pattern wizard in the topic
"Using the Apply Pattern wizard" beginning with step 4.
- To specify values using drag and drop gestures in the diagram editor,
do one of the following steps:
- Create a new element with a default name in the pattern instance
- Drag an element in the diagram editor to the pattern instance
- Specify an existing element by supplying its name in the pattern instance
- Create a new element and give it a specific name in the pattern instance
- For parameters that offer sets to select from: select a value from
a pop-up set of values