Docstoc

EAP Script - Validate BRIDG Model - Documentation

Document Sample
EAP Script - Validate BRIDG Model - Documentation Powered By Docstoc
					How to run script (EA 9.2)
Copy script to C:\Program Files \ Sparx Systems \ EA \ Scripts \ VBScripts
Open Enterprise Architect
Right-click on menu bar, select Scripting (opens scripting window)
Double-click “Local Scripts”
To view script double-click “EAP Script – Validate BRIDG Model”
To run script CNTL-double-click “EAP Script – Validate BRIDG Model”
Object type   Message                                                          Message Type
Model         Unknown model element type found.                                ERROR
Class         Each class must have a name.                                     ERROR
Class         Class name should begin with a capital letter.                   ERROR
Class         Class name should not contain spaces.                            ERROR

Class         Class name should not contain special characters (dash).         ERROR

Class         Class name must not contain special characters (underscore).     ERROR

Class         Class name must not contain conjunctions (and).                  ERROR

Class         Class name must not contain conjunctions (or).                   ERROR

Class         Each class must have a definition.                               ERROR
Class         Each class should contain examples.                              WARNING
Class         Each class should have at least one mapping tag.                 WARNING
Class         Each class must have at least one relationship.                  ERROR
Class         Unknown connector type.                                          ERROR
Class         Each class must be in the BRIDG Comprehensive Model              ERROR
              Diagram.
Class         Each class from the {package name} package must be in the        ERROR
              diagram
Class         Instance {index} of {class name} from the {package name}         ERROR
              package has incorrect fill color in {diagram name} diagram.
              Color should be {color name}.
Class         {class name} from the {package name} package has not been        ERROR
              found in any sub-diagram.
Connection    Each connection must have a name.                                ERROR
Connection    Connection name should be in lower case letters.                 WARNING

Connection    Each association must be in the BRIDG Comprehensive Model ERROR
              Diagram.
Connection    {association name} association from the [package name}    ERROR
              package has not been found in any sub-diagram.

Connection    Each constraint must be an inverse relation or invariant type.   ERROR

Connection    Each connection must have an inverse name.                       ERROR
Connection    Each connection should have only one inverse name.               ERROR
Connection    Connection inverse name should be in lower case letters.         ERROR

Connection    Each connection should have a source role name. - [source       ERROR
              class name}
Connection    Each connection should have a target role name. - {target class ERROR
              name}
Connection   Each connection must have multiplicity defined for source.       ERROR

Connection   Each connection must have valid source multipliticy.             ERROR
Connection   Each connection must have multiplicity defined for target.       ERROR

Connection   Each connection must have valid target multipliticy.             ERROR
Connection   Each connection must have 0...* as the Source cardinality.       ERROR
             Found 1..* as Source Cardinality and 0..* as Destination
             cardinality.
Connection   Each connection should have a description. Notes is empty.       ERROR

Connection   Connection description should be in a valid format.              ERROR
               Built: {generated description}
               Found: {current description}
Connection   Each generalization should have a name.                          ERROR
Connection   Generalization name should be in lower case letters.             ERROR

Connection   Generalization name should be 'specializes'.                     ERROR
Connection   Each generalization should have an inverse name.                 ERROR
Connection   Each generalization should have only one inverse name.           ERROR

Connection   Generalization inverse name should be in lower case letters.     ERROR

Connection   Generalization name should be 'be specialized by'.               ERROR
Attribute    Attribute name should begin with a lower case letter.            ERROR
Attribute    Attribute name should not contain spaces.                        ERROR

Attribute    Attribute name should not contain special characters (dash).     ERROR

Attribute    Attribute name should not contain special characters             ERROR
             (underscore).
Attribute    Attribute name should not contain conjunctions (and).            ERROR

Attribute    Verify attribute name is valid for data type (AD). Looking for   WARNING
             'postal address'
Attribute    Verify attribute name is valid for data type (BAG<AD>).          WARNING
             Looking for 'postal address'
Attribute    Verify attribute name is valid for data type (BAG<TEL>).         WARNING
             Looking for 'telecomaddress'
Attribute    Verify attribute name is valid for data type (BL). Looking for   WARNING
             'indicator'
Attribute    Verify attribute name is valid for data type (CD). Looking for   WARNING
             'code'
Attribute    Verify attribute name is valid for data type (DSET<CD>).         WARNING
             Looking for 'code'
Attribute    Verify attribute name is valid for data type (DSET<EN>).         WARNING
             Looking for 'name'
Attribute   Verify attribute name is valid for data type (DSET<II>). Looking   WARNING
            for 'identifier'
Attribute   Verify attribute name is valid for data type (DSET<ON>).           WARNING
            Looking for 'name'
Attribute   Verify attribute name is valid for data type (DSET<SC>).           WARNING
            Looking for 'reason'
Attribute   Verify attribute name is valid for data type (DSET<ST>).           WARNING
            Looking for 'text'
Attribute   Verify attribute name is valid for data type (DSET<TN>).           WARNING
            Looking for 'name'
Attribute   Verify attribute name is valid for data type (DSET<PN>).           WARNING
            Looking for 'name'
Attribute   Verify attribute name is valid for data type (II). Looking for     WARNING
            'identifier'
Attribute   Verify attribute name is valid for data type (IVL<INT>). Looking   WARNING
            for 'integer, count, order, percent, number, or quantity.'

Attribute   Verify attribute name is valid for data type (INT.POS) number.     WARNING
            Looking for 'integer, count, order, percent, number, or
            quantity.'
Attribute   Verify attribute name is valid for data type (INT.NONNEG).         WARNING
            Looking for 'integer, count, order, percent, number, or
            quantity.'
Attribute   Verify attribute name is valid for data type (OID). Looking for    WARNING
            'codingsystem'
Attribute   Verify attribute name is valid for data type (PN). Looking for     WARNING
            'name'
Attribute   Verify attribute name is valid for data type (PQ). Looking for     WARNING
            'quantity or age'
Attribute   Verify attribute name is valid for data type (PQ.TIME). Looking    WARNING
            for 'duration'
Attribute   Verify attribute name is valid for data type (REAL). Looking for   WARNING
            'probability, number or percent'
Attribute   Verify attribute name is valid for data type (SC). Looking for     WARNING
            'comment'
Attribute   Verify attribute name is valid for data type (TEL). Looking for    WARNING
            'telecomaddress'
Attribute   Verify attribute name is valid for data type (TN). Looking for     WARNING
            'name'
Attribute   Verify attribute name is valid for data type (TS). Looking for     WARNING
            'date'
Attribute   Verify attribute name is valid for data type (TS.DATE). Looking    WARNING
            for 'date'
Attribute   Verify attribute name is valid for data type (TS.DATE.FULL).       WARNING
            Looking for 'date'
Attribute   Verify attribute name is valid for data type (TS.DATETIME).        WARNING
            Looking for 'date'
Attribute   Verify attribute name is valid for data type (URL). Looking for   WARNING
            'uniformresourcelocator'
Attribute   Verify attribute name is valid for data type (IVL). Looking for   WARNING
            'range' or 'duration'
Attribute   Verify attribute name is valid for data type (RTO). Looking for   WARNING
            'ratio'
Attribute   Verify attribute name is valid for data type (URG). Looking for   WARNING
            'quantity'
Attribute   Each attribute should have a valid data type. Found data type:    ERROR
            " & currentAttribute.Type
Attribute   Each attribute should have a valid LowerBound.                    WARNING
Attribute   Collection attribute should have a matching data type (BAG or     WARNING
            DSET).
Attribute   Each attribute should have a valid UpperBound.                    WARNING
Attribute   Each attribute must have a definition.                            ERROR
Attribute   Attribute should have at least one mapping tag.                   ERROR
Attribute   Attribute must have a 'Public' scope.                             ERROR
Requirement
Ensure all object types are known and valid
Ensure each class has a name
Ensure each class name begins with a uppercase letter
Ensure each class name does not contain special characters -
spaces
Ensure each class name does not contain special characters -
dashes
Ensure each class name does not contain special characters -
underscores
Ensure each class name is not a conjunction of multiple concepts -
AND
Ensure each class name is not a conjunction of multiple concepts -
OR
Ensure each class has a definition
Ensure each class description contains examples
Ensure each class has at least one mapping tag
Ensure each class has at least one relationship
Ensure all relationship types are know and valid
Ensure each class in represented on the comprehensive diagram

Ensure each class in a package is represented on that package's
main diagram
Ensure each class is represented on each diagram in the approriate
color for its subdomain

Ensure each class is represented on at least one diagram besides
the comprehensive diagram
Ensure each connection has a name
Ensure each connection name contains only lowercase letters

Ensure each connection is represented on the comprehensive
diagram
Ensure each connection is represented on at least one diagram
besides the comprehensive diagram

Ensure each connection has an inverse name

Ensure each connection has an inverse name
Ensure each connection has only one inverse name
Ensure each connnection inverse name contains only lowercase
letters
Ensure each connection has a source role name

Ensure each connection has a target role name
Ensure each connection has source multiplicity

Ensure each connection has valid source multiplicity
Ensure each connection has target multiplicity

Ensure each connection has valid target multiplicity
Ensure each connection has valid source class - many-to-many


Ensure each connection had a description

Ensure each connection description matches the generated
description

Ensure each generalization has a name
Ensure each generalization name contains only lowercase letters

Ensure each generalizaiton name is valid
Ensure each generalization has an inverse name
Ensure each generalization has only one inverse name

Ensure each generalization inverse name contains only lowercase
letters
Ensure each generalization inverse name is valid
Ensure each attribute begins with a lowercase letter
Ensure each attribute name does not contain special characters -
spaces
Ensure each attribute name does not contain special characters -
dashes
Ensure each attribute name does not contain special characters -
underscores
Ensure each attributre name does not contain multiple concepts -
AND
Ensure each attribute name matches its corresponding data type -
AD
Ensure each attribute name matches its corresponding data type -
BAG<AD>
Ensure each attribute name matches its corresponding data type -
BAG<TEL>
Ensure each attribute name matches its corresponding data type -
BL
Ensure each attribute name matches its corresponding data type -
CD
Ensure each attribute name matches its corresponding data type -
DSET<CD>
Ensure each attribute name matches its corresponding data type -
DSET<EN>
Ensure each attribute name matches its corresponding data type -
DSET<II>
Ensure each attribute name matches its corresponding data type -
DSET<ON>
Ensure each attribute name matches its corresponding data type -
DSET<SC>
Ensure each attribute name matches its corresponding data type -
DSET<ST>
Ensure each attribute name matches its corresponding data type -
DSET<TN>
Ensure each attribute name matches its corresponding data type -
DSET<PN>
Ensure each attribute name matches its corresponding data type -
II
Ensure each attribute name matches its corresponding data type -
IVL<INT>

Ensure each attribute name matches its corresponding data type -
INT.POS

Ensure each attribute name matches its corresponding data type -
INT.NONNET

Ensure each attribute name matches its corresponding data type -
OID
Ensure each attribute name matches its corresponding data type -
PN
Ensure each attribute name matches its corresponding data type -
PQ
Ensure each attribute name matches its corresponding data type -
PQ.TIME
Ensure each attribute name matches its corresponding data type -
REAL
Ensure each attribute name matches its corresponding data type -
SC
Ensure each attribute name matches its corresponding data type -
TEL
Ensure each attribute name matches its corresponding data type -
TN
Ensure each attribute name matches its corresponding data type -
TS
Ensure each attribute name matches its corresponding data type -
TS.DATE
Ensure each attribute name matches its corresponding data type -
TS.DATE.FULL
Ensure each attribute name matches its corresponding data type -
TS.DATETIME
Ensure each attribute name matches its corresponding data type -
URL
Ensure each attribute name matches its corresponding data type -
IVL
Ensure each attribute name matches its corresponding data type -
RTO
Ensure each attribute name matches its corresponding data type -
URG
Ensure all attribute data types are known and valid

Ensure each attribute has valid multiplicity - lowerbound
Ensure each attribute multiplicity matches its corresponding data
type - BAG, DSET
Ensure each attribute has valid multiplicity - upperbound
Ensure each attributre has a definition
Ensure each attributre has at least one mappng tag
Ensure each attriubte visibility in NOT Public
Comments




This should be covered by the two requirements above




is this needed?




why is this an error when the lable name is a warning?
Date        Name
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock
5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock

5/22/2010   Mike Woodcock


7/21/2010   Mike Woodcock
7/21/2010   Mike Woodcock

7/21/2010   Mike Woodcock


7/21/2010   Mike Woodcock
7/21/2010   Mike Woodcock
7/21/2010   Mike Woodcock
7/21/2010   Mike Woodcock
7/21/2010   Mike Woodcock
7/21/2010   Mike Woodcock
7/30/2010   Mike Woodcock

7/30/2010   Mike Woodcock
12/1/2010   Mike Woodcock

12/1/2010   Mike Woodcock

12/1/2010   Mike Woodcock

12/1/2010   Mike Woodcock
12/1/2010   Mike Woodcock
12/1/2010   Mike Woodcock
12/1/2010   Mike Woodcock
12/1/2010   Mike Woodcock
12/1/2010   Mike Woodcock
2/24/2011   Mike Woodcock

2/6/2012    Steve Sandberg
2/6/2012    Steve Sandberg

2/6/2012    Steve Sandberg

2/6/2012    Steve Sandberg
2/6/2012    Steve Sandberg

2/6/2012    Steve Sandberg
2/6/2012    Steve Sandberg
Changes
Add changes to errors below require the “should” to be changed to “must”
Class name begins with capital letter – change to error
Class name contains a space, dash or underscore – change to error
Class name contains an “And” or an “Or” (not “Org”) – change to error
Aggregation name should be “is collected in” – drop this validation
Composition name should be “is part of” – drop this validation
More than one inverse name – change to error
Inverse aggregation name should be “collects” – drop this validation
Inverse collection name should be “has parts” – drop this validation
Association role names must be defined – change to error
Each connection should have a connection – change to error
Inverse name of a generalization – change the error message to …”is specialized
by”
Attribute name begins with capital letter – change to error
Attribute name contains a space, dash or underscore – change to error
Attribute name requirements per data type – change to error; PQ – “Quantity” –
keep as warning; EXPR – “Range” – keep as warning
Enable the INT attribute name check and make it “…Number”
Disable the cardinality check on the data types (BAG, DEST, etc) (Comment out)

Change the “Each attribute should have a valid data type.” – ERROR
Comment out upper and lower bound for attributes
Change the “Attribute should have at least one mapping tag” – ERROR
Added validation for attribute scope = always set to “Public” – ERROR if not public

Added validation that each class in the project browser is used in the
comprehensive diagram AND one sub-domain diagram – ERROR
Added validation that each class is colored appropriately for that sub-domain –
ERROR
Added validation to ensure feature visibility is set to display inherited attributes on
all classes – ERROR
Added validation that each constraint has a definition - ERROR
Added validation that each constraint is either a “Invariant” or “Inverse Relation” –
ERROR
Added validation to check that there are no duplicate tag values for class, attribute,
association – ERROR
Added validation to ensure that each link is actually used in a diagram (Verify all
links are being used in at least one sub-domain diagram and once in the
comprehensive diagram). ERROR
Changed message type of “Connection has no description” to ERROR.
Disabled validation checking for an upperbound value greater than 1 for URG data
types
Added validation for the existence of definitions and notes to Associations, Classes
and Attributes. Checking for length of strings in each area of the notes field.

Ensured Connection description has a valid format
Added package name to all validation error messages in Excel
Excluded the ISO Data Types package from the validation script.
Added the data types that are currently in the model to the validation script. Such
as DSET<CD> and DSET<ST> “valid data types”
Inverse relationships do not need a definition.
Changed URL definition to Uniform Resource Locator
Added validation that each class from a sub-package is in the diagram associated
with that sub-package.
Added temporary variable clean up.
Added check for 1..* as source cardinality and 0..* as destination cardinality.
Should be inverse.
Added validation to ensure that combination of target role name and target class is
unique for a given class – ERROR
Added check for ST.SIMPLE data types that could have any attribute name so
script does not produce an error.
Modified script so that attribute name “age “is acceptable for PQ device age.
Made “quantity” and “order” a valid name suffix for INT
Changed script so that integer data type can have a suffix of “number”
Changed script for classes so they do not require an attribute.’
Made warnings less directive.
Added “duration” as valid attribute name for IVL.TIME
Fixed bug in check for 1..* as source cardinality and 0..* as destination cardinality.
Should be inverse.
Change validation of Generalization name - should be 'be specialized by'.
Connection source role name should be in lowercase camelCase. (Include Class
Name)
Connection target role name should be in lowercase camelCase. (Include Class
Name)
Change validation of association names from "sometimes" to "might"
Verify attribute name is valid for data type (INT) number. Looking for 'integer, count,
order*, percent, number*, or quantity*.'
updated datatype validation to match Lloyds cheetsheet
If BAG<AD> is a valid data type, add it to the list of allowable values.
Object Type   Future Requirements                                                           Message Type
Attribute     Ensure each attribute has a name                                              ERROR
Attribute     Ensure "TO BE DELETED"/DEPRECATED attributes have been deleted                WARNING

Attribute     Ensure attribute tags are unique                                              ERROR
Attribute     Ensure Scope is set to appropriate Release # for all attributes               ERROR
Class         Ensure "TO BE DELETED"/DEPRECATED classes have been deleted                   WARNING
Class         Ensure class tags are unique                                                  ERROR
Class         Ensure each class feature visibility is set to display inherited attributes   WARNING

Class         Ensure Scope is set to appropriate Release # for all classes                  ERROR
Connection    Ensure "TO BE DELETED"/DEPRECATED associations have been deleted              WARNING

Connection    Ensure assoication tags are unique                                            ERROR
Connection    Ensure each association role names end with associated class name             ERROR

Connection    Ensure each connection has valid source class - many-to-one
Constraint    Ensure each constraint has a definition                                       ERROR
Constraint    Ensure each constraint name follows naming conventions                        WARNING


Constraint    Ensure each constraint name is unique for each class                          ERROR
Object        Ensure each object on an instance diagram corresponds to a valid class.       ERROR
Comments

How do we determine a year has passed for deprecated items?


This will require update for each release
How do we determine a year has passed for deprecated items?




This will require update for each release
How do we determine a year has passed for deprecated items?




*end = Source, 1 end= target

Need to quantify the naming conventions.
Need to verify that the constraint names match association names (or association
names)

Look into adding validations for Instance Diagrams – if a class is updated, ensure it
matches the instance diagram. This involves state engine analysis. Not all attributes
are given a state when objects are modeled. Changes to classifiers do not flow down to
objects. Tagged values do change in objects when classifier tagged values are
changed. . Check that all objects have a valid classifier. Make sure attributes of
classifier match of Object.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:12
posted:4/8/2012
language:English
pages:16