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: Intelligent deletion
Topic Summary: Can I delete the source object when I want to delete the target one, and vice versa ?
Created On: 2-Jun-2008 15:11
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.
 2-Jun-2008 15:11
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 13
Joined: 4-Mar-2008

Hello everybody

I would like to customize the object deletion mechanism.

Here is my need : when a user wants to delete an object, he has to be warned if this object is linked to another one(s). (like when you try to delete an object with incoming links).

If it is the case, he must be able to choose between :
    * deleting the current object but not the objects linked to it
    * deleting the current object and some of objects linked to it
    * canceling the deletion

I don't know how to do that. I thought about triggers, or native functions overriding, but I didn't find any solution.

Thanks for your help !

Guillaume
Report this to a Moderator Report this to a Moderator
 2-Jun-2008 15:56
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

A trigger would be the way to go, but I don't think there's a trigger for object deletions, though a trigger on an object sync might work. I don't know I haven't tried it.

Overriding the delete object menu functions would work, the only problem is if the user just hits the "Delete" key. There's no way to detect that, other than a trigger if it were possible.

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 3-Jun-2008 11:14
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 13
Joined: 4-Mar-2008

Thanks Scott

I found a way to fire on an object deletion. I created a post sync trigger on all objects which executes the following code when it fires.

First of all I introduced a new boolean attribute "Is Deleted" on the objects, initialized to false.

I noticed that when you delete an object, the next one becomes the current object, and that fires the post sync trigger. So each time the trigger fires on an object, I look at its previous object and test if it has just been deleted. As the 'previous' function only parses the displayed objects, I must show the deleted ones before with "showDeletedObjects(true)".

Then the function 'isDeleted' allows me to test if the object is softdeleted, and the attribute "Is Deleted" is used to know if the object has just been deleted.

At the end, when I have done what I wanted to do, I set the attribute "Is Deleted" to true.
Report this to a Moderator Report this to a Moderator
 3-Jun-2008 12:35
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 13
Joined: 4-Mar-2008

Oops

Finally it is not so simple. I always have the problem that Doors does not want to delete an object with incoming links, so the trigger can not fire...

Is it possible to disable this warning ?
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.