Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Viewing Attribute of Soft Deleted Objects
Topic Summary: Accessing and displaying attributes of deleted objects
Created On: 27-Oct-2005 13:53
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 27-Oct-2005 13:53
User is offline View Users Profile Print this message


Tim Perry

Posts: 17
Joined: 31-Dec-2002


Hello,

Our projects have requirements volatility scripts that are run to generate a report detailing the volatility for that particular month. One limitation that the script has is that, while it is able to generate a list of objects that were deleted during that month, it is not currently able to determine which of these (if any) were actual requirements (designated by a boolean attribute called IsRequirement). I have been attempting to modify the script to allow it to look at objects which are in a soft deleted (non-purged) state and look at the objects' IsRequirement value but have not been successful. Here are some snippets of my code...

Module m = read(fullName itemref, false) - open the module read-only
showDeletedObjects(true) - attempt to display soft-deleted objects
.
.
.
void WriteModuleLevelEvents(Stream out)
{
History h
for h in (current Module) do
{
if ((h.type == deleteObject) && IsDateInRange(h.date))
{

Object o = object(h.absNo)

out << "," h.date "," stringOf h.type "," h.absNo "," o.IsRqmt "," h.position "\n"
}
}
}


I get the following error:
-R-E- DXL: null Object parameter was passed into argument position 1
Backtrace:





Any help would be greatly appreciated as I am completely stumped at the moment.

Thanks,
Tim
Report this to a Moderator Report this to a Moderator
 27-Oct-2005 15:46
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

Try
for h in entire (current Module) do

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
 27-Oct-2005 18:27
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Richard suggests the following structure, which is pretty standard:
for obj in entire mod do
{ if (isDeleted(obj)) { deal with deleted object, such as "continue"}
else {deal with undeleted object}
}

This is better than the "for obj in mod do" loop, which only finds currently displayed objects (which changes from time to time). But that doesn't apply to you since you are seeking recently deleted objects in History.

Try [1] insert "current = mod" after the "read" statement. Your "showDeletedObjects" command may be working on the wrong module. [2] stage the object ID before using the "object" command: int AbsNo hst.absno; obj = object(AbsNo)

- Louie
Report this to a Moderator Report this to a Moderator
 27-Oct-2005 20:24
User is offline View Users Profile Print this message


Tim Perry

Posts: 17
Joined: 31-Dec-2002

Richard/Louie,

Thanks for your assistance. Unfortunately, I was not able to get the DXL to work correctly utilizing your suggestions. I was able, however, to make it work by adding "noError" to the beginning of the WriteModuleLevelEvents function listed above. I don't like the fact that it only works when I add this. I am attaching the entire DXL program. To run the DXL program, you must have a project selected and the project must contain at least one formal module that contains a boolean attribute called IsRequirement. I appreciate your assistance and look forward to any additional help you can provide.

Thanks,
Tim


Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.