Author Topic: How to report trace relationships for state transitions?  (Read 109 times)

bknoth2

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
How to report trace relationships for state transitions?
« on: November 04, 2017, 03:23:48 am »
I have a state transition from State1 to State2 (Call it Transition1). I attach a trace from Transition1 to Artifact1. How do I generate a report or an SQL query that lists that trace relationship? (I know how to do it when I trace from a State element, but not from a state transition).

Thanks
Bruce

bknoth2

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: How to report trace relationships for state transitions?
« Reply #1 on: November 04, 2017, 10:55:12 am »
I figured out the answer, sort of, based on SQL for a different EA query. This SQL lists all the trace relationships in the model.

SELECT t_connector.Connector_Type AS [CLASSTYPE],
    t_connector.ea_guid AS [CLASSGUID],
    t_object1.Stereotype AS [From_Type],
    t_object1.Name AS [From_Name],
    t_connector.Stereotype AS Relation,
    t_object2.Stereotype AS [To_Type],
    t_object2.Name AS [To_Name]
FROM t_object t_object1, t_object t_object2, t_connector
where t_connector.Start_Object_ID = t_object1.Object_Id
    and t_connector.End_Object_ID = t_object2.Object_Id
    and t_connector.Stereotype='trace'
    and t_object1.Stereotype is not null
    and t_object2.Stereotype is not null
Union
SELECT t_connector.Connector_Type AS [CLASSTYPE],
    t_connector.ea_guid AS [CLASSGUID],
    t_object1.Stereotype AS [From_Type],
    t_object1.Name AS [From_Name],
    t_connector.Stereotype AS Relation,
    t_object2.Object_Type AS [To_Type],
    t_object2.Name AS [To_Name]
FROM t_object t_object1, t_object t_object2, t_connector
where t_connector.Start_Object_ID = t_object1.Object_Id
    and t_connector.End_Object_ID = t_object2.Object_Id
    and t_connector.Stereotype='trace'
    and t_object1.Stereotype is not null
    and t_object2.Stereotype is null
Union
SELECT t_connector.Connector_Type AS [CLASSTYPE],
    t_connector.ea_guid AS [CLASSGUID],
    t_object1.Object_Type AS [From_Type],
    t_object1.Name AS [From_Name],
    t_connector.Stereotype AS Relation,
    t_object2.Stereotype AS [To_Type],
    t_object2.Name AS [To_Name]
FROM t_object t_object1, t_object t_object2, t_connector
where t_connector.Start_Object_ID = t_object1.Object_Id
    and t_connector.End_Object_ID = t_object2.Object_Id
    and t_connector.Stereotype='trace'
    and t_object1.Stereotype is null
    and t_object2.Stereotype is not null
Union
SELECT t_connector.Connector_Type AS [CLASSTYPE],
    t_connector.ea_guid AS [CLASSGUID],
    t_object1.Object_Type AS [From_Type],
    t_object1.Name AS [From_Name],
    t_connector.Stereotype AS Relation,
    t_object2.Object_Type AS [To_Type],
    t_object2.Name AS [To_Name]
FROM t_object t_object1, t_object t_object2, t_connector
where t_connector.Start_Object_ID = t_object1.Object_Id
    and t_connector.End_Object_ID = t_object2.Object_Id
    and t_connector.Stereotype='trace'
    and t_object1.Stereotype is null
    and t_object2.Stereotype is null