Recommended Practices with DOORS

Over the years i often get asked about DOORS best practice, i.e objects should not include both Object text and Object heading, text objects should be leaf objects etc.

Sometimes checking these item can become labour intensive especially when it comes to reviews\audits.

To help my self with this I wrote the attached script which creates some columns to give a visual indicator of the "health" of the object.

I have included it here in case its of use to others.
I cant offer support on this but feel free to use it in your environments.
Designed and working on DOORS 9.4, may work with earlier versions

To install simply unzip the contents to the DOORS add ins directory
If this is done correctly then when you open a module you should see a "Syntax" menu option
Click on this and away you go.

Note this does use a lot of layout DXL so it may impact module performance.


ChrisHardy68 - Thu Oct 18 19:03:05 EDT 2012

Re: DOORS Best Practice
SystemAdmin - Thu Oct 18 19:28:03 EDT 2012

Thanks Chris - and good to see you on the forum.


Paul Miller,
Melbourne, Australia

Re: DOORS Best Practice
PDU - Tue Oct 23 01:49:04 EDT 2012

Hi Chris,

very interesting,

a useful script.

Pierre

Re: DOORS Best Practice
ChrisHardy68 - Thu Oct 25 19:19:37 EDT 2012

Added another script that maybe of use to get report on numbers of links etc and also filter the required objects
See
https://www.ibm.com/developerworks/forums/thread.jspa?threadID=459947

Re: DOORS Best Practice
ChrisHardy68 - Mon Nov 05 00:39:48 EST 2012

Hi,
Have updated the script. Have added:
More phrase analysis
Made it easier to add/remove phrases

Hope that helps
Attachments

attachment_14905057_Syntax.zip

Re: DOORS Best Practice
ChrisHardy68 - Mon Nov 05 22:57:25 EST 2012

Ok, one final update.
Due to the performance of the script in large modules I have reworked this to use DXL attributes rather than dxl layout columns.

This script creates columns to display the new dxl attributes and the columns are colored using a secondary attribute

Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
The lines to comment out are indicated in the script and are at the end of the file.
(The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

Hope that helps
Attachments

attachment_14905474_Syntax_A.zip

Re: DOORS Best Practice
PDU - Tue Nov 06 01:55:47 EST 2012

ChrisHardy68 - Mon Nov 05 22:57:25 EST 2012
Ok, one final update.
Due to the performance of the script in large modules I have reworked this to use DXL attributes rather than dxl layout columns.

This script creates columns to display the new dxl attributes and the columns are colored using a secondary attribute

Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
The lines to comment out are indicated in the script and are at the end of the file.
(The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

Hope that helps

Hi,

work for me (DOORS 9.1), but with some adjustments :

Lines 446 to 451,i have errors, so i must change

(

default 

null)
by

(

default 
"Null")


Lines 458 to 463 i must delete

(

default 

null)
for each.

And of course i modify the end of Dxl as written in your message.

Re: DOORS Best Practice
llandale - Tue Nov 06 14:51:15 EST 2012

PDU - Tue Nov 06 01:55:47 EST 2012
Hi,

work for me (DOORS 9.1), but with some adjustments :

Lines 446 to 451,i have errors, so i must change


(

default 

null)
by

(

default 
"Null")


Lines 458 to 463 i must delete

(

default 

null)
for each.

And of course i modify the end of Dxl as written in your message.

<null> is the default default for all types of attrs.

(default "null") will make the string "null" the default which is probably not want you want. I guess you want this:
  • (default (string null)), or
  • (default ""), or
  • you don't need that default phrase at all.

-Louie

Re: DOORS Best Practice
PDU - Wed Nov 07 02:13:03 EST 2012

llandale - Tue Nov 06 14:51:15 EST 2012
<null> is the default default for all types of attrs.

(default "null") will make the string "null" the default which is probably not want you want. I guess you want this:

  • (default (string null)), or
  • (default ""), or
  • you don't need that default phrase at all.

-Louie

Hi Louie,

Lines 446 to 451 create attributes based on enumerated type with values :


{
"High", 
"Medium", 
"Low", 
"Null", 
"Empty", 
"OLE", 
"Heading"
}


This is why default value null don't work.

Lines 458 to 463 create DXL attributes. I think default value has no meaning.

Pierre

Re: DOORS Best Practice
ChrisHardy68 - Wed Nov 07 23:35:02 EST 2012

Hi,
Based on the feedback from Pierre i have modified the script to get around the "null" issue
Also tidied up the code so hopefully its a bit easier to maintain and simplified some of the checking.
Plus added an additional script to delete the attributes if not needed
Attachments

attachment_14906415_Syntax_A.zip

Re: DOORS Best Practice
PDU - Thu Nov 08 02:08:39 EST 2012

ChrisHardy68 - Wed Nov 07 23:35:02 EST 2012
Hi,
Based on the feedback from Pierre i have modified the script to get around the "null" issue
Also tidied up the code so hopefully its a bit easier to maintain and simplified some of the checking.
Plus added an additional script to delete the attributes if not needed

Hi,

just a little remark, textCheck don't work if the phrase is the first in the sentence. This case is possible (If ...)

Pierre

Re: DOORS Best Practice
ChrisHardy68 - Thu Nov 08 17:17:02 EST 2012

PDU - Thu Nov 08 02:08:39 EST 2012
Hi,

just a little remark, textCheck don't work if the phrase is the first in the sentence. This case is possible (If ...)

Pierre

Thanks for that.
Here is a fix... although its a bit lazy :)

After line 89 add
string pad = \"xx \"

After line 302 (function textCheck) add
cont = pad cont pad

This does mean that the phrase "If possible" will be reported twice,
once for the "if" and once for the "If possible"

so maybe alter line 147 from
string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"If possible\", \"Ought\", \"Perhaps\", \"Probably\"}
to
string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"Possible\", \"Ought\", \"Perhaps\", \"Probably\"}

Hope that helps

Re: DOORS Best Practice
ChrisHardy68 - Sun Dec 02 17:11:18 EST 2012

ChrisHardy68 - Thu Nov 08 17:17:02 EST 2012
Thanks for that.
Here is a fix... although its a bit lazy :)

