Designing templates with Rational Tau as a data source

Report designers can use Document Studio to import data source schemas and build report templates.

Before you begin

Get familiar with the Rational® Tau UML model and the Rational Tau schemas needed to extract data from Rational Publishing Engine. To locate the information center for your version of Rational Tau, see About the Rational Tau and Rational DOORS® Analyst information center.

Procedure

  1. Review Designing document templates for an overview of the template development process. Start planning the structure of your document and the data that might be included. For example, decide whether the final document will be generated from one template or from multiple template files that each contain reusable pieces of content.
  2. In the Document Studio application, create a document template.
  3. Identify a data source schema from your data source. You can identify a data source schema for Rational Tau from one of the following options:
    • Use the pre-generated Rational Tau schema that is shipped with Rational Publishing Engine. This data source schema is location in %RPE_HOME%\source\Tau\schema\ttdMetamodel.xsd.
    • Generate a data source schema from a Rational Tau UML project. See Retrieving a Rational Tau data source schema for more information.
  4. Add a data source schema to your document template. For Rational Tau, you can complete the following steps:
    1. In Document Studio, click Data > Add Data Source Schema.
    2. In Schema type, select the type of the schema from the list. For Rational Tau, select Tau.
    3. In Schema file field, click Browse and select the data source schema identified in the previous step. Example: %RPE_HOME%\source\Tau\schema\ttdMetamodel.xsd
    4. In the Data Source ID field, type a name for the data source in the template. Click Next.
    5. If the resource is in a secured server, specify the User name.
    6. If the resource is in a secured server, specify the Password.
    7. Select the Authentication Type from the list. If you do not select a type, each type is tested until the correct type is found, which might increase document generation time.
  5. Add elements to the template. Rational Publishing Engine has a comprehensive set of template elements that you can use to structure your document. You can drag elements into the template content editor. For example, you can add a Container element to hold several paragraphs. Each paragraph might be controlled by a test condition that associates it only with specific data. For more information, see Template elements in the Palette view and Adding elements to a template.
  6. Use queries, attributes, and variables to add data to a template. These items specify which pieces of information are generated in the report. Queries in IBM Rational Tau have a syntax similar to the XPath syntax. However, unlike XPath, the Rational Publishing Engine query does not specify a filter; the filter and sort clauses are separate from the query. Each schema element, except the query, is defined through a Rational Tau native query. This query, which is expressed in OCL, fetches Rational Tau data. For example, the root element under the model element model.rootResource has the GetModelRoots() Rational Tau query attached to it.
    Note:
    • You cannot create custom attributes in Rational Tau data source schemas.
    • You cannot preview Rational Tau from the Launcher or Document Studio applications.
  7. Add formatting and styling to the elements to control how they display in the output.
  8. Create filters to narrow the data that is pulled into the report. You can use filters, which are detailed versions of the general data source URI, to point to specific subsets of data so that Rational Publishing Engine does not attempt to retrieve more information than necessary from the data source during report generation. These filters must be broad enough to retrieve all necessary data referenced by the template or the generated report cannot include complete data. See also Filter conditions supported by REST native filters for more information.
  9. You can use a cast query filter to refine the results of a query. The type casting feature works as an alternate filter for data source elements, see Type casting and Rational Tau attributes for details.
  10. Create sorts to organize the data in your report. The Rational Tau data source does not support native sorting. Use Rational Publishing Engine sorting.

Example

Table 1. Rational Tau multi-template document example
Template file name Template contents Explanation of use
titlePage.dta Title page, Table of contents Generates the title page from the Module properties
Preamble.dta Preamble chapters Includes a Microsoft Word file with preamble chapters
Requirements.dta System requirements Generates the data from the data source listing the system requirements
userRequirements.dta User requirements Generates the data from the data source listing the user requirements
Design.dta Modeling information Generates the data from the data source listing information from the UML model

Feedback