I'm struggling in creating a chart to show traceability status using EA v15.0 I have defined a model (eapx file) with two stereotypes "Customer Requirement" and "Software Requirement" which shall be linked together via Realization link.
The main objective is to obtain a chart like showing as YES (Covered) the Customer Requirements that have at least one realization link to a Software Requirement, NO (Uncovered) otherwise.
Do you have any suggestion to create this? I think a Custom SQL would do the job...
I have already created some SQL queries to get the list of Covered Customer Requirements (and similarly for the Uncovered ones) as ModelView elements, using the following SQL query:
SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE, t_object.Name AS [Requirement], t_package.Name AS Package, t_object.Status, t_object.Stereotype
FROM t_package
INNER JOIN t_object ON t_package.Package_ID=t_object.Package_ID
WHERE t_object.Object_ID IN
(
SELECT t_connector.End_Object_ID
FROM t_connector
INNER JOIN t_object on t_connector.Start_Object_ID = t_object.Object_ID
WHERE t_connector.connector_Type='Realisation'
AND t_object.Stereotype = 'Software Requirement'
)
AND t_object.Stereotype='Customer Requirement'
and I obtain a list of elements like
However, for reporting purposes, I would like to summarize the requirements coverage status in a chart. I think this could be realized with a Standard Chart using a Custom SQL as Source, but I'm not able to define the SQL query.
With a query like this it should work.
You are looking for two sets:
A) the customer requirements that are realized by a software requirement. These are represented in the first query by Realized
B) the customer requirements that are realized by a software requirement. These are represented in the first query by Not Realized
Both queries are joined using a union all
. EA then simply counts the Realized and non Realised and puts them in the pie chart.
select 'Realized' AS Series
from t_object o
where o.Stereotype = 'Customer Requirement'
and exists
(select o.ea_guid from (t_object rq
inner join t_connector c on (c.Start_Object_ID = rq.Object_ID
and c.Connector_Type = 'Realisation'))
where rq.Stereotype = 'Software Requirement'
and c.End_Object_ID = o.Object_ID)
union all
select 'Not Realised' AS Series
from t_object o
where o.Stereotype = 'Customer Requirement'
and not exists
(select o.ea_guid from (t_object rq
inner join t_connector c on (c.Start_Object_ID = rq.Object_ID
and c.Connector_Type = 'Realisation'))
where rq.Stereotype = 'Software Requirement'
and c.End_Object_ID = o.Object_ID)