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: Email Notification Error
Topic Summary:
Created On: 5-May-2004 20:13
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.
 5-May-2004 20:13
User is offline View Users Profile Print this message


Charing Maher

Posts: 14
Joined: 5-May-2004

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
Report this to a Moderator Report this to a Moderator
 5-May-2004 21:27
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 10-May-2004 16:53
User is offline View Users Profile Print this message


Charing Maher

Posts: 14
Joined: 5-May-2004

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
Report this to a Moderator Report this to a Moderator
 10-May-2004 19:26
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 11-May-2004 14:12
User is offline View Users Profile Print this message


Charing Maher

Posts: 14
Joined: 5-May-2004

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
Report this to a Moderator Report this to a Moderator
 11-May-2004 16:50
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

What error are you getting when the trigger fires?
Report this to a Moderator Report this to a Moderator
 11-May-2004 17:00
User is offline View Users Profile Print this message


Charing Maher

Posts: 14
Joined: 5-May-2004

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
Report this to a Moderator Report this to a Moderator
 18-Jul-2008 14:30
User is offline View Users Profile Print this message


Murugaraj S

Posts: 38
Joined: 8-May-2007

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.