Using the Apply Pattern wizard

The Apply Pattern wizard helps you create a pattern instance and select argument values for the pattern's template parameters. You can continue to add argument values to the pattern instance after using the wizard.

To apply a pattern with the Apply Pattern wizard:

  1. In the Pattern Explorer view, right-click a pattern and click Apply Pattern. The Apply Pattern wizard opens, listing the open UML 2.0 models in your workspace.
  2. In the Select a model element as a pattern instance target list, click the model element you want to contain the pattern instance. Only the elements that can own the type of pattern you are applying (collaboration, class, or package pattern) are available for selection.
  3. Click OK. The Pattern Parameters page of the Apply Pattern wizard opens.
  4. To specify an argument for a parameter, click the Value field for the parameter and do one of the following steps:
    • Click the browse button to open the Select Value window and select an existing element.
    • Type a name to create a new element of the same UML 2.0 type as the template parameter
    • Type the name of an existing element of the same UML 2.0 type as the template parameter
    • For UML 2.0 types that take a primitive value: Type a value that matches the parameter type (for example, an integer, a string, or unlimited natural number).
    • For UML 2.0 types with value sets (or parameters designed to have value sets), select an option from the drop-down list (for example, you select true or false for a literal Boolean type)
  5. To add additional values to parameters (with multiplicity values that allow multiple values), do the following steps:
    1. Click the Value field, and click the Add Value button An additional row in the table is added below the parameter.
    2. Perform one of the options in step 4.
  6. Repeat steps 4 and 5 as needed.
  7. Click Finish. You can see the results of the pattern in your model or models. The pattern instance is in the model you specified.
  8. To specify additional values for the pattern's parameters or modify the selections you have made, in the Model Explorer view, right-click the pattern instance and click Patterns > Add Parameters
  9. Modify the values, and click OK.
Related concepts
Pattern instantiation
Apply pattern process
Related tasks
Using drag and drop
Using the Apply Pattern wizard
Specifying arguments for pattern instances
Modifying pattern instances
Reviewing pattern information
Setting pattern preferences
Importing patterns
Related reference
Pattern icons
Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.