![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Email Notification Error Topic Summary: Created On: 5-May-2004 20:13 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
I have a DXL trigger here that doesn't seem to work. A girl that used to work here gave me directions on how to install it, but I'm getting some errors when i try and create the trigger. Here's the text I enter in the DXL Input frame: Trigger emailnotification = trigger (“notify”, project->”LAM”->module->”SRD”, pre, close, 10, “#include <triggers/emailNotification>”) Here are the errors I receive: -E- DXL: <Line:1> badly formed token (EOF) -I- DXL: <Line:1> all done with 1 error and 0 warnings Here is the dxl script: // emailNotification.dxl /* * * Description: This function is part of a persistent trigger on the SRD Module. * Before closing the module, the trigger fires on "pre-close" and looks * for all "SPL Review" columns that have changed. * */ pragma runLim, 0 Module currentModule = current Module History h HistoryType ht Skip modified = create Object o int num int accum = 0 HistorySession hs static int modifiedAttribute Date currentD = today Skip recentlyModified = create Date tempDate string temp for o in currentModule do { Date lastModified = o."Last Modified On" if (currentD == lastModified) { string splReview = o."SPL Review" string opsReview = o."Ops Review" if (splReview == "New Requirement" || splReview == "Revised" || splReview == "Reject" || opsReview == "New Requirement" || opsReview == "Revised" || opsReview == "Reject" ) { for h in o do { ht = h.type if (h.attrName == "SPL Review" || h.attrName == "Ops Review") { string oldV = h.oldValue if (!(oldV == "Reject" || oldV == "Revised" || oldV == "New Requirement") && h.date == currentD) { string absNo = o."Absolute Number" if (!find(recentlyModified, absNo, o)) { put (recentlyModified, absNo, o) accum = accum + 1 } } //endif } // ht == modifyAttr //end for h in o break } // endif Review conditions } } // if currentD } // end for if (accum > 1) { sendEMailNotification ("DOORS Mail Server", "sgzahn", "DOORS", "Requirements in the SRD have been changed, please review these requirements.") sendEMailNotification ("DOORS Mail Server", "bberg", "DOORS", "Requirements in the SRD have been changed, please review these requirements.") accum = 0 } delete modified delete recentlyModified Any help would be much appreciated!!!!!!! ------------------------- Charing Maher Systems Engineer, SAIC |
|
![]() |
|
![]() |
|
Don't know why but your trigger name must be a variable not a literal:
string Name = "notify" Trigger mailNotification = trigger(Name, ...) Be advised that your Include statement "triggers/..." presumes that everyone who closes a module has access to the "triggers/" folder; which is unlikely. YOU can run the DXL that defines the trigger but when someone close a module they will get DXL errors. To make that happen you'll have to deploy the Triggers folder on the network as a direct child of some path in your "addins" environment variable; something that I doubt you are doing. I'd read that file into a long string DXL variable and then define the trigger using the variable. Then there is no "#include" statement executed when someone closes a module. - Louie Edited: 5-May-2004 at 21:30 by Louie Landale |
|
![]() |
|
![]() |
|
This didn't work for some reason. I still got the same errors. This is what I typed:
string name = "notify" Trigger emailNotification = trigger(name,project->"LAM"->module->"SRD",pre,close,10,"#include<triggers/emailNotification>") What we have done in the past is modified every user's addins folder to include all the dxl functionality we've incorporated. it has all worked up until now, but we've never used a trigger before either. Thanks, Charing ------------------------- Charing Maher Systems Engineer, SAIC |
|
![]() |
|
![]() |
|
Are you getting errors when you try to install the Trigger or when it actually fires? If the former then add a new string variable DXL = "#include ..." Then put DXL in the trigger definition clause.
Also, didn't try it but if you define a trigger in a specific module (SRD) I believe that module has to be open Exclusive at that time. - Louie |
|
![]() |
|
![]() |
|
I'm actually getting the errors when the dxl trigger fires. The module is open exclusive when it fires.
I'd like to find a resolution to this problem, but if I decide I don't want to implement this dxl at all, is there a way to remove the trigger? Is there a way to see all the triggers that being used? Thanks! ------------------------- Charing Maher Systems Engineer, SAIC |
|
![]() |
|
![]() |
|
What error are you getting when the trigger fires?
|
|
![]() |
|
![]() |
|
This is the error I'm getting when I try to close the module:
-E- DXL: <Line:1> badly formed token (#include<Triggers/emailNotification> ![]() -I- DXL: <Line:2> all done with 1 error and 0 warnings The last time I tried running the trigger script, i took the #include stuff out. Which makes me thing that multiple triggers may exist? Is that possible? ------------------------- Charing Maher Systems Engineer, SAIC |
|
![]() |
|
![]() |
|
Hi Charing,
I manually created two Attributes in my module called "SPL Revie" and "Ops Review" and I assigned the value whatever you have given. But when I try to execute your script, Its giving error for me. Kindly help me! Can you tell me is this error related to "Crating attributes & assigning value"? The error I am getting is: -R-W- DXL: <Line:32> wrong history type createObject for attribute name -R-W- DXL: <Line:32> wrong history type createObject for attribute name Thanks Murugaraj S |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Email Notification Error
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.