Book a Demo

Author Topic: "A funny thing happened on the way to a diagram."  (Read 7380 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
"A funny thing happened on the way to a diagram."
« on: February 22, 2019, 11:33:19 am »
[EDIT:  We did stuff up something (see below) in the creation of the arcs via queries.  So I thought I'd leave the post in to help others]

A funny thing happened on the way to a diagram.

As many of you know, we run a nightly process over our corporate repository.  The process does a whole lot of stuff and includes updating any "Neighborhood" diagrams for items that may have been modified since the last run.

Suddenly, about a week ago, we started seeing spurious connectors being created in the t_connector table.  They were only InformationFlow connectors and we know they are spurious since both the start_object_id and end_object_id are set to zero!  Naturally, a consistency check will locate and eliminate them.

We've since established (via MS SQL Server Trace) that they are created by Enterprise Architect 14 (but we also checked and they are also created by EA 13.0).  However since our code calls the EA APIs, that didn't tell us anything.  So we checked our code and there is nowhere where we directly call INSERT INTO t_connector.

We have also found that we can generate these spurious connectors, merely by opening the diagram (without any processing).  Not every diagram has the issue, it seems that the diagram needs to have InformationFlow relationships on it.  They are stereotyped versions:

Code: [Select]
<Stereotype name="Flow_P" metatype="Flow (Presentation)" notes="" cx="200" cy="100" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0">
<Icon type="bitmap" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"><<icon code>></Icon>
<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"><<Image code>></Image>
<AppliesTo>
<Apply type="InformationFlow">
<!-- Not ControlFlow because need bi-directionality -->
<Property name="_lineStyle" value="OrthogonalR"/>
</Apply>
</AppliesTo>
<TaggedValues>
<Tag name="FlowMechanism"/>
<Tag name="AutomationNature"/>
<Tag name="LifecycleStatus"/>
</TaggedValues>
</Stereotype>
So nothing special that we can see.

Some of these InformationFlows were created via the UI and some were created directly via queries in the DB.  So I guess it's possible that we "stuffed something up" when we created them.  Does anyone know any secret sauce that is needed with InformationFlows?
[Edit: you actually need to create arcs of type InformationFlows (not Flow - due to typo)!   Correcting the data in the DB (post facto) seems to have stopped the problem.]

We're at a loss where to look next.  Any ideas?  Anyone seen anything like this?

TIA,
Paolo
« Last Edit: February 22, 2019, 11:56:21 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: "A funny thing happened on the way to a diagram."
« Reply #1 on: February 22, 2019, 07:47:45 pm »
I don't know anything special about IFs. I ever have been reluctant to use them since (speaking in the past here) the looked like a chimera melt together from two connectors. So quite fishy in any case. Since you were speaking of "connectors", "open diagrams" and "creation" the t_diagramlinks is another strange candidate. In the beginning an entry had been created only for hidden connectors (or those otherwise being modified). Nowadays it looks like each connectors goes with an entry in that table.

I think that when I'm going to die and being sent to hell there'll be a place called Sparx development.

q.