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: Help on triggers
Topic Summary:
Created On: 3-Dec-2007 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.
 3-Dec-2007 08:40
User is offline View Users Profile Print this message


Rhea Castillo

Posts: 11
Joined: 7-May-2007

For example I have a deployed the following trigger in my module:

trigger("updateFeature", project->module->"Test Module"->attribute->"Feature ID", post, save, 11, readFile "D://FeatureID_Trigger.dxl")

and then i accidentally deleted the file specified from the last argument.

Here are my question:

1. would the trigger still execute even though the script file was deleted?
2. would other users be able to invoke the trigger even though the script file was deleted?
3. What cases (if any) when you try to modify an attribute (with trigger) and then have an error "unable to find file <path of deleted script>"?
- because i have encountered this error before when i deleted a script file for the trigger. but i cannot recreate the error again
Report this to a Moderator Report this to a Moderator
 3-Dec-2007 09:58
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

In your example you have used the readFile command which means that the DXL code is read into string and is stored along with the module in the DOORS database. Thus this works, even though you have deleted the original file (which you can btw recover by running the dxl command on this trigger). If you had used #include then you would get errors if the included file is not at the stated location.

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 3-Dec-2007 14:14
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I never thought of using readFile to get the string of DXL for a trigger to execute. Interesting idea.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 3-Dec-2007 15:09
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Yes, as Pekka said, 'readFile' makes use of the specified file and then the contents are stored in the Trigger. After defining the trigger you can remove the file without further errors, unless you want to redefine the trigger again. However, if that file uses readFile or #include or some other file reference, then of course those files must exist when the trigger fires.

If you run this from an edit-exclusive module (presumably named 'Test Module'), your 'level' can be abreviated: attribute->"Feature ID". As you have it now, I strongly suspect the trigger itself is stored in the project and will fire for any module named 'Test Module' therein.

Search the forums for 'DxlFind' to get a script that finds triggers and run it from your open Test Module. That script has a bug and if the trigger is stored in the Project it should report the trigger twice; once for the mdoule and once for the project. If its stored in the module it will report it only once. That script does dump the text of the trigger, which may be useful if you delete the original readFile file.

Your Trigger definition software should be structured as attached. This will let you remove the trigger easily enough. If you decide to change the definition of the trigger (such as its level or priority), be sure to delete the trigger, THEN modify the code that deploys it.

- Louie
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.