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: Triggers on links
Topic Summary: How do you fire a trigger when a link is modified?
Created On: 25-May-2007 19: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.
 25-May-2007 19:27
User is offline View Users Profile Print this message


Joe Sarkic

Posts: 31
Joined: 13-Jun-2005

How do you set up a trigger that fires because of an operation on a link?

The DOORS 8.1 reference manual implies that this is possible in the section:

Triggers->Trigger manipulation->link

There is even a function "Link link(Trigger t)" that is supposed to return the link that is the cause of the trigger firing.
Report this to a Moderator Report this to a Moderator
 29-May-2007 14:30
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Joe,

I think this function is available for trigger on changing attributes of a link?!
So you could try to create a trigger on an attribute in a link module?!
Butter I never tried myself to use it.

It is a lttle bit misleading to say that the trigger will fire on an operation on a link...
I think it will fire only on link's attribute change.

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 30-May-2007 15:35
User is offline View Users Profile Print this message


Joe Sarkic

Posts: 31
Joined: 13-Jun-2005

Thanks Reik.

I've managed to fire a trigger when a link attribute has changed, but it does not give me the functionality that I need.

I would like to fire a trigger when you create a link. The intent is to have this trigger raise a dialog with link attributes, allowing a user to manually set link attribute values whenever a link is created. Currently, it is cumbersome to go into a link module to set link attribute values.
Report this to a Moderator Report this to a Moderator
 29-May-2008 09:19
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 13
Joined: 4-Mar-2008

Hi Joe

I would be interested to know the way you managed to fire this type of trigger (modification on a link attribute).
If you have found since last year a way to fire a trigger at a link creation, I'm interested too !

Thanks

Guillaume
Report this to a Moderator Report this to a Moderator
 29-May-2008 13:54
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

As far as I know, you cannot get a trigger to fire on link creation.

Don't go to the link module to look at link attributes. Go via the object properties dialog, select links tab.

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 30-May-2008 08:34
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 13
Joined: 4-Mar-2008

Thanks Tony

I didn't manage to create a trigger firing on a link attribute, even if I modify it in the source object properties dialog. I tried several times with this dxl line, creating a pre and a post save trigger on the attribute "Test Attr", but no success.

string path_proj = path(current Project)
trigger("link trigger",project->path_proj->module->"is satisfied by"->link->object->all->attribute->"Test Attr",post,save,1,"#include <addins/user/test>")

But what I really want to do is to run a specific action when the user creates a link. So I thought to create a new link creation mechanism, in which I would introduce my action. But I wondered if it was possible to modify the Doors native link creation mechanism, by adding the action I want to execute in the dxl code. Can I do that ?

Thanks
Report this to a Moderator Report this to a Moderator
 30-May-2008 11:10
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

You can override the "make link from start" menu option to run your own DXL.
In fact I have done this in the past.

The main problem with doing this is that you cannot override the drag and drop linking.
This is beacuse you cannot change the popup menu that appears after on a drop event and you cannot capture the drop event.

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 30-May-2008 13:49
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

I agree with Tony.

I've done the same thing. I've actually overriden both the "Start Link" and "Create Link From Start" menu options, as well as the menu options under the "Links" menu.

If I remember correctly you can override them in the formal.dxl file in /lib/dxl/config.

This is done on the client side, so you need some mechanism of pushing the updated file to all the clients. I've used two methods in this approach, first putting a formal.dxl file on all the clients that includes the actual formal.dxl file that is on a network drive. This allows me to update the formal.dxl at any time without having to update the clients.

The second method, I've just started using is a system where I have all my "client configuration" files on a network drive. Then a "version" file is placed on each client computer as well as a startup script. When the client is started, it automatically checks the version file with the version file on the network, if they are different it will execute another dxl script to copy over all the upto date configuration files. So now all I need to do is update my configuration file, then change the version in the version file on the network, and the next time the user starts the client the configuration files are all copied over. I've been running this for about 3 months now and it seems to be working much better than my previous suggestion.

-------------------------
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
 30-May-2008 14:10
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 13
Joined: 4-Mar-2008

Tony & Scott, thanks for your responses.

I will try to override these functions, what seems to be the best solution for my issue, even if the drag and drop popup can not be captured.
Thanks for the tips on synchronization of formal.dxl too.

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


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

I was just looking at the DXL Help files for Triggers (Introduction to triggers) and noticed that Telelogic add drag and drop events for triggers in 8.3.

I wonder if that could be used to over ride the drag and drop menu in order to create links?

-------------------------
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
 8-Jul-2008 14:30
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 13
Joined: 4-Mar-2008

Just a quick reply to give you my testing results on drag and drop triggers :

- the drag trigger allows to catch for example the object you are dragging. It fires simultaneously with the mouse cursor change.
- the drop trigger only allows to catch elements dropped into Doors from another program.

So I didn't manage to catch a drag & drop event between two Doors objects, to over ride for example the drag and drop menu.


Guillaume
Report this to a Moderator Report this to a Moderator
 16-Jul-2008 08:27
User is offline View Users Profile Print this message


Kiran Chaturvedula

Posts: 14
Joined: 20-Apr-2008

Hi,

Triggers at Object level are functional only with atrribute type changes. DOORS can send a trigger if there is a change in the attribute type. One way to extend this is to use enumerartions as your base attribute type. For links you can create an enumerartion with elements{IN,OUT,EXternal,Delete}. Set a persistent trigger that attached to this AttrType. Now you need to add a mechanism which changes the enumerated values automatically whenever a link is created. (I understand this mechanism is the centre piece but its worth trying because it allows you to use triggers basically on any item...)

If there is any one who can suggest a better solution I am open to it.
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.