![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Help on triggers Topic Summary: Created On: 3-Dec-2007 08:40 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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/ |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Help on triggers
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.