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: Trigger
Topic Summary: Need to restringe a module
Created On: 6-Nov-2007 12:54
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.
 6-Nov-2007 12:54
User is offline View Users Profile Print this message


Doors Group

Posts: 61
Joined: 31-Jan-2007

Hi,
     I just need to create a trigger, so when an user tries to open x module an infobox prompt that the module is not available until x date because is currently updating.
Report this to a Moderator Report this to a Moderator
 6-Nov-2007 16:12
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The attached trigger will downgrade a module to 'read' when its open 'edit' or 'shared'. If you really want to close the module, then move the 'downgrade' command (line 13) to below the 'else{}' (line 16), then change 'downgrade(mCurr)' to 'close(mCurr, false)'.

Run from the open module.

I'm a little surprised to find that you can deploy a trigger in the current module, even when its open Read.

Notice that the 'delete' parameters must match the 'trigger' create parameters, otherwise the delete won't work. Thus, if you want to change the parameters (perhaps to change the priority or the trigger name), be sure to remove the trigger and THEN edit the DXL.

- Louie
Report this to a Moderator Report this to a Moderator
 7-Nov-2007 10:46
User is offline View Users Profile Print this message


Peter Schäfer

Posts: 5
Joined: 30-Aug-2007

Hi Louie,

I searched for something like that quite a while, very usefull, thank you!

I've got one question.
I need a possibility to open a module in Read Only, like your script already does, but it should be possible to change back to Exclusive/Sharable edit mode after opening it.

Can you edit the script that I can change the mode after opening without removing the trigger?

Regards.
Peter
Report this to a Moderator Report this to a Moderator
 8-Nov-2007 17:14
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Golly, I don't know. Let me brain storm:

Don't know how to have this post-open trigger know if if was triggered on a module that was already open.

[1] Prompt the user to downgrade the module instead of auto-downgrading it.

[2] Have a PRE-open module trigger that figures out if the module is already open and visible. If its not already open-visible then it defines a dynamic post-open module trigger that does the work of this trigger, downgrading it.

- Louie
Report this to a Moderator Report this to a Moderator
 12-Nov-2007 09:34
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Inform users via email (or login message if you have 8.2) and set the module to read only.
Why muck about with triggers?
If users don't read emails then that is their look out.

-------------------------
Tony Goodman
http://www.smartdxl.com
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.