Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: trelation verify void attribute value
Topic Summary:
Created On: 24-Jan-2007 19:19
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
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.
 24-Jan-2007 19:19
User is offline View Users Profile Print this message


Angela Kim

Posts: 29
Joined: 23-Oct-2003

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
Report this to a Moderator Report this to a Moderator
 25-Jan-2007 11:18
User is offline View Users Profile Print this message


michael Barnes

Posts: 85
Joined: 12-Nov-2003

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...)
Report this to a Moderator Report this to a Moderator
 25-Jan-2007 11:33
User is offline View Users Profile Print this message


Angela Kim

Posts: 29
Joined: 23-Oct-2003

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
Report this to a Moderator Report this to a Moderator
 25-Jan-2007 11:41
User is offline View Users Profile Print this message


michael Barnes

Posts: 85
Joined: 12-Nov-2003

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 has_attr('due_date'))
    (cvtype='problem') and not(has_attr('due_date'))


Edited: 29-Jan-2007 at 14:19 by michael Barnes
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
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.