After line 89 add
string pad = \"xx \"

After line 302 (function textCheck) add
cont = pad cont pad

This does mean that the phrase "If possible" will be reported twice,
once for the "if" and once for the "If possible"

so maybe alter line 147 from
string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"If possible\", \"Ought\", \"Perhaps\", \"Probably\"}
to
string phrases[] = {\"Will\", \"Can\", \"Could\", \"Should\", \"Would\", \"May\", \"Must\", \"Might\", \"Possible\", \"Ought\", \"Perhaps\", \"Probably\"}

Hope that helps

Hi
I nave made some updates to the code:
Improved end of line checking for phrases,
added new phrase category,
corrected structure checking
corrected link checking

Taking this further what Id like to do is add a gui for adding removing phrases to the checking and I think rewrite the code so that is a pure script rather than trying to use dxl attributes or layout dxl ( both of which work fine but have issues with module performance)

Hope that helps
Attachments

attachment_14915297_Syntax_A.zip

Re: DOORS Best Practice
ChrisHardy68 - Wed Apr 23 02:37:10 EDT 2014

ChrisHardy68 - Sun Dec 02 17:11:18 EST 2012
Hi
I nave made some updates to the code:
Improved end of line checking for phrases,
added new phrase category,
corrected structure checking
corrected link checking

Taking this further what Id like to do is add a gui for adding removing phrases to the checking and I think rewrite the code so that is a pure script rather than trying to use dxl attributes or layout dxl ( both of which work fine but have issues with module performance)

Hope that helps

Further update. Improved the handling of OLEs and pictures

 


Attachments

Syntax A.zip

Re: DOORS Best Practice
Dartguru - Thu Apr 24 04:27:00 EDT 2014

ChrisHardy68 - Wed Apr 23 02:37:10 EDT 2014

Further update. Improved the handling of OLEs and pictures

 

Hi Chris,

from reading this thread with interest I believe I need access to addins directory to be able to run your script as is, however I don't have access to addins.

I think I understand most of the script and I know I'll need to comment out BackgroundColor as I use 9.2.5. If I put AttrDel.dxl and Syntax_A.dxl into a single script, can I load it up via Tools->Edit DXL and run it without doing anything unexpectedly bad?

TIA

Al

Re: DOORS Best Practice
ChrisHardy68 - Thu Apr 24 04:52:54 EDT 2014

Dartguru - Thu Apr 24 04:27:00 EDT 2014

Hi Chris,

from reading this thread with interest I believe I need access to addins directory to be able to run your script as is, however I don't have access to addins.

I think I understand most of the script and I know I'll need to comment out BackgroundColor as I use 9.2.5. If I put AttrDel.dxl and Syntax_A.dxl into a single script, can I load it up via Tools->Edit DXL and run it without doing anything unexpectedly bad?

TIA

Al

Hi Al,

Yes you can run the script from Tools -> Edit DXL

To set up run Syntax_A.dxl

If you want to remove all the attributes etc run AttDel.dxl

So don't run them both together or they will add then remove everyhing :)

It should not do anything bad as its only writes to the attributes it creates so its pretty self contained.

Re the background colours -

Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
The lines to comment out are indicated in the script in function colCreate
(The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

 

Hope that helps

 

Re: DOORS Best Practice
Dartguru - Thu Apr 24 05:01:20 EDT 2014

ChrisHardy68 - Thu Apr 24 04:52:54 EDT 2014

Hi Al,

Yes you can run the script from Tools -> Edit DXL

To set up run Syntax_A.dxl

If you want to remove all the attributes etc run AttDel.dxl

So don't run them both together or they will add then remove everyhing :)

It should not do anything bad as its only writes to the attributes it creates so its pretty self contained.

Re the background colours -

Note: if you want to use this script with DOORS 9.3.x or earlier then you need to modify the dxl.
The lines to comment out are indicated in the script in function colCreate
(The changes are needed because DOORS 9.3.x can only sent the color of text within a column whilst DOORS 9.4 can set the background color)

 

Hope that helps

 

Splendid, thanks.

And thanks for the prompt reply

Al

Re: DOORS Best Practice
ChrisHardy68 - Thu May 01 03:22:49 EDT 2014

ChrisHardy68 - Wed Apr 23 02:37:10 EDT 2014

Further update. Improved the handling of OLEs and pictures

 

New update, re-wrote the structure checking and enhanced the phrase checking

 


Attachments

Syntax A 010514.zip

Re: DOORS Best Practice
Tony_Goodman - Tue May 06 05:39:34 EDT 2014

ChrisHardy68 - Thu May 01 03:22:49 EDT 2014

New update, re-wrote the structure checking and enhanced the phrase checking

 

Nice one Chris!

I have attached my offering for interest.

This can also be found at http://www.smartdxl.com/content/?page_id=17

Tony


Attachments

smartQualityAnalysis.zip