Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Responding to Events

In order for your model add-in to respond to events, you must define Receptions on the add-in class, corresponding to the signals (or events) that you wish to handle.  You can then define handler code, using Javascript, for each of the defined Receptions.

You can also define additional functions as Operations on the class, again using Javascript.  These functions can then be called from the Reception handler code.

Define Receptions



See also


Select a JavascriptAddin on a diagram.


From the ribbon, select the option "Design > Element > Behavior".

The 'Behavior' code editor window is displayed.


Ensure that the Structure Tree is visible.

Click on the icon to toggle display of the Structure Tree.


Right-click on the class at the top of the Structure Tree.

Choose the option 'Add Reception'.  The 'Select Signal' dialog is displayed

Select Dialog


Navigate to where you imported the Signal Reference Library - select the Signal for which you want to add a Reception.

Click on OK.

Signal Reference Library


In the right hand panel, enter Javascript code to define the required behavior.

Editing Source Code


Repeat steps 4 through 6 for any other signals that you wish to handle.

Learn more