1. Using Rational Publishing Engine to extract data from Rational DOORS Dan Ani Reporting Arena Team Leader www.reportingarena.com
2.
3.
4.
5.
6.
7.
8.
9. Desired Output Document Header section: on left side: static text on right side: current chapter Font-family: Arial 10 Main Module Objects (Object Heading and Object Text) Linked Object (use left indentation: 50) Linked Object Children display a Table with 3 columns header (background-color: #C0C0C0) use left indent: 50 Footer section Page Number / Total Pages Number font family: Arial 10
10. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
11.
12.
13. Set Module/Object Query Create a Container: Select the Container element in the Palette view and click in the desired location in the Template Content Editor. Set the Module/Object query [$1] to the Container: Drag the desired query from the Data Source Schemas view and drop it on the Container. NOTE: It’s recommended to use the Container element when you want to iterate a collection of elements. The Container element will not add extra empty Paragraphs.
14.
15.
16. Display only non empty attributes 2/3 There are two ways to create script conditions using this editor: 1) Use embedded operations (right part) to create simple conditions. 2) Drag the operands from the left side and create complex conditions using javascript language. NOTE: Each time it’s recommended to test your condition using the Test Script Expression Dialog, by pressing the Test button.
17.
18. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
19.
20.
21.
22.
23. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
24.
25.
26.
27.
28.
29. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
30.
31.
32. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
33.
34.
35. Display Table only if objects have text We have to create a condition, to filter only those objects with Object Text attribute non empty. Add a condition on Table element. Using the Set Condition for Current Element editor from the right side, create the condition: Object_Text!=“”
36.
37.
38.
39.
40. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
41.
42. Create Master Page 2/7 Define Header section 1. Create a Table having one Row with two Cells 2. Create in the first Cell a Text element with static content (“ Reporting Arena” ). 3. In the second Cell create a Text (with no value for the moment) 3.1 The second Cell will contain the current heading of level 1 from DOORS Main Module Level 1 Heading
43. Create Master Page 3/7 Define Header section 4. Create an internal variable (_currentHeading) and store the value of current Object Heading of level 1 into this variable. 5. Double click on the Text from the second Cell, use the Data Expression tab, and select _currentHeading variable. NOTE: The only way to add dynamic content into the Header or Footer sections it’s to use variables.
44. Create Master Page 4/7 Define Header section 6. Go back to Template Editor to assign the proper value for the _currentHeading variable 7. Create a Container as a first element of the main Container. 8. Use this Container to assign the value of _currentHeading variable 9. Use contextual menu, select Assign Variables and Script Expression tab 10. Use level attribute and Object_Heading attribute to construct the expression
45. Create Master Page 5/7 Format Header section table auto fit – autofit to window resize to fit contents - false cell width – 200 Table cell borders cell alignment – center right resize to fit contents - false
46.
47.
48.
49. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
50.
51. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
56. Checkpoint 1. Iterate through all the module objects and display some attributes 2. Use a Data Source Configuration element to extract data from the linked module 3. Extract all the children of the linked object 4. Use Schema Discovery process to update schema 5. Display the children objects attributes into a Table 6. Create a Master Page with Header and Footer 7. Add ToC and ToT elements 8. Title page 9. Configure Document Specification
57.
58.
59. Configure Data Sources 2/4 Select the MAIN_MODULE Source , open contextual menu and Configure Data Source… Use Data Source Selection Wizard to select the System requirements module
60. Configure Data Sources 3/4 Use a running DOORS instance When a DOORS Data Source is present in a document template, there are two ways to configure that Data Source: using a running DOORS instance or using a new DOORS instance. In the first scenario (using existing DOORS instance) all we have to provide is the module URI, baseline and view [optional] and to set the property new_instance to false
61. Configure Data Sources 4/4 Use a new DOORS instance The DOORS connection information, such as the username, password, and the properties, doors_home, doors_param and new_instance need to be provided if we want to use a new DOORS Instance to extract data. In this scenario, the property new_instance should be set to “true”. In both scenarios, the LINKED_MODULE Data Source will not be configured, because this Data Source is a dynamic Data Source and will be configured/re-configured during the generation process.
62. Configure Word Output Select the Output -> Target: Word . Open contextual menu and select Configure Output… The Configure Word Output dialog will open. Select the path of the Word Output Document. Select a Stylesheet : “rpe.dot” Stylesheet Word file comes with the RPE installation. Select a macro : peUpdateFields to update Table of Contents.
64. Results 2/2 Content Page Main Module Object Linked Object Table with all linked object children Footer Section (page number / total pages number) Header: Chapter Name