Author Topic: Operation associated with the connector  (Read 3968 times)

alfons12

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Operation associated with the connector
« on: March 17, 2020, 09:51:54 am »
How to find out guid of the operation associated with the message in the sequence diagrams and collaboration diagrams?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Operation associated with the connector
« Reply #1 on: March 17, 2020, 10:58:46 am »
From my Inside book p.58:
Quote
For sequence messages which are linked to an operation there is an according tagged value operation_guid which corresponds to t_operation.ea_guid.

q.

alfons12

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Operation associated with the connector
« Reply #2 on: March 18, 2020, 03:37:21 am »
Awesome thank you!

Another question: in the communication diagram, where is the relationship between the association and the related collaboration stored?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Operation associated with the connector
« Reply #3 on: March 18, 2020, 03:48:24 am »
Can you be more specific? A communication diagram is just a diagram. So: which association and which collaboration?

q.

alfons12

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Operation associated with the connector
« Reply #4 on: March 18, 2020, 04:00:19 am »
1. Create communication diagram
2. Create 2 objects and insert them into the diagram
3. Crate an association between the objects
4. Righ click the association and select Add message from...
5. Double click the message (collaboration) and select an operation

The relation between the message and the operation is stored in the tagged value as you pointed out. But there must also be a link between the association and the message (collaboration).

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Operation associated with the connector
« Reply #5 on: March 18, 2020, 07:12:17 am »
For the records: collaborations are those dashed UC ellipses which realize a UC.

3. Create an association between the objects

Nope. Objects do not have associations. They may have links, though.

q.

alfons12

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Operation associated with the connector
« Reply #6 on: March 18, 2020, 08:40:38 am »
For the records: collaborations are those dashed UC ellipses which realize a UC.

When I do
4. Righ click the association and select Add message from...
and select the added message in the diagram, EA shows in the status bar that it is "Collaboration"   ::)

Nope. Objects do not have associations. They may have links, though.

Ok, I see. Regarding my problem, it does not matter what type of connector it is :) The question is, if it is possible to find out which connector the message is related to.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Operation associated with the connector
« Reply #7 on: March 18, 2020, 09:39:27 am »
It looks like t_connector.PDATA4 contains the operation ID. (I say it looks like: I tried it on an empty model and my operation ID was "1"). In the Object Model, t_connector.PDATA4 maps to EA.Connector.MiscData(3).
The Sparx Team
[email protected]

alfons12

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Operation associated with the connector
« Reply #8 on: March 22, 2020, 09:32:55 pm »
It looks like t_connector.PDATA4 contains the operation ID. (I say it looks like: I tried it on an empty model and my operation ID was "1"). In the Object Model, t_connector.PDATA4 maps to EA.Connector.MiscData(3).

KP, it is t_connector.sourceisaggregate

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Operation associated with the connector
« Reply #9 on: March 22, 2020, 10:27:17 pm »
sourceisaggregate holds the dropdown value from the connector property's Aggregation. 0=none, 1=shared, 2=composite.

If I got it right EA creates an entry in t_connectortag like
Code: [Select]
PropertyID;ElementID;Property;VALUE;NOTES;ea_guid;

2;6;operation_guid;{10BE20F9-6F67-4ba4-91A2-59AD27CE4E1A}; ;{2BB6F6F4-3E8F-4cdc-A07A-9C892F977E33};
where (here) {10BE20F9-6F67-4ba4-91A2-59AD27CE4E1A} matches t_operation.ea_guid of the referenced operation.

q.
« Last Edit: March 22, 2020, 10:55:28 pm by qwerty »

alfons12

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Operation associated with the connector
« Reply #10 on: March 23, 2020, 01:27:22 am »
sourceisaggregate holds the dropdown value from the connector property's Aggregation. 0=none, 1=shared, 2=composite.

Well, that's obviously true for Associations. For t_connector.connectory_type=Collaboration, the sourceisaggregate holds the ID of the association which the collaboration belongs to (created through Add message from...)

Weird, but I am just looking at it in the database.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Operation associated with the connector
« Reply #11 on: March 23, 2020, 04:52:41 am »
You are right. EA creates an association whose ID is stored in sourceisaggregate of the link. Why EA creates an additional association is their secret. From an UML perspective it appears to be wrong since instances are not associated but linked (a link is an instance of an association). Usually EA hides that association and that would be ok. They are free on how to implement things as long as the user gets the right representation. (Somehow when fiddling around I got the link deleted with the association showing up - well).

Anyhow, that's how it is.

q.