Question & Answer
Question
How can I export the history of individual objects from a formal module in Rational DOORS?
Cause
Certain clients may want to have this information for activity reporting reasons.
Answer
There are at least two possibilities to obtain and export the history of individual objects from a DOORS formal module.
Obtaining object history from the module Properties
- Open a module and go to File, Properties and select the History tab.
- On the bottom click "Export". The whole history of the module will be saved as a generic file.
- Of course, if the module was baselined, only the history since the last baseline will be available from there. The previous history is to be found in the respective baseline.
- The exported file is a tab separated data generic file that you can open in Notepad but also in Microsoft Excel.
- It is recommended to use Microsoft Excel so you can sort the data according to your needs and select those records for every user. Subsequently you can create reports from this.
Obtaining object history using a DXL script from the DXL Reference Manual
- Navigate to the DXL Reference Manual and search for History.
- In the History section the very last script is called "History example program".
- You will need to adjust that example to meet your needs.
For example, if you want to obtain the history of an object, open a module, select the object and go to Tools, Edit DXL and run the following script (an adaptation of the script from the DXL Reference Manual):
_________________________________
DISCLAIMER:
Any assistance that IBM gives in issues regarding private DXL scripting and/or modified DOORS scripts are not covered under the IBM - Licensee maintenance/support agreement.
All suggestions IBM provides should be tested on either a test server or a back-up database, and never in a production environment. IBM shall not be responsible for loss of data or down time through the interaction with these unsupported scripts.
IBM's assistance is provided "AS IS," and IBM HEREBY DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ALL IMPLIED WARRANTIES OF SATISFACTORY QUALITY, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGES OR CONSEQUENCES ARISING FROM ITS ASSISTANCE EVEN IF IBM IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
_________________________________
// history DXL Example
/*
Example history DXL program.
Generate a report of the current Module's
history.
*/
// print a brief report of the history record
void print(History h) {
HistoryType ht = h.type
print h.author "\t" h.date "\t" ht "\t"
if (ht == createType ||
ht == modifyType ||
ht == deleteType) { // attribute type
print h.typeName
} else if (ht == createAttr ||
ht == modifyAttr ||
ht == deleteAttr) {
// attribute definition
print h.attrName
} else if (ht == createObject ||
ht == clipCopyObject ||
ht == modifyObject) { // object
print h.absNo
if (ht==modifyObject) {
// means an attribute has changed
string oldV = h.oldValue
string newV = h.newValue
print " (" h.attrName ":" oldV " -> "
newV ")"
}
}
print "\n"
}
// Main program
History h
print "\nHistory for current Object\n\n"
for h in current Object do print h
Was this topic helpful?
Document Information
Modified date:
01 May 2020
UID
swg21444153