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: Purge module form trigger
Topic Summary:
Created On: 27-Oct-2006 08:40
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-2006 08:40
User is offline View Users Profile Print this message


Ludwig Weinzierl

Posts: 24
Joined: 27-Oct-2006

Hello,

I would like to automatically delete a temporarily created module when it is closed.
I have created a post close trigger which does first a softDelete and then a hardDelete on the module
it is stored in.
The problem is that whenever the hardDelete is executed in the trigger DOORS 8.1 crashes.

Any ideas?

Ludwig Weinzierl

P.S.
I also tried it in DOORS 7.1, it generates a runtime error, but purges the module nonetheless.
Report this to a Moderator Report this to a Moderator
 27-Oct-2006 19:55
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You may have a problem if the trigger is stored in the module you want to purge. Understand you should use bracket the call with error trapping, see attached for example.
Report this to a Moderator Report this to a Moderator
 30-Oct-2006 12:27
User is offline View Users Profile Print this message


Ludwig Weinzierl

Posts: 24
Joined: 27-Oct-2006

Hello,

thanks for your suggestion Louie. It solves the problem in DOORS 7.1.
Sadly my scripts have to run in DOORS 8.1.
I consider this a DOORS bug.

Does anyone have an idea how to workaround this problem?


Regards

Ludwig Weinzierl

Report this to a Moderator Report this to a Moderator
 31-Oct-2006 00:02
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Desperation response: I have an old nagging memory that the purging of objects changed between DOORS versions. I think that in v52 the object had to be already softDeleted before you hardDeleted it, but in v7.1 the object could not be already softDeleted, you had to undelete it first before hardDeleting it.

Practice hardDelete(mod) [1] yes or no already deleted [2] outside any Trigger.

- Louie
Report this to a Moderator Report this to a Moderator
 31-Oct-2006 07:31
User is offline View Users Profile Print this message


Ludwig Weinzierl

Posts: 24
Joined: 27-Oct-2006

Hello!

Sorry for the long post;-)
What I do in my scripts to purge a module is to first soft delete it, and then hard delete it.
With all the error checking.
This works with DOORS 7.1 an DOORS 8.1 as long as it does not happen in a trigger.

My task is to find a solution to purge a module automatically when it is closed.
I am interested in a DOORS 8.1 solution. I only mentioned DOORS 7.1 to point out that it works with DOORS 7.1 (despite the runtime error which can be suppressed).

As an alternative solution I thought about installing the trigger in the project that the module is in.
I can install the trigger, but when does it fire. The online help is not very useful with this topic.

Can anyone shed a little light on triggers in projects?
Maybe there are other solutions I have not thougt of?

OT: Why do my posts appear twice? I am sorry for that.

Thanks for your answers Louie.

Regards

Ludwig Weinzierl
Report this to a Moderator Report this to a Moderator
 31-Oct-2006 15:41
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The 'scope' of a trigger determines where it is installed. If its 'project->current' then its stored in the Project and applies to all modules in the project. IIRC you can only store triggers in the database (Project->all), in a project, or in a module; not in a folder. The scope determines which things may activate the trigger; it doesn't affect trigger behavior: if the trigger checks the name of the current module and does something for only that module, it won't matter if the trigger is stored in that module or stored in the project.

However, I've got a pretty good feel for odd DOORS issues and I suspect there may be a problem purging a module from a trigger when that trigger is stored in that module. It would not surprise me if v71 acted in one way in this regard (trapped DXL errors) and v81 act a different way (untrappable exception violation).

It would be tricky, but your trigger code could be generated to accept the exact name of the module. It could also be coded to delete itself once its done. The housing code could define the trigger in the project using the base name of the module in the name of the trigger.

There is also some hope in using evalTop_ since its postponed until after the current DXL ends. If so, I'd make sure there's a function created whose name includes the name of the module being purged since that name will persist for the dureation of the current DOORS session.

- Louie
Report this to a Moderator Report this to a Moderator
 2-Nov-2006 14:15
User is offline View Users Profile Print this message


Ludwig Weinzierl

Posts: 24
Joined: 27-Oct-2006


To put the trigger in the project level is a good idea in principle.
However, despite the fact that this trigger would fire for every module in the project which would be unacceptable in my case, it also crashes DOORS 8.1 :-(

It crashes in a different way from the module level trigger, but who cares...
I had not the time to try it with DOORs 7.1, but did some experiments with dynamic triggers - same thing.

I think there is no way to do it in DOORS 8.1 currently.

Thanks for your answers.

Ludwig Weinzierl
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.