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: Creating Dynamic Post-Triggers
Topic Summary:
Created On: 12-Nov-2002 15:49
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.
 12-Nov-2002 15:49
User is offline View Users Profile Print this message


Richard harkness

Posts: 13
Joined: 24-Oct-2002

I have the following code...

void postObjectStatusChange( Trigger t){
display "Object Status Changed."
}

Trigger t=trigger(attribute->all, modify, 10, postObjectStatusChange)


...taken from a DXL manual, but when used it causes DOORS to crash and shutdown.

My question is simple... what is wrong with it ?

Any help would be appreciated.
Report this to a Moderator Report this to a Moderator
 12-Nov-2002 21:56
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Don't see this in the v6 DXL manual.

Guess: try using "module->current->attribute->all". or "object->all->attribute->all".

You may also want to tell us when DOORS crashes: when you define the trigger or when it gets activated (e.g. you edit an attribute).

- Louie
Report this to a Moderator Report this to a Moderator
 12-Nov-2002 22:05
User is offline View Users Profile Print this message


Gyan Penrose-Kafka

Posts: 10
Joined: 12-Sep-2002

When DOORS crashes, are you in a module that is in a folder and not in a project or alternatively, trying to run the script from the "Edit DXL" window brought up from the Database Explorer?

I was trying to work with some persistant module->all triggers last week and DOORS crashed every time I tried to deploy the trigger. I narrowed it down to the fact that I was not in a project.

If you want this activity to be triggered for all modules in your DB, you may try something like:

triggerOnEditAttribute = trigger("triggerOnEditAttributes",
project->all->module->formal->all->attribute->all,
post,
modify,
10,
postObjectStatusChange)




-------------------------
Gyan Penrose-Kafka
Requirements Management Consultant
gyan@zenmonkey.net
Report this to a Moderator Report this to a Moderator
 13-Nov-2002 09:02
User is offline View Users Profile Print this message


Richard harkness

Posts: 13
Joined: 24-Oct-2002

Thanks for the replies...


<< You may also want to tell us when DOORS crashes: when you define the trigger or when it gets activated (e.g. you edit an attribute). >>


The code given only crashes when an attribute is changed. The module exists within a folder, which in turn is within a project.

I only want the code to work with the current module so according to the manual 'attribute->all' should be all that is required.

Richard.
Report this to a Moderator Report this to a Moderator
 15-Nov-2002 00:43
User is offline View Users Profile Print this message


Andrew Myatt

Posts: 8
Joined: 30-Sep-2002

I think that your problem is less to do with the trigger but more to do the the use of 'display'.

Have you got this trigger in column DXL, if so the I would not advise this. It is highly likely to cause some run away resursion/interupt situation.

What you would be better to do is either use a persistent trigger, or create your dynamic trigger at startup. (via #includes in startup.dxl). This would then set some attribute.

I would hope that the following would work:

void postObjectStatusChange( Trigger t){
ack "Object Status Changed."
}

Trigger t=trigger(attribute->all, modify, 10, postObjectStatusChange

-------------------------
andrew.myatt@telelogic.com
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.