Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MatthiasVDE on January 17, 2020, 12:21:57 am
-
The Enterprise Architect Add-In Model knows three types of events, but what's the big difference between those three types?
-
Nothing really.
They are grouped in a somewhat functional way.
Geert
-
Hi Matthias,
You missed one type there: MDG Events. :)
In terms of responding to these events there's no difference betwen them, but you have to set up your Add-In a little differently for some of them and they are handled differently by EA.
- Add-In Events are received by all Add-Ins.
- Broadcast Events are received by the Add-Ins that implement them. EA queries the Add-In DLL to find out which events are relevant, you don't need to do anything in code.
- MDG Events are received by those Add-Ins which register themselves as "MDG" Add-Ins in their response to EA_Connect().
- Workflow Events, similarly, are received by those which register as "Workflow" Add-Ins in EA_Connect().
So you have to explicitly register to receive MDG and Workflow events, you get Broadcast events because you choose to implement certain interfaces, and the Add-In events you just get.
Don't know why Sparx has chosen to use two different ways of deciding which events to send to which Add-Ins (DLL inspection on the one hand and registration on the other), but hey -- koncistensy.
HTH,
/Uffe
PS I haven't actually investigated any of this, it's just what I've read in the API documentation which might be complete rubbish.
Wouldn't want to be accused of making blanket statements.
-
Don't know why Sparx has chosen to use two different ways of deciding which events to send to which Add-Ins (DLL inspection on the one hand and registration on the other), but hey -- koncistensy.
Not sure that there are two different ways of determining things. An add-in can request one of two sets of extra broadcasts, but EA checks that it exists before calling any add-in function.
-
Thanks for the explanation!