![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: trelation verify void attribute value Topic Summary: Created On: 24-Jan-2007 19:19 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have a trelation called as a transition pre condition which verifies the values for a particular CR attribute.
[TRELATION][NAME]Verify Requirement LOE assigned[/NAME][ACTION]verify[/ACTION][REL_NAME]self[/REL_NAME][ATTR_NAME]loe_requirement[/ATTR_NAME][ATTR_VALUE]1-High|2-Medium|3-Low|0-None[/ATTR_VALUE][/TRELATION] In theory, if this trelation returns true then the link for the transition would be visible, if this trelation returns false the link would not be visible. I assumed that if the attribute's value was void, this trelation would return as false and the link would not be visible. Unfortunately for me it appears this is not a correct assumption. An error is received when the trelation is executed and the CR will not even display. I am curious if others experience the same behavior with verify when an attribute's value is void. If this is the normal behavior, what is the best way around this? Do I use trelations to prefill the attributes value, ensuring that is it never void, or do I write a perl script to be run as a pre condition which will check the value of the attribute? Any assistance is greatly appreciated!! Angela ------------------------- Angela Kim |
|
![]() |
|
![]() |
|
My approach to this is to make the attribute value mandatory on all transitions into the state(s) where the pre-condition applies.
I also set the attribute to a default value when the CR is created (another TRELATION) because I found that an Admin transition to the state before the value was set caused problems (yes, it shouldn't happen, but people will...) |
|
![]() |
|
![]() |
|
If I set a default value when the CR is created, can the user change the value to Any, thus returning the attribute value back to void?
Angela ------------------------- Angela Kim |
|
![]() |
|
![]() |
|
Yes, they can. They need to be trained not to (a few occasions of things going wrong is likely to get their manager to have a friendly word!).
However, being mandatory on transitions should cover most cases, and then you are left with only those users with rights to do Admin transitions. I forgot to say: attribut must be mandatory or read-only on the screen that uses the TRELATION, and should be mandatory, read-only or not present on all subsequent transitions and states. I guess you could avoid it being set to null by making it mandatory wherever it can be changed (in fact, I think that is what I have done, it just slipped my memory). Regarding "not usable": that is what I also found. I added the attribute with suitable value via the command-line interface. Attached code snippet shows how to do this (with my specific values) by query and application to query results; this is for a Unix machine. You will probably want your query to return only CRs for which the attribute is not defined. The following is some guidance on this. The function has_attr('[attribute_name]') returns true if an attribute is defined for an object and false if it is not. The following examples return all CRs that have/have not the attribute due_date defined.
(cvtype='problem') and not(has_attr('due_date')) Edited: 29-Jan-2007 at 14:19 by michael Barnes |
|
![]() |
Telelogic SYNERGY
» SYNERGY/Change
»
trelation verify void attribute value
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.