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: Deletion of outlinks via a script
Topic Summary:
Created On: 27-Nov-2007 15:27
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-Nov-2007 15:27
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

I currently have a DXL script that deletes outlinks from an object if one of its attributes meets a specific criterion. For some odd reason, the script skips the deletion of some of the outlinks but not all of them. I tried adding a "canDelete" function check for each of the outlinks. The outlinks seem to pass this check but still do not get deleted. I have a flushDeletions() function call at the end of my script. Yet, the problem still persists. I was wondering if any of you have run into a similar issue. If so, any ideas as to how I may circumvent this problem would be very helpful. Any input would be of help. Thank you in advance.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 27-Nov-2007 15:55
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I am guessing that you are deleting the links within the "for link in object" loop.
Although the links are not actually deleted until you call flushDeletions(), I think that behaviour is unreliable.

Store the links in a skip list, then loop through the skip list and delete them.
Then flushDeletions.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 27-Nov-2007 16:57
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Tony,
Thank you very much for your prompt response. I will try storing the links in a skip list and then deleting them. Thank you once again.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 27-Nov-2007 21:10
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I'm with Tony. Some others have argued, however, that if you flushDeletions after the for link loop, then you don't need to stage the links in a Skip list. However, I routinely stage stuff like Links and Baselines and others in Skip lists.

If you flushDeletions() while INSIDE the link loop, then it will possibly mess up the loop.

However, I suspect that since you can 'canDelete(lnk)' that that's not your problem. I wonder what canDelete(lnk) will do when you have edit access to the object but not to the link module; or what will happen if you cannot even Read the target object. In any case, you can trap delete link errors like this:

noError()
delete(lnk)
string ErrMess = lastError()
if (!null ErrMess) infoBox("Error Deleting Link:\n" ErrMess)
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.