![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: excluding a attribute from a trigger Topic Summary: excluding a attribute from a trigger Created On: 15-Sep-2005 16:44 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: History might work so long as the attribute records history and the trigger is a POST attribute save trigger. Or you can read the invisible ink in the manual and do something like this inside the trigger: Trigger trg = current AttrDef ad = attrdef(trg) string NameAttr = ad.name if (NameAttr is to be excluded) halt. Yes, the "attrdef(trg)" command returns the def of the attribute that triggered the attribute-save trigger. That fact makes attr-save triggers a lot more useful. I beat my head against the wall for a long time, then decided to try ALL the trigger commands inside all kinds of triggers, just to see what they REALLY do. - Louie | |
![]() |
|
I have set a trigger within my module to fire when ANY attribute within a module changes project ->pName ->module -> xName ->attribute ->all I would like to exclude a certain attribute call it A from setting the trigger off, but am not sure how to do this.
Trigger attr1 = trigger("ModObjTxt", project ->pName ->module -> xName ->attribute ->all, post, save, 10 ,dxl) |
|
![]() |
|
![]() |
|
Don't think you can exclude at this level. You might have to modify the dxl directly. The dxl would find the last change in the history and if the attribute was the excluded one, then exit the dxl.
This depends : a. If the attribute definition includes - change history; and b. If the object history is modified prior to the execution of the dxl. It would probably be easier to set the trigger only for those attributes needed: eg. AttrDef ad Trigger attr1 for ad in current module .. if (ad.name != "whatever" ) attr1 = .... } ------------------------- Cliff Bly |
|
![]() |
|
![]() |
|
History might work so long as the attribute records history and the trigger is a POST attribute save trigger. Or you can read the invisible ink in the manual and do something like this inside the trigger:
Trigger trg = current AttrDef ad = attrdef(trg) string NameAttr = ad.name if (NameAttr is to be excluded) halt. Yes, the "attrdef(trg)" command returns the def of the attribute that triggered the attribute-save trigger. That fact makes attr-save triggers a lot more useful. I beat my head against the wall for a long time, then decided to try ALL the trigger commands inside all kinds of triggers, just to see what they REALLY do. - Louie |
|
![]() |
|
![]() |
|
Louie Thank you for your response. The block below shows my existing trigger code: I have a attribute named "Test Review Status" this is shown in a drop down text box within the module view and can take various string values. If any attributes are changed and saved I want the drop down to default back to "Unchecked". The problem is if I drop down the text box "Test Review Status" it will automatically default back to "Unchecked", hence I wanted to exclude this particular attribute from the action of the trigger. I can see that your code will do that but I am not sure how to integrate that into my trigger code. Would be very grateful if you could help me Thanks Martin ///////////////////////////////////////////////////////////////////////
Project px = current string pName = fullName(px) Module m = current string xName = name(m) string dxl = "Object o = current Object"
dxl = dxl "\n" "o.\"Test Review Status\" = \"Unchecked\""
Trigger attr1 = trigger("ModObjTxt", project ->pName ->module -> xName ->attribute ->all, post, save, 10 ,dxl) |
|
![]() |
|
![]() |
|
Attached is more what I was thinking and also demonstrates a better way to define the trigger code. Some suggest using an #include statement but that requires all users to have access to the same network file, which is rarely the case.
Side comments: Your Trigger definition program should provide the ability to remove the trigger since no such mechanism exists in the user interface. Thus, trigger definition programs should tend to look like this: string NameTrig = "SetToUnchecked" if (confirm("Remove from system strigger '" NameTrig "'??")) delete(trigger...) if (confirm("Add to system trigger '" NameTrig "'??")) Trigger trg1 = trigger(...) Triggers. The Moby Dick of requirements management. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
excluding a attribute from a trigger
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.