Book a Demo

Author Topic: Building SQL for UPDM SV-6 query  (Read 3233 times)

Lewis Bowen

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Building SQL for UPDM SV-6 query
« on: September 03, 2012, 06:32:50 pm »
I've had problems with the SV-6 query in the UPDM plug-in. I expect it to pull out ExchangeElement that I've attached to ResourceInteractions, like OV-3 does for Needlines.

Looking at how this is meant to work in the SQL, it seems t_xref should have two entries, the first linking the t_connector record to the second, and the second referencing the t_object conveyed.

But this query I built shows the second t_xref doesn't have the GUID for the ExchangeElement for ResourceInteractions (where Needlines do):
SELECT CONNECTOR.Name as Connector_name,
      CONNECTOR.Stereotype as Connector_type,
      XCONVEYED.Description as Xcon_description
FROM t_connector CONNECTOR,
      t_xref XABSTRACTION,
      t_xref XCONVEYED
WHERE CONNECTOR.ea_guid=XABSTRACTION.Client
      AND XCONVEYED.Client=XABSTRACTION.Description

Does anyone know where the link between the ResourceInteraction and the ExchangeElement conveyed is actually made in the EA database?

I'm using EA 9.3 and UPDM MDG plug in 2.0.1.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Building SQL for UPDM SV-6 query
« Reply #1 on: September 04, 2012, 02:48:50 pm »
I think you need to add
Code: [Select]
AND XCONVEYED.Behavior='conveyed'to the end of your SQL. Then Xcon_description will contain the GUIDs of any elements conveyed on an information flow (comma-separated lists unless you have restricted yourself to one element conveyed per information flow).
« Last Edit: September 04, 2012, 02:50:37 pm by KP »
The Sparx Team
[email protected]

Lewis Bowen

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Building SQL for UPDM SV-6 query
« Reply #2 on: September 04, 2012, 05:56:04 pm »
Thanks for the tip, but I don't think this helps. The previous SQL was simplified and shows Needline and InformationExchange t_xref lines together (filters for 'conveyed' and diagram type were removed). When I found the built-in NSV-6 (with all its filters) didn't report my InformationExchanges I started stripping it back.

Here's 3 lines (with behavior columns) from the query against my model:
Connector_nameConnector_typeXcon_descriptionXcon_behaviourXabs_behaviour
risk management informationNeedline{A74DD7C4-31B1-4af5-99E4-E1FF3A45F57D}conveyedabstraction
scratch NSV-6 test interactionResourceInteraction@STEREO;Name=ExchangeElement;FQName=UPDM2::ExchangeElement;@ENDSTEREO; conveyed
@STEREO;Name=ExchangeElement;FQName=UPDM2::ExchangeElement;@ENDSTEREO; conveyed

The GUID for the ExchangeElement of the Needline is there, but isn't for the ResourceInteraction. I notice there are unnamed rows for each Needline with Xcon_description like the ResourceInteraction's, copied too.

Needlines and ResourceInteractions are a bit different in UPDM, but it seems they're implemented in a similar way. (I know I'm taking a shortcut across UPDM here too - Needlines should really be linked to OperationalExchanges that convey ExchangeItems). I've tried adding ExchangeElements when prompted for new links and tried adding them later via Advanced on the right-click menu for the connection. The associated ExchangeElements are still there when I right-click again, but maybe I'm not making the association in the right way...

Any more tips would be very welcome!