Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: PiotrS on February 05, 2014, 12:18:33 am

Title: Where is Generalization Set for Connector
Post by: PiotrS on February 05, 2014, 12:18:33 am
Hello!

I would like to check properties of connectors (it will be used in add-ins written in c#) in object structure in EA. I have same elements (UseCase), they have same connectors, thats all placed on one Use Case Diagram. One of this connectors had type: "Generalize" and set "Generalization Set" (with name this Generalization Set).
Where can I find in object structure value/attributes/anything of "Generalization Set" sets to this connector?
Connector had this definicion in eap, it is shown on UCDiagram (definition in eap: connector context menu -> Advanced -> Generalization Set -> New)

Any ideas?
Thanks in advance!

Hide Email from public?
Title: Re: Where is Generalization Set for Connector
Post by: qwerty on February 05, 2014, 03:31:18 am
I can't answer your question but would like to ask whether you know exactly what you're doing when using a generalization with use cases. From all I have read about that (and from my experience too) a generalization for UCs should be avoided. Each UC should be unique and return some value to its primary actor. So what would a generalized UC mean?

q.
Title: Re: Where is Generalization Set for Connector
Post by: PiotrS on February 05, 2014, 09:00:03 pm
We use this UC-ag (abstract generalization) and UC-s (specialization of abstract generalization) in EAP to describe connections between Actor and UC. Actor is connected to UC-ag (if it is necessary to better understanding this process), and UC-ag to UC-s (Generalization with sets Generalization Set).
I found value of name this Generalization Set in structure of table (t_connector.Btm_Mid_Label) but where it is in object structure? It is parametr of connector but where is this definition?
Title: Re: Where is Generalization Set for Connector
Post by: qwerty on February 06, 2014, 08:52:11 pm
The mid label is defined to display the name of the connector (EaConnector.Name). You can change that via a shape script.

q.
Title: Re: Where is Generalization Set for Connector
Post by: KP on February 07, 2014, 09:00:16 am
The Generalization Set info will be somewhere in the t_xref table.
Title: Re: Where is Generalization Set for Connector
Post by: PiotrS on February 08, 2014, 02:12:34 am
thank you, do you know where it is in API?
Title: Re: Where is Generalization Set for Connector
Post by: PiotrS on February 10, 2014, 11:07:50 pm
to qwerty: EaConnector.Name it is different parameter of connector, I checked it earlier. If value both of them (EaConnector.Name and Generalization Set) are set, connector has two labels in the middle on diagram (if they set on visible).
The Generalization Set info is in the t_xref table (a part of value from t_xref.Description with t_xref.Behavior set on "generalizationSet"). Easer way is read only t_connector.Btm_Mid_Label for this connector.
Thanks for help
Title: Re: Where is Generalization Set for Connector
Post by: qwerty on February 10, 2014, 11:48:49 pm
Quote
to qwerty: EaConnector.Name it is different parameter of connector, I checked it earlier. If value both of them (EaConnector.Name and Generalization Set) are set, connector has two labels in the middle on diagram (if they set on visible).
The Generalization Set info is in the t_xref table (a part of value from t_xref.Description with t_xref.Behavior set on "generalizationSet"). Easer way is read only t_connector.Btm_Mid_Label for this connector.
Thanks for help

Thanks for the update. I'll try to incorporate that in my next release of the Inside book.

q.
Title: Re: Where is Generalization Set for Connector
Post by: PiotrS on February 11, 2014, 12:12:40 am
Quote
Quote
to qwerty: EaConnector.Name it is different parameter of connector, I checked it earlier. If value both of them (EaConnector.Name and Generalization Set) are set, connector has two labels in the middle on diagram (if they set on visible).
The Generalization Set info is in the t_xref table (a part of value from t_xref.Description with t_xref.Behavior set on "generalizationSet"). Easer way is read only t_connector.Btm_Mid_Label for this connector.
Thanks for help

Thanks for the update. I'll try to incorporate that in my next release of the Inside book.

q.

Please checked it before updating :)
t_xref.Description contains same of parameters, in this case are important subvalue with GUID and Name. I think that it is good way too, but in my project, by experience, t_connector.Btm_Mid_Label has the same value for this connector and it is easer way.
Title: Re: Where is Generalization Set for Connector
Post by: qwerty on February 11, 2014, 12:51:38 am
Sure :-) I usually verify that kind of information before publishing it. Thanks anyway!

q.