DOORS DXL Unsolved Mysteries - Solved!
Transcription
DOORS DXL Unsolved Mysteries - Solved!
DOORS DXL Unsolved Mysteries - Solved! Michael Sutherland Galactic Solutions Group LLC 3221 Eastern Ave. Rochester Hills, MI 48307-5529 248-853-2283 [email protected] Abstract: The Telelogic product DOORS has provided its users with a comprehensive set of functionality to manage Requirements across the Enterprise. To further extend the capability of DOORS and allow users to customize the product to meet their specific needs, the makers of DOORS have provided a powerful Application Programmer Interface (API) called the DOORS Extension Language (DXL). This API gives the user access to the internal DOORS functionality, and unlocks the power of the tool beyond those functions present from the user interface. The following are typical user needs: (1) A View exists in a Module, and it is desired to copy that View to another Module, including Filter criteria. (2) An existing data set with numbered hierarchy is imported from Excel, and it is desired to build that hierarchy in the imported Module. (3) A user desires to avoid traversing a complex Folder Hierarchy to locate and open a Module. Through the knowledge and application of DXL, these needs can be addressed. Biography : Michael Sutherland has 11 years experience working with automotive suppliers and manufacturers. He has been working with General Motors for 7 years, and is currently a consultant to General Motors Powertrain and North American Operations (NAO) Manufacturing Engineering Divisions, developing and deploying Systems Engineering Processes and Tools. Michael has a Masters Degree in Electrical and Computer Engineering from Oakland University. He also specializes in the Application of the DOORS Enterprise Requirements Suite, mentoring and teaching application, customization (DXL), and information modeling to a wide variety of clients across the nation. Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Copying Views Scenario: A user desires to Copy Views from one DOORS Module to another. Background: A View in DOORS consists of a display of the following information from a DOORS Module: Columns - Content (Attribute, Layout DXL or Main - Object Number, Heading and Text ) - Properties (Color, Graphics, Info, Justification, Title, Width) Objects - Selection - Filtering on Attribute Values - Order - Sorting on Attribute Values Other View Options in DOORS can be saved: © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 2 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Strategy: Most properties of a View are available through documented DXL commands. View properties can be read from Source Module and set in Target Module using documented DXL commands such as: View Properties Column Properties useAncestors( ViewDef v ) useDescendants( ViewDef v ) useCurrent( ViewDef v ) useSelection( ViewDef v ) useColumns( ViewDef v ) useFilterTables( ViewDef v ) useGraphicsColumn( ViewDef v ) useShowExplorer( ViewDef v ) useGraphics( ViewDef v ) useOutlining( ViewDef v ) useCompress( ViewDef v ) useLevel( ViewDef v ) useSorting( ViewDef v ) useFiltering( ViewDef v ) useShowDeleted( ViewDef v ) useShowPictures( ViewDef v ) useShowTables( ViewDef v ) useShowLinkIndicators( ViewDef v ) useShowLinks( ViewDef v ) useTooltipColumn( ViewDef v ) useWindows( ViewDef v ) for Column c in Module m {} main( Column c ) dxl( Column c ) attribute( Column c ) color( Column c ) graphics( Column c ) info( Column c ) justify( Column c ) title( Column c ) width( Column c ) These commands cover most properties of a View. One very important property of a saved View that cannot be determined by using commands in the DXL manual is the Filter Criteria. There are documented DXL commands to get references to DOORS datatypes such as: Project p = current Project Folder f = current Folder Module m = current Module Object o = current Object Trigger t = current Trigger PageLayout pl = current PageLayout © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 3 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Issue: How can the Filter criteria be obtained from a saved View in a Module? Why not load the view and try: Filter f = current Filter This command is not in the existing documentation, but it does work. It returns a reference to the current Filter in Source Module, which can be applied directly to the Target Module with the following command: set( Module m, Filter f ) Does this sound too good to be true? It almost is. There is one problem to be addressed. A Filter refers to Attributes and Enumerated Attribute Type Values in Source Module that may not exist in Target Module. Applying the Filter in such a situation will cause a DXL error such as: -R-E- DXL: <Line:###> unknown attribute (AttributeName) or -R-E- DXL: <Line:###> illegal value 'False' for type 'Integer' or -R-E- DXL: <Line:35> null attribute definition parameter was passed -I- DXL: <Line:123> execution halted Strategy: Use the documented stringOf( Module m, Filter f ) function, which returns a string such as: (Created By == Michael Sutherland) AND ((Created Thru == Manual Input) OR (Created Thru == Copying)) Solution: Parse Source Module Filter string so that individual Attribute Names and Values are known, and then check against Attribute Names and possible Values in Target Module. Do not copy View if it is not possible to apply Filter in the Target Module without errors. © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 4 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Application Interface: Note: The Sort criteria can also be obtained as a string with the following DXL commands Sort s = current Sort print stringOf( Sort s ) This returns a string such as: Ascending Last Modified By and Ascending Last Modified On The Telelogic documentation incorrectly refers to stringOf( Module m, Sort s ). Further investigation needs to be done to determine if the Sort criteria can be copied to the Target Module. © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 5 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Building a Hierarchy Scenario: A user imports a Requirement Specification, and desires to build a Hierarchy from the imported information. Background: DOORS has existing tools to import hierarchy structure the following imports: - Word Processors - MS Word, Framemaker, Interleaf, Rich Text - uses Heading Levels style (TOC) - Plain Text - uses typed Heading Number strings There is no such functionality for a specification imported from Excel, when Hierarchy Numbers are typed in a Column. Example: © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 6 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Strategy: A four-pass algorithm will be used to build the Hierarchy. Pass One - Check the validity of the Level Indicator Strings, to make sure that the Section Number sequence can actually be built. - Format: "1.2.a" is invalid - Sequence: "1.2" followed by "1.4" is invalid Pass Two - Set all Objects to Level 1 - May not be necessary, but the Pass Four algorithm used requires this as a precondition. - Uses Skip List of Objects in Module to preserve order Pass Three - Make each blank the last Child of the previous non-blank - For situations where Requirements and/or supporting information (Graphics, Tables, etc.) do not have typed Section Numbers Pass Four - Build DOORS Hierarchy using the following algorithm: © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 7 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Example: Before the Hierarchy Build is executed, the Module has no Hierarchy. - Section Number is the imported representation of the desired Hierarchy. - Object Number and Level show the current state of Hierarchy in DOORS. After running the Hierarchy Build routines, the desired Hierarchy is achieved. © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 8 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Application Interface: © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 9 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Bookmarking a Module Scenario: The user desires the ability to bookmark a Module, so they do not have to traverse the Folder hierarchy every time they start DOORS. Background: In a large DOORS Project, there may be numerous Modules in Folders located many levels below the Database root. In DOORS 5, each Module has an "item Unique ID", which is a 8 digit hex value - hexadecimal (base 16) digits can be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f Executing the following command print uniqueID( item( fullName( current Module ) ) ) prints the following output, which is the "item Unique ID" for the Module. 00000b0a The "item Unique ID" is also used to name the directory in a DOORS database where data for the Module is stored. DOORS users are insulated from this by using the DOORS Client connected to a DOORS Database Server (DDBS). © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 10 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Solution: The "item Unique ID" is used so the bookmark will be preserved if Module is renamed or moved. The following features of DXL will also be used to assist in bookmarking the Module. User Configuration Files: DOORS Database conf (Configuration) Files are text files stored in Database. These are not DOORS Modules, and are not visible to the user through the DOORS client interface. Files of type confUser and confSysUser are specific to each User defined in the Database Configuration files are used so that bookmarks to Modules are stored in Database and backed up, do not reside on any individual client PC, and are available to user no matter which PC they use DOORS from (assuming Bookmarking software is installed). DOORS Menu Modification: Functions can be added to the DOORS Project Explorer Right-Click Menu by adding additional createMenu() functions in the createDBExplorerListPopup() function found in the DOORS Application Configuration file $DOORSHOME\lib\dxl\config\baseWindowMenu.inc. Extra care is required when developing and distributing of such modifications to DOORS Client PCs. © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 11 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Application Interface: Adding a Module to the list of Bookmarks (from DOORS Explorer right-click Menu): Opening a Module from the list of Bookmarked Modules: © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 12 Telelogic Americas' 2001 User Group Conference DOORS DXL Unsolved Mysteries - Solved! Obtaining Software: DOORS Users are encouraged to obtain, use, share, and improve upon the utilities mentioned in this presentation. For a free copy: Contact: [email protected], or download from http://galactic-solutions.com. © 2001 Galactic Solutions Group LLC Author: Michael Sutherland [email protected] Page 13