9.4 Profiles

A profile is a collection of stereotype definitions, tag definitions, and constraints relevant for a specific domain or purpose. For example, you can group the Project and Made Of stereotypes with their tag definitions and constraints in this chapter into a profile for project management. The project management profile may then be reused when working with other project management systems besides the one in this book.

In the UML, a profile is shown as a package marked with the profile keyword, and a model and all its diagrams may be shown as a package marked with the model keyword. Figure 9-7 shows a Learning UML package, which would contain the diagrams and model elements defined in this book. From that package, you see a dependency to the Project Management profile, which would contain the stereotype definitions, tag definitions, and constraints used for project management, as defined in this chapter. The profiles are packages, as discussed in Chapter 3, and we may show their content on this diagram as well.

The dependency in Figure 9-7 is an applied profile dependency. When drawn from a client model package to a supplier profile package, such a dependency indicates that the client model uses the supplier profile; that is, the elements in the model use the elements in the profile. In the UML, an applied profile dependency is shown as a dashed arrow from a client model to a supplier profile marked with the appliedProfile keyword. Figure 9-7 shows that the Learning UML model uses the Project Management profile to define the project management system discussed in this book.

Figure 9-7. Profiles