< Previous | Next >

Extend and replace a role

The goal of this exercise is to extend base method content associated with a role using Extends and Replaces variability.

  1. Switch back to the Authoring perspective.
  2. Create a new content package in my_plug-in. Name the new content package "extend_and_replace_test". Save your changes by closing the editor panel.
  3. Create a new role in the content package that we just created.
  4. Use these attributes for the new role:
    • Name: my_extend_replace_tester
    • Presentation name: My Extend and Replace Tester
    • Brief description: My extend and replace brief description
    • Main description: My extend and replace main description
  5. Use the Variability Type menu to select Extends and Replaces then click Select in this section. The Select Dialog: Roles window opens.
  6. Select tester to be the base role. Click OK to save changes and close the selection window.
  7. Save your changes by closing the role editor panel.
  8. Update my.basic.configuration by doing the following:
    1. Double-click the my.basic.configuration icon in the Library view panel. The configuration editor opens.
    2. In the Plug-in and Package Selection tab expand my_plug-in > Method Content > Content Packages.
    3. Clear all selected content packages.
    4. Check extend_and_replace_test. This should be the only content package selected in my_plug-in. This is done so that there are no conflicting extensions in the same method element.
    5. Close the configuration editor panel to save your changes.
  9. Now switch to the Browsing perspective.
  10. Open Role Sets > Basic Roles.

    In the Configuration view you will see that there is no tester role in the Basic Roles folder. It was replaced by the My Extend and Replace Tester role.

    Also notice that other content elements in the base plug-in that referenced the tester role now reference the extend and replacing role instead. If you open the Disciplines folder and view the task Implement Test, you will see that the Primary Performer is now My Extend and Replace Tester. Extends and Replaces works in a similar way for tasks, artifacts, guidance and categories.

    my extend and replace tester role
    This lesson concludes the "Reuse method content" tutorial. Proceed with next tutorial, "Working with processes".
< Previous | Next >