Author Topic: connectors stored in t_diagramlinks  (Read 3018 times)

JiangangWang

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
connectors stored in t_diagramlinks
« on: January 11, 2024, 11:39:12 am »
Dears,
Does anyone meet the issue that not all the connectors on a diagram are stored in t_diagramlink table?

I have met an issue that on a UseCase diagram, there are 5 self-defined connectors (based on association) between actor and usecases, 5 "include" connectors between usecases, but only 5 "include" connectors can be found in t_diagramlink table, another 5 self-defined connectors are all lost.
But with the same Actor and Usecases elements on another use case diagram, all self-defined connectors and "include" connectors are all found in t_diagramlink table.

Does anyone know the rule to decide under which condition the connectors are stored or not in t_diagramlink table?

Thank you

Wang

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: connectors stored in t_diagramlinks
« Reply #1 on: January 11, 2024, 04:34:17 pm »
Connectors are registered in t_diagramlinks if the connector existed when the diagram was last opened.

So if you create a connector after saving the diagram it will not be present in t_diagramlinks until you open the diagram again.

Geert

JiangangWang

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: connectors stored in t_diagramlinks
« Reply #2 on: January 11, 2024, 07:42:27 pm »
Thanks Geert.
When you say saving the diagram, do you mean manually save command from EA?
But if there is any change on the diagram (i.e. adding a new connector), it has to be saved by people manually or from the reminder of EA when you close the diagram.
So in this case, it should be always consistent between a diagram and t_diagramlinks.

Isn't it?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: connectors stored in t_diagramlinks
« Reply #3 on: January 11, 2024, 08:52:02 pm »
It's not the actual saving, but the loading of a diagram that causes the t_diagramLinks to be created.

If you create a connector on a diagram, it should always be in t_diagramLinks for that diagram.

Geert

JiangangWang

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: connectors stored in t_diagramlinks
« Reply #4 on: January 11, 2024, 09:58:35 pm »
so do you know what might be the issue that the inconsistency occurs between diagram links and record in t_diagramlink?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: connectors stored in t_diagramlinks
« Reply #5 on: January 11, 2024, 10:30:00 pm »
I stronly suspect that they are in fact present in t_diagramlinks, but for some other reason don't show up in your query.

Geert

JiangangWang

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: connectors stored in t_diagramlinks
« Reply #6 on: February 17, 2024, 02:38:08 pm »
Hello Mr. Geert,
I asked EA support, and they told me that the connector can only be shown in t_diagramlink when the diagram is modified and saved (for the case the connector is created in another diagram between two elements firstly). The original answer is as following "For example, if you have diagrams X, Y and Elements A and B are on both of those diagrams. On Diagram X you add a connector between A and B. You then open diagram Y and the connector will be displayed on the diagram but the t_diagramlink entry will not be added unless you modify the diagram and save".

So I made a script to add an extra unique-named element on the browser firstly, and then add element onto each diagram, and then delete the element from diagram, delete the element from browser, and saved the diagram, but it doesn't make the t_diagramlink fresh.
However it works with the manual operation following the exactly same steps as the scripts.

Do you know if diagram.update() function save the diagram or not?

Thanks a lot.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: connectors stored in t_diagramlinks
« Reply #7 on: February 18, 2024, 09:04:37 pm »
Maybe you should start by stating your goal.

What are you trying to achieve, and why do you need the diagramlinks collection?

Before doing a throw everything to the wall and see what sticks, you should probably investigate exactly when the diagramlinks collection gets refreshed.

I think this used to be only when the diagram got saved, but IIRC that behavior has changed. I'm pretty sure the diagramlinks collection will be correct if you load the diagram again.

Geert