-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Giu Platania
authored and
Giu Platania
committed
Dec 23, 2022
1 parent
3d5143b
commit 9511422
Showing
593 changed files
with
448,324 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Check> | ||
<CheckId>0901</CheckId> | ||
<CheckDescription>Use Cases that are not in exactly one Boundary</CheckDescription> | ||
<QueryToFindElements> | ||
<Main> | ||
SELECT o.ea_guid AS ItemGuid | ||
FROM ((((((t_object o | ||
INNER JOIN t_package p ON p.Package_ID = o.Package_ID) | ||
LEFT JOIN t_package Package_p1 ON Package_p1.Package_id = p.parent_id) | ||
LEFT JOIN t_package Package_p2 ON Package_p2.Package_id = Package_p1.parent_id) | ||
LEFT JOIN t_package Package_p3 ON Package_p3.Package_id = Package_p2.parent_id) | ||
LEFT JOIN t_package Package_p4 ON Package_p4.Package_id = Package_p3.parent_id) | ||
LEFT JOIN t_package Package_p5 ON Package_p5.Package_id = Package_p4.parent_id) | ||
WHERE o.Object_Type = 'UseCase' | ||
AND (o.StereoType IS NULL OR (o.Stereotype <> 'bProcessUC' AND o.Stereotype <> 'Business Transaction')) | ||
</Main> | ||
<Filters> | ||
<Change> | ||
AND o.ea_guid in ( | ||
SELECT oChange.ea_guid | ||
FROM t_object oChange | ||
INNER JOIN t_objectproperties opChange ON oChange.Object_ID = opChange.Object_ID | ||
WHERE opChange.Property = 'CR' | ||
AND opChange.Value = '#SearchTerm#' | ||
) | ||
</Change> | ||
<Release> | ||
AND o.ea_guid in ( | ||
SELECT o2.ea_guid | ||
FROM (t_object o2 | ||
INNER JOIN t_objectproperties op2 ON o2.Object_ID = op2.Object_ID) | ||
WHERE op2.Property = 'CR' | ||
AND op2.Value in ( | ||
SELECT oChange.ea_guid | ||
FROM ((t_object oRelease | ||
INNER JOIN t_connector con ON oRelease.Object_ID = con.End_Object_ID) | ||
INNER JOIN t_object oChange ON con.Start_Object_ID = oChange.Object_ID) | ||
WHERE oRelease.ea_guid = '#SearchTerm#' | ||
) | ||
) | ||
</Release> | ||
<Package> | ||
AND p.Package_ID in (#Branch#) | ||
</Package> | ||
<FunctionalDesign> | ||
AND o.ea_guid in ( | ||
SELECT o1.ea_guid | ||
FROM t_object o1 | ||
INNER JOIN t_diagramobjects do1 ON do1.Object_ID = o1.Object_ID | ||
INNER JOIN t_diagram d1 ON d1.Diagram_ID = do1.Diagram_ID | ||
WHERE d1.ea_guid = '#SearchTerm#' | ||
) | ||
</FunctionalDesign> | ||
</Filters> | ||
</QueryToFindElements> | ||
<QueryToCheckFoundElements> | ||
<Main> | ||
SELECT o.Name AS ItemName | ||
, 'object' as ItemType | ||
, o.ea_guid AS ItemGuid | ||
, o.Object_Type AS ElementType | ||
, o.StereoType AS ElementStereotype | ||
, p.name AS PackageName | ||
, package_p1.name AS PackageParentLevel1 | ||
, package_p2.name AS PackageParentLevel2 | ||
, package_p3.name AS PackageParentLevel3 | ||
, package_p4.name AS PackageParentLevel4 | ||
, package_p5.name AS PackageParentLevel5 | ||
FROM ((((((t_object o | ||
INNER JOIN t_package p ON p.Package_ID = o.Package_ID) | ||
LEFT JOIN t_package Package_p1 ON Package_p1.Package_id = p.parent_id) | ||
LEFT JOIN t_package Package_p2 ON Package_p2.Package_id = Package_p1.parent_id) | ||
LEFT JOIN t_package Package_p3 ON Package_p3.Package_id = Package_p2.parent_id) | ||
LEFT JOIN t_package Package_p4 ON Package_p4.Package_id = Package_p3.parent_id) | ||
LEFT JOIN t_package Package_p5 ON Package_p5.Package_id = Package_p4.parent_id) | ||
WHERE o.ea_guid in (#ElementGuids#) | ||
AND o.ea_guid NOT IN | ||
( | ||
SELECT o.ea_guid | ||
FROM t_object o | ||
INNER JOIN t_diagramobjects do on do.Object_ID = o.Object_ID | ||
INNER JOIN t_diagram d on d.Diagram_ID = do.Diagram_ID | ||
INNER JOIN t_diagramobjects do2 on do2.Diagram_ID = d.Diagram_ID | ||
INNER JOIN t_object o2 on o2.Object_ID = do2.Object_ID | ||
WHERE o.Object_Type = 'UseCase' | ||
AND d.Diagram_Type = 'Use Case' | ||
AND (o.StereoType IS NULL OR (o.Stereotype <> 'bProcessUC' AND o.Stereotype <> 'Business Transaction')) | ||
AND o2.Object_Type = 'Boundary' | ||
AND do2.RectRight >= do.RectRight | ||
AND do2.RectLeft <= do.RectLeft | ||
AND do2.RectBottom <= do.RectBottom | ||
AND do2.RectTop >= do.RectTop | ||
GROUP BY o.ea_guid | ||
HAVING COUNT(o.ea_guid)=1 | ||
) | ||
</Main> | ||
<Parameters></Parameters> | ||
</QueryToCheckFoundElements> | ||
<WarningType>Error</WarningType> | ||
<Rationale>A UseCase must appear in exactly 1 Boundary (of all Use Case-diagrams)</Rationale> | ||
<ProposedSolution></ProposedSolution> | ||
</Check> |
80 changes: 80 additions & 0 deletions
80
Checks/checks/All/Elements with the EA status other than Approved.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Check> | ||
<CheckId>00</CheckId> | ||
<CheckDescription>Elements with the EA status Approved</CheckDescription> | ||
<QueryToFindElements> | ||
<Main>SELECT o1.ea_guid AS ItemGuid | ||
FROM ((((((t_object as o1 | ||
INNER JOIN t_Package p ON p.Package_ID = o1.Package_ID) | ||
LEFT JOIN t_Package Package_p1 ON Package_p1.Package_id = p.parent_id) | ||
LEFT JOIN t_Package Package_p2 ON Package_p2.Package_id = Package_p1.parent_id) | ||
LEFT JOIN t_Package Package_p3 ON Package_p3.Package_id = Package_p2.parent_id) | ||
LEFT JOIN t_Package Package_p4 ON Package_p4.Package_id = Package_p3.parent_id) | ||
LEFT JOIN t_Package Package_p5 ON Package_p5.Package_id = Package_p4.parent_id) | ||
|
||
Where o1.Status IS NOT NULL</Main> | ||
<Filters> | ||
<Change> | ||
AND o.ea_guid in ( | ||
SELECT oChange.ea_guid | ||
FROM t_object oChange | ||
INNER JOIN t_objectproperties opChange ON oChange.Object_ID = opChange.Object_ID | ||
WHERE opChange.Property = 'CR' | ||
AND opChange.Value = '#SearchTerm#' | ||
) | ||
</Change> | ||
<Release> | ||
AND o.ea_guid in ( | ||
SELECT o2.ea_guid | ||
FROM (t_object o2 | ||
INNER JOIN t_objectproperties op2 ON o2.Object_ID = op2.Object_ID) | ||
WHERE op2.Property = 'CR' | ||
AND op2.Value in ( | ||
SELECT oChange.ea_guid | ||
FROM ((t_object oRelease | ||
INNER JOIN t_connector con ON oRelease.Object_ID = con.End_Object_ID) | ||
INNER JOIN t_object oChange ON con.Start_Object_ID = oChange.Object_ID) | ||
WHERE oRelease.ea_guid = '#SearchTerm#' | ||
) | ||
) | ||
</Release> | ||
<Package> | ||
AND p.Package_ID in (#Branch#) | ||
</Package> | ||
<FunctionalDesign></FunctionalDesign> | ||
</Filters> | ||
</QueryToFindElements> | ||
<QueryToCheckFoundElements> | ||
<Main>SELECT o.Name AS ItemName | ||
, 'object' as ItemType | ||
, o.ea_guid AS ItemGuid | ||
, o.Object_Type AS ElementType | ||
, o.StereoType AS ElementStereotype | ||
, p.name AS PackageName | ||
, package_p1.name AS PackageParentLevel1 | ||
, package_p2.name AS PackageParentLevel2 | ||
, package_p3.name AS PackageParentLevel3 | ||
, package_p4.name AS PackageParentLevel4 | ||
, package_p5.name AS PackageParentLevel5 | ||
FROM ((((((t_object o | ||
INNER JOIN t_package p ON p.Package_ID = o.Package_ID) | ||
LEFT JOIN t_package package_p1 ON package_p1.package_id = p.parent_id) | ||
LEFT JOIN t_package package_p2 ON package_p2.package_id = package_p1.parent_id) | ||
LEFT JOIN t_package package_p3 ON package_p3.package_id = package_p2.parent_id) | ||
LEFT JOIN t_package package_p4 on package_p4.package_id = package_p3.parent_id) | ||
LEFT JOIN t_package package_p5 on package_p5.package_id = package_p4.parent_id) | ||
WHERE o.ea_guid in (#ElementGuids#) | ||
AND o.ea_guid not in ( | ||
|
||
Select o1.ea_guid | ||
from t_object as o1 | ||
|
||
Where o1.Status = 'Approved' | ||
|
||
)</Main> | ||
<Parameters></Parameters> | ||
</QueryToCheckFoundElements> | ||
<WarningType>Warning</WarningType> | ||
<Rationale>Approved status indicates that the Element is not managed</Rationale> | ||
<ProposedSolution>Sewt the status</ProposedSolution> | ||
</Check> |
78 changes: 78 additions & 0 deletions
78
Checks/checks/All/a Diagram must not contain more than 25 elements.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Check> | ||
<CheckId>01</CheckId> | ||
<CheckDescription>a Diagram must not contain more than 25 elements</CheckDescription> | ||
<QueryToFindElements> | ||
<Main>SELECT DISTINCT d.ea_guid AS ItemGuid | ||
FROM (((((((t_DiagramObjects as o1 | ||
INNER JOIN t_diagram as d on d.Diagram_ID = o1.Diagram_ID) | ||
INNER JOIN t_Package p ON p.Package_ID = d.Package_ID) | ||
LEFT JOIN t_Package Package_p1 ON Package_p1.Package_id = p.parent_id) | ||
LEFT JOIN t_Package Package_p2 ON Package_p2.Package_id = Package_p1.parent_id) | ||
LEFT JOIN t_Package Package_p3 ON Package_p3.Package_id = Package_p2.parent_id) | ||
LEFT JOIN t_Package Package_p4 ON Package_p4.Package_id = Package_p3.parent_id) | ||
LEFT JOIN t_Package Package_p5 ON Package_p5.Package_id = Package_p4.parent_id) | ||
|
||
WHERE d.ea_GUID IS NOT NULL</Main> | ||
<Filters> | ||
<Change> | ||
AND o.ea_guid in ( | ||
SELECT oChange.ea_guid | ||
FROM t_object oChange | ||
INNER JOIN t_objectproperties opChange ON oChange.Object_ID = opChange.Object_ID | ||
WHERE opChange.Property = 'CR' | ||
AND opChange.Value = '#SearchTerm#' | ||
) | ||
</Change> | ||
<Release> | ||
AND o.ea_guid in ( | ||
SELECT o2.ea_guid | ||
FROM (t_object o2 | ||
INNER JOIN t_objectproperties op2 ON o2.Object_ID = op2.Object_ID) | ||
WHERE op2.Property = 'CR' | ||
AND op2.Value in ( | ||
SELECT oChange.ea_guid | ||
FROM ((t_object oRelease | ||
INNER JOIN t_connector con ON oRelease.Object_ID = con.End_Object_ID) | ||
INNER JOIN t_object oChange ON con.Start_Object_ID = oChange.Object_ID) | ||
WHERE oRelease.ea_guid = '#SearchTerm#' | ||
) | ||
) | ||
</Release> | ||
<Package> | ||
AND p.Package_ID in (#Branch#) | ||
</Package> | ||
<FunctionalDesign></FunctionalDesign> | ||
</Filters> | ||
</QueryToFindElements> | ||
<QueryToCheckFoundElements> | ||
<Main>SELECT COUNT (o.Object_ID) AS 'ElementCount', d.Name AS ItemName | ||
, 'Diagram' as ItemType | ||
, d.ea_guid AS ItemGuid | ||
, d.Diagram_Type AS ElementType | ||
, d.StereoType AS ElementStereotype | ||
, p.name AS PackageName | ||
, package_p1.name AS PackageParentLevel1 | ||
, package_p2.name AS PackageParentLevel2 | ||
, package_p3.name AS PackageParentLevel3 | ||
, package_p4.name AS PackageParentLevel4 | ||
, package_p5.name AS PackageParentLevel5 | ||
FROM (((((( (t_Diagramobjects o | ||
INNER JOIN t_Diagram as d on d.Diagram_ID = o.Diagram_ID) | ||
INNER JOIN t_package p ON p.Package_ID = d.Package_ID) | ||
LEFT JOIN t_package package_p1 ON package_p1.package_id = p.parent_id) | ||
LEFT JOIN t_package package_p2 ON package_p2.package_id = package_p1.parent_id) | ||
LEFT JOIN t_package package_p3 ON package_p3.package_id = package_p2.parent_id) | ||
LEFT JOIN t_package package_p4 on package_p4.package_id = package_p3.parent_id) | ||
LEFT JOIN t_package package_p5 on package_p5.package_id = package_p4.parent_id) | ||
|
||
GROUP BY d.EA_GUID, d.Name, d.ea_guid, d.Diagram_Type, d.Stereotype, p.name, package_p1.name, package_p2.name, package_p3.name, package_p4.name, package_p5.name | ||
|
||
Having COUNT(o.Object_ID)>25 | ||
AND d.EA_GUID IN (#ElementGuids#)</Main> | ||
<Parameters></Parameters> | ||
</QueryToCheckFoundElements> | ||
<WarningType>Warning</WarningType> | ||
<Rationale>Ideally a diagram should not contains more that seven elements</Rationale> | ||
<ProposedSolution>Relocate elelements, create frill-in visualization </ProposedSolution> | ||
</Check> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Check> | ||
<CheckId>003</CheckId> | ||
<CheckDescription> diagrams without objects</CheckDescription> | ||
<QueryToFindElements> | ||
<Main>SELECT d.ea_guid AS ItemGuid | ||
FROM (((((((t_diagram d | ||
INNER JOIN t_package p on p.Package_ID = d.Package_ID) | ||
INNER JOIN t_object o on (o.Object_ID = d.ParentID and o.Stereotype in ('TMF_Process', 'TMF_ABE', 'TMF_Application','TMF_Domain', 'TMF_Vertical', 'TMF_IIC', 'TMF_Function' ))) | ||
LEFT JOIN t_package package_p1 on package_p1.package_id = p.parent_id) | ||
LEFT JOIN t_package package_p2 on package_p2.package_id = package_p1.parent_id) | ||
LEFT JOIN t_package package_p3 on package_p3.package_id = package_p2.parent_id) | ||
LEFT JOIN t_Package Package_p4 on Package_p4.Package_id = Package_p3.parent_id) | ||
LEFT JOIN t_Package Package_p5 on Package_p5.Package_id = Package_p4.parent_id) | ||
WHERE d.Diagram_Type = 'Custom'</Main> | ||
<Filters> | ||
<Change></Change> | ||
<Release></Release> | ||
<Package> | ||
AND p.Package_ID in (#Branch#) | ||
</Package> | ||
<FunctionalDesign></FunctionalDesign> | ||
</Filters> | ||
</QueryToFindElements> | ||
<QueryToCheckFoundElements> | ||
<Main> | ||
SELECT d.Name AS ItemName | ||
, 'diagram' as ItemType | ||
, d.ea_guid AS ItemGuid | ||
, d.Diagram_Type AS ElementType | ||
, d.StereoType AS ElementStereotype | ||
, p.name AS PackageName | ||
, package_p1.name AS PackageParentLevel1 | ||
, package_p2.name AS PackageParentLevel2 | ||
, package_p3.name AS PackageParentLevel3 | ||
, package_p4.name AS PackageParentLevel4 | ||
, package_p5.name AS PackageParentLevel5 | ||
FROM ((((((t_diagram d | ||
INNER JOIN t_package p on p.Package_ID = d.Package_ID) | ||
LEFT JOIN t_package package_p1 on package_p1.package_id = p.parent_id) | ||
LEFT JOIN t_package package_p2 on package_p2.package_id = package_p1.parent_id) | ||
LEFT JOIN t_package package_p3 on package_p3.package_id = package_p2.parent_id) | ||
LEFT JOIN t_package package_p4 on package_p4.package_id = package_p3.parent_id) | ||
LEFT JOIN t_package package_p5 on package_p5.package_id = package_p4.parent_id) | ||
WHERE d.ea_guid in (#ElementGuids#) | ||
AND not exists ( | ||
SELECT do.Diagram_ID | ||
FROM t_diagramobjects do | ||
WHERE do.Diagram_ID = d.Diagram_ID | ||
) | ||
</Main> | ||
<Parameters></Parameters> | ||
</QueryToCheckFoundElements> | ||
<WarningType>Error</WarningType> | ||
<Rationale>an empty diagram is confusing</Rationale> | ||
<ProposedSolution>delete the diagram</ProposedSolution> | ||
</Check> |
Oops, something went wrong.