Exercise 2: Adding content to an existing profile

This exercise examines how the Rose Model Import wizard adds content to an existing profile (Java.epx) when another model (RoseImportSample_custom.mdl) uses additional stereotypes or properties. The exercise also looks at a new custom stereotype applied to the model.

The profile versioning and release mechanism provided in Software Architect and Software Modeler is helpful because it allows one model to reference one version of a profile, while another model can reference a different version of the same profile.

Importing the second Rose sample model (RoseImportSample_custom.mdl)

Before you import the RoseImportSample_custom.mdl file, you must import the RoseImportSample.mdl file in Exercise 1. When you import the RoseImportSample_custom.mdl file, you add additional content to an existing profile, which causes the Rose Model Import wizard to create a new version of the Java.epx profile.
  1. In the Navigator view, click the RoseImportSample_custom.mdl file that resides in the SampleRoseModel project.
  2. Click File > Import. The Import window opens.
  3. Click Rational Rose Model, and then click Next. The Import a Rose Model window opens.
  4. Click the source model Browse button, specify the RoseImportSample_custom.mdl file, and then click Open.
  5. Verify that SampleRoseModel is selected as the existing project, and then click Next. The RoseImportSample_custome.mdl file is scanned and existing profiles are verified for compatibility with the model you are importing (as displayed in the progress bar).
  6. When the progress bar closes, notice that the Finish button on the Resolve Subunits and Path map symbols page is not enabled as it was in Exercise 1. You cannot finish the import process at this step because the next page of the wizard displays a warning message in the header of the wizard. Click Next to advance to the Map Property Sets page and to view the warning message.
  7. On the Map Property Sets page, notice the warning message that states, "The existing profile Java.epx must have the following elements added from the Java properties of the model: The Custom_EJB property set stereotype is not defined." The warning message appears because the existing Java.epx file (created when you imported RoseImportSample.mdl in exercise 1) requires some information from the RoseImportSample_custom.mdl file.
  8. On the Map Property Sets page, complete all of the following steps:
    1. Verify that the Import property sets as UML profiles option is selected.
    2. Make sure that the Reference an existing profile option is selected and that the filepath references the existing Java.epx file. If the Java.epx profile is checked in to a source control system, a message window opens indicating that the file must be checked out (after you click Finish).
    3. Click Finish. The Java.epx profile is updated and saved as a new released version; the RoseImportSample_custom.mdl is imported.

Examining the Java.epx release number

Once you have imported the RoseImportSample_custom.mdl file, notice how the profile release number changed.

  1. In the Model Explorer view, expand the SampleRoseModel_Profiles folder, navigate to the Java.epx file, and click the Java profile element that resides under the Java.epx file.
  2. In the Properties view, click the General tab and notice the profile release number of 8.2.1

Observing a new custom stereotype

Once you have imported the RoseImportSample_custom.mdl file, notice how the EJBSession__class stereotype is applied, how the default__Class stereotype provides the default Java add-in properties, and how the Custom_EJB__Class applies the "cg_style" for the class.

  1. In the Model Explorer view, expand the Java profile element and navigate to the new Custom_EJB__Class stereotype that implements the "Custom_EJB" property set cloned from the "Default_EJB" set in this model.
  2. In the Model Explorer view, navigate to the RoseImportSample_custom.mdl, and then open the Start Here diagram located in the Logical View.
  3. Double-click the hyperlinked note under Loan System EJBs to jump to the ejb Package Overview diagram.
  4. In the diagram editor, click the LoanManagerBean session bean, and then click the Stereotype tab in the Properties view and observe the following information:
    • The EJBSession__class stereotype is applied, which provides the bean shape in the diagram editor
    • The default__Class stereotype provides the default Java add-in properties
    • The Custom_EJB__Class applies the "cg_style" for the class. In Rose, the "Custom_EJB" property set was cloned from the "Default_EJB" set.

    Finish this tutorial by reviewing the materials in the summary.

Terms of use | Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.