Associating UML profiles to pattern libraries

You can associate a UML profile with a pattern, and then choose a UML profile stereotype or UML profile-contained enumeration as the type for a specific pattern parameter. As a pattern author, you can use stereotypes to further constrain the types of elements that can bind to a parameter when a pattern is applied. You can associate multiple UML profiles with one pattern library.

Before you begin

When you apply a pattern, bindings occur only from the set of stereotyped arguments to parameters that declare the type as such. During application, you can request the creation of a default argument for a pattern parameter type of a UML profile stereotype or UML profile-contained enumeration, which creates a new model element with the appropriate stereotype applied. When the pattern is applied, the instantiation of a pattern that is associated with a UML profile applies that particular UML profile to the target model. If the UML profile is not available, the instantiation does not occur and a message is displayed.


  1. Click File > New > Project.
  2. In the New Project wizard, select the Show All Wizards check box, expand Pattern authoring, click Pattern Library, and click Next.
  3. In the New Plug-in Project window, on the Plug-in Project page, type a project name and click Next.
  4. On the Plug-in Content page, accept the default values, and click Next.
  5. On the Templates page, select the Create a plug-in using one of the templates check box, and from the list of available templates, select Plug-in with Patterns, and click Next.
  6. In the New Pattern Authoring Plug-in Project window, on the Pattern Library page, from the Patterns Framework list, select Generalized UML Patterns Framework.
  7. Beside the Optionally associate one or more UML profiles with this pattern library field, click Add.
  8. In the Select Profile window, select a profile to add from either the Deployed Profile list or from your workspace and click OK. The new UML profile that is associated with the pattern library appears in the Optionally associate one or more UML profiles with this pattern library field.
  9. Click Finish.

What to do next

You can now add patterns and parameters to the new pattern library that has a UML profile associated with it.