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: Setting Enumerated Attribute by Related Number?
Topic Summary: Is is possible to set an enumerated attribute using the "Related Number" of the enumeration?
Created On: 26-Aug-2008 20:30
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.
 26-Aug-2008 20:30
User is offline View Users Profile Print this message


Gyan Penrose-Kafka

Posts: 7
Joined: 31-Jul-2008

I have an enumerated type that contains a list of 5 somewhat long sentences. (Descriptions of what must be done for a system risk. e.g. "Corrective action required and additional analysis in the Product Risk Assessment") I have assigned each enumeration a related number.

What I am trying to figure out how to do is set the associated attribute's value using the enumeration's related number.

For example.

riskrating = (severity*Occurences*detectability)
o."Total Score" = riskrating

if (riskrating > 0) {
if (riskrating < 80) {o."Risk Level" = 1}
if (riskrating >= 80) {if (riskrating < 125) {o."Risk Level" = 2}}
if (riskrating >= 125) {o."Risk Level" = 3}
}
}

If this worked the way I'd like it to, the "1", "2", and "3" values would be the "Related Number" for the enumeration.

Currently, the only way I can get this to work is to reproduce the actual text of the enumeration. e.g.:
... o."Risk Level" = "Corrective action required and additional analysis in the Product Risk Assessment"


Any help would be appreciated.
Report this to a Moderator Report this to a Moderator
 27-Aug-2008 08:28
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

Hi,

You'd have to do it by looking at the attrtype of the attribute. I'd recommend a function that you pass the relative number of an attrdef and it returns the associated string. In pseudo code, it would look something like the attached.

You could do it without the module parameter if you like, then the find function will revert to using current.

Hope this helps,

Paul
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.