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: post open project trigger
Topic Summary:
Created On: 10-May-2004 22:25
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.
 10-May-2004 22:25
User is offline View Users Profile Print this message


Catherine Yan

Posts: 43
Joined: 4-Aug-2003

Hi, There,

I'm trying to create a post open project trigger which will check the DOORS build number and closes the project if the build number is smaller than my latest build number. But It doesn't do anything. Here is my trigger:
Trigger t = trigger("openDoors", project->"Xyan Test", post, open, 10,
"#include <//pet-filer01b/projects/otbuprojects/DOORS/scripts/TT/Lib/Triggers/doorsOpen.dxl>")

Here is the content of <//pet-filer01b/projects/otbuprojects/DOORS/scripts/TT/Lib/Triggers/doorsOpen.dxl>:
int latestBuildNumber = 70215
int curVersion = intOf(doorsInfo(infoBuildNumber))
ack("cur is " curVersion ", latest is " latestBuildNumber ".")
if (curVersion < latestBuildNumber) {
ack("You don't have the latest patches installed. Your build number is " curVersion " while the latest is " latestBuildNumber ". Please check with doors-system-admin to get your newest patch!")
closeProject()
}


Thanks!
Catherine
Report this to a Moderator Report this to a Moderator
 11-May-2004 14:20
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

There are no triggers events associated with Projects. The documentation says this but also has residual artifacts from DOORS v4 that DID have such triggers. Project "level" triggers mean where the trigger is stored and thus to which they apply.

Yup, its confusing. That's where I come in...

Your code defines a post-open-module trigger that applies to modules in the "Xyan Test" project. Try opening a module and notice the trigger fires.

Perhaps you want a pre-open module trigger. Instead of "closeProject" you could insert a "set(trigPreConFail)" command that would prevent the module from opening. Perhaps you could have a mod = current command and close the module if someone opens it Edit or Share (if (isShare(mod) or isEdit(mod)). I'd also be tempted to modify you ack message, suggesting that access to THIS project requires the patch. And I'd includes the batch number associated with your build 70215.

Curiosity has me. Why does this project require the patch?

- Louie

IIRC, the "closeProject" command only removes your lock from it; not actually closing it in the DOORS Explorer.
Report this to a Moderator Report this to a Moderator
 13-May-2004 19:51
User is offline View Users Profile Print this message


Catherine Yan

Posts: 43
Joined: 4-Aug-2003

Thanks a lot, Louie!
set(trigPreConFail) is exactly what I need.

We want to force install the new patch because Telelogic told us that having users on different patches could cause data corruption.

Thanks again!
Catherine
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.