Artifact templates are a useful way to reuse the artifacts that your team has defined in IBM® Rational® Requirements Composer. Using templates to create new artifacts saves time by reducing the amount of redundant work that's involved to produce the same initial content in new artifacts.
Tip 1:
Use templates to initialize new artifacts with content that is to be common among them, such as a company letterhead for text documents, a watermark for user interface sketches, or a skeleton of necessary sections for a requirement. Be creative, because you can create templates for any artifact type for which there is an editor in Rational Requirements Composer.
Templates can be created and modified only by a user with administrator rights for a given project. If you do not have these rights but are someone who creates artifacts often, this section provides information that will help you convince your administrator to adopt the use of templates.
The Create Artifact Template action is an option in the File menu when an artifact is opened in an editor (see Figure 1).
You can create templates for any artifact with a type that is native to Rational Requirements Composer (text documents, user interface sketches, use case diagrams, and so forth).
- Save any changes to the editor.
- Select Create Artifact Template from the menu. The current content in the editor will be saved to a template.
Figure 1. Creating a template from an artifact open in an editor
Tip 2:
Create templates from the File menu when you are working on a template and would like to save your progress, or when you're updating an existing template.
Create a template from the Project home page or Project Explorer
As Figure 2 shows, you can also create templates from the artifact list in the Project Home Page or the Project Explorer view. Right-click on an artifact and select Create Artifact Template from the menu.
Figure 2. Creating a template from an artifact in the Project home page
Tip 3:
Create templates from the Project home page or the Project Explorer when you have a group of completed artifacts that you want to use to make templates. You can easily click through each artifact in the list and mark them to use their contents as templates.
Create an artifact based on a template
- To create an artifact based on the template, select the template with the content that you want to use in the Template section of the New wizard.
- After you click Finish, the new artifact will be initialized with the content of the template that you selected.
Figure 3. Initialize a new artifact's contents with a template
Tip 4:
When you create an artifact, click the button in the Template section of the wizard to see whether your project administrator has made any templates available for the type of the artifact that you are creating. If so, it might be obvious from a template's name that using it will give your artifact initial content that you would have had to add yourself, otherwise.
Managing and updating templates
Templates for a project are listed in the Administration tab of the Project Home Page, which is accessible only to users with the role of Administrator for the project.
Figure 4. Manage templates in the Administration tab of the Project home page
Templates are only available for the project you created them in. In the Administration tab you will see the templates for one project only.
From this tab you can rename templates and delete the ones you no longer need. You might have noticed that there is no option to modify an existing template, but fortunately that scenario is supported.
How to update existing templates
To update a template, create a new template from an artifact with the updated content and specify the same name as the original template.
First, you will need to have an artifact with content that you want to be the new template. If you don't have such an artifact, the best method to get one is to create a new artifact based on the template that you want to update.
Suppose that you want to update the template called "Document_Template."
- First, create an instance of this template called "Updated Document_Template."
Figure 5. Create an artifact from the original template
- Now that you have an artifact to work with, change its contents to what you want for the new version of your template.
- When you're finished making changes, select the Create Artifact Template action and, when prompted for the name, enter the same name as the template that you want to update. In this case, enter Document_Template.
Figure 6. Create a template and use the original template's name
Figure 7. Overwriting a template to update its contents
- You will be prompted with a warning that a template already exists with the name. After you click OK, the original template will be overwritten with the new content.
Tip 5:
To update an existing template, create an artifact using that template, make the changes to that artifact, and create a template using the same name as the original template.
Note:
All template names must be unique. Two templates cannot have the same name even if they are of different content types. So when overwriting an existing template with a new one, make sure that you are overwriting the correct template, or you may accidentally overwrite a template of a different content type.
Sharing templates across projects
As we've noted, the templates that you create in one project can be used only when you create artifacts in the same project. If you need to use a template from one project in another project, you can take advantage of the fact that templates are included when a project is downloaded from the Rational Requirements Composer server.
A useful trick is to download the project with the templates that you need and then upload that project back into your new project.
- Open the Project home page for the project that you want to download and select File > Download.
- Select a directory on your hard drive and click OK.
- Select File > Upload.
- Select Upload a Requirements Composer Archive and then click Next.
- For Location, specify the directory that you selected in the Download wizard.
- For Upload to Project, select the project that you want to copy the templates to.
- Click Finish.
All of the templates from the original project will be copied to the second project. You can also use this technique to copy attribute group definitions from one project to another.
If you have several projects and know that you are going to be using a template across them, the best thing to do is to keep those templates in a separate, common project. You can delete all of the artifacts in that project (for example, the ones used to generate the templates) so that only templates are added to the second project in the upload step.
Tip 6:
Keep templates and attribute groups that are to be used across many projects in a common project that does not contain any artifacts. This project can be downloaded and uploaded to the other projects to copy over the templates and attribute groups.
As the next version of Rational Requirements Composer is developed, the ease-of-use for common operations and the minimization of the time that you spend completing them is at the forefront of our efforts. If your use of our tool is hampered by something that could be improved upon or appears defective, the developers welcome your input. Visit Rational Requirements Composer on jazz.net to view iteration plans for the next release and view or submit feature requests and bug reports. Feel free to email the authors of this series with your questions or suggestions.
Tip 1: Use templates to initialize new artifacts with content that is to be common among them, such as a company letterhead for text documents, a watermark for user interface sketches, or a skeleton of necessary sections for a requirement. Be creative, because you can create templates for any artifact type for which there is an editor in Rational Requirements Composer.
Tip 2: Create templates from the File menu when you are working on a template and would like to save your progress, or when you're updating an existing template.
Tip 3: Create templates from the Project home page or the Project Explorer when you have a group of completed artifacts that you want to use to make templates. You can easily click through each artifact in the list and mark them to use their contents as templates.
Tip 4: When you create an artifact, click the button in the Template section of the wizard to see whether your project administrator has made any templates available for the type of the artifact that you are creating. If so, it might be obvious from a template's name that using it will give your artifact initial content that you would have had to add yourself, otherwise.
Tip 5: To update an existing template, create an artifact using that template, make the changes to that artifact, and create a template using the same name as the original template.
Tip 6: Keep templates and attribute groups that are to be used across many projects in a common project that does not contain any artifacts. This project can be downloaded and uploaded to the other projects to copy over the templates and attribute groups.
Learn
- Watch this 10-minute demo to learn about the full scope of IBM Rational Requirements Composer and its capabilities.
- Explore the Rational Requirements Composer Information Center.
- Join the discussion in the Rational Requirements Composer forum about all aspects of requirements definition, including both general, tool-independent concepts and tool-specific information.
- Try the free trial of IBM Rational Requirements Composer.
- Learn about other applications in the IBM Rational Software Delivery Platform, including collaboration tools for parallel development and geographically dispersed teams, plus specialized software for architecture management, asset management, change and release management, integrated requirements management, process and portfolio management, and quality management.
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Explore Rational computer-based, Web-based, and instructor-led online courses. Hone your skills and learn more about Rational tools with these courses, which range from introductory to advanced. The courses on this catalog are available for purchase through computer-based training or Web-based training. Additionally, some "Getting Started" courses are available free of charge.
- Subscribe to the Rational Edge newsletter for articles on the concepts behind effective software development.
- Subscribe to the IBM developerWorks newsletter, a weekly update on the best of developerWorks tutorials, articles, downloads, community activities, webcasts and events.
- Browse the technology bookstore for books on these and other technical topics.
Get products and technologies
- Download trial versions of IBM Rational software.
- Download these IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Tivoli®, and WebSphere®.
Discuss
- Check out developerWorks blogs and get involved in the developerWorks community.

Nicolas Kruk is a member of the Common User Interface team for Rational Requirements Composer. He was the developer primarily responsible for Artifact Templates support in Version 1.0. Previously, he was a member of the team that delivered the Rational Deployment Architecture Platform for IBM Rational Software Architect Version 7.5. Nicolas graduated from the Rochester Institute of Technology in 2008 with a bachelor’s degree in computer science.

David Murray is a member of the Common User Interface team for IBM Rational Requirements Composer. He was primarily responsible for the project home page and Search view in the rich client. David graduated from the Rochester Institute of Technology in 2004 with a bachelor's degree in computer science. Before joining the Rational Requirements Composer team, he worked on the editor for the Enterprise Generation Language (EGL) component of IBM Rational Business Developer, where he gained experience in delivering streamlined software for less-technical business developers.




