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: Aggregrating Compliance status
Topic Summary:
Created On: 21-Nov-2007 15:37
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.
Answer This question was answered by Louie Landale, on Wednesday, November 28, 2007 1:00 PM

Answer:
Just to make sure: you cannot write a layout in one module (#1) that makes use of a layout in another module (#2). OK, maybe you can so long as #2 is open with a specific view and you know the column # in #2 of the layout. But really, if you figure to do that then make the #2 an attr-DXL instead.

To start, open module #1, use the analysis Wizard and display Complience Status of modules with a depth of 2. That should find the status of all objects (in #3) that are linked to objects (in #1) that are linked to the current object (in #1). If you edit that DXL you should then be able to derive what you want; specifically do not display any attr values unless the recursive 'depth' is zero.

Notice that the Layout in #1 does NOT make any use of info stored in #2, it only traverses the links to find linked #3 objects.

That should get you started.

EDITED: ReRead your post, I see that you are after 'aggregate'. Outside the main loop define global variable string StatusAggregate = null. When dealing with each linked #3 object, instead of 'display'ing the status, do this:
string StatusCurrent = o3Linked."Complience Status"
if (StatusCurrent == "Red") StatusAggregate = "Red"
elseif(StatusCurrent == "Amber" and StatusAggregate != "Red") StatusAggregate = "Amber"
elseif(StatusCurrent == "Green" and null StatusAggregate) StatusAggregate = "Green"
else{} // Don't change Aggregate

At the bottom, display StatusAggregate

I would use Attr DXL for this, instead of Layout. Besides the performance improvement, you will later-on be able to write DXL that retrieves (instead of re-calculate) the Complience Status ..err.. the Aggregate Complience Status of any object, something that's tough when running Layout. You could then display that status in whatever view you liked.

Actually, what I would do is just have a skeleton string attribute 'Aggregate Complience Status' whose value is set by an on-demand script. Run the script daily. It opens each module in the current folder and below, calculates the value, and sets the attribute. One of the Bells and Whistles of the script would be to generate a warning when the status of an object gets worse; perhaps from Amber to Red; or advises when it gets better (Amber to Green).

- Louie
 21-Nov-2007 15:37
User is offline View Users Profile Print this message


Chris Bailey

Posts: 11
Joined: 2-Jul-2007

The attached picture shows how we would like to track compliance status and be able to report at both the system requirements and the customer requirments level

What I need is two lots of layout DXL, one for "Module 2" and one for "Module 1" that aggregate the original information from "Module 3" and create a virtual compliance status

Now this seems like it should be really simple but my DXL skills are virtually non- existent, so any help is greatfully received.

Chris

I have attached the gif file this time !




Edited: 27-Nov-2007 at 11:20 by Chris Bailey
Report this to a Moderator Report this to a Moderator
 27-Nov-2007 11:21
User is offline View Users Profile Print this message


Chris Bailey

Posts: 11
Joined: 2-Jul-2007

Sorry for any confusion - I have added the gif file this time ? Would this be better posted in the DOORS general section ?

Chris
Report this to a Moderator Report this to a Moderator
 27-Nov-2007 14:43
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
Just to make sure: you cannot write a layout in one module (#1) that makes use of a layout in another module (#2). OK, maybe you can so long as #2 is open with a specific view and you know the column # in #2 of the layout. But really, if you figure to do that then make the #2 an attr-DXL instead.

To start, open module #1, use the analysis Wizard and display Complience Status of modules with a depth of 2. That should find the status of all objects (in #3) that are linked to objects (in #1) that are linked to the current object (in #1). If you edit that DXL you should then be able to derive what you want; specifically do not display any attr values unless the recursive 'depth' is zero.

Notice that the Layout in #1 does NOT make any use of info stored in #2, it only traverses the links to find linked #3 objects.

That should get you started.

EDITED: ReRead your post, I see that you are after 'aggregate'. Outside the main loop define global variable string StatusAggregate = null. When dealing with each linked #3 object, instead of 'display'ing the status, do this:
string StatusCurrent = o3Linked."Complience Status"
if (StatusCurrent == "Red") StatusAggregate = "Red"
elseif(StatusCurrent == "Amber" and StatusAggregate != "Red") StatusAggregate = "Amber"
elseif(StatusCurrent == "Green" and null StatusAggregate) StatusAggregate = "Green"
else{} // Don't change Aggregate

At the bottom, display StatusAggregate

I would use Attr DXL for this, instead of Layout. Besides the performance improvement, you will later-on be able to write DXL that retrieves (instead of re-calculate) the Complience Status ..err.. the Aggregate Complience Status of any object, something that's tough when running Layout. You could then display that status in whatever view you liked.

Actually, what I would do is just have a skeleton string attribute 'Aggregate Complience Status' whose value is set by an on-demand script. Run the script daily. It opens each module in the current folder and below, calculates the value, and sets the attribute. One of the Bells and Whistles of the script would be to generate a warning when the status of an object gets worse; perhaps from Amber to Red; or advises when it gets better (Amber to Green).

- Louie

Edited: 27-Nov-2007 at 14:56 by Louie Landale
Report this to a Moderator Report this to a Moderator
 28-Nov-2007 13:00
User is offline View Users Profile Print this message


Chris Bailey

Posts: 11
Joined: 2-Jul-2007

Louie,

thanks for your reply and your recommendations regarding use of attribute dxl or seperate scripts. I think its pointed me in the right direction.

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