Displaying items by tag: javascript

One of the latest features of Sparx Enterprise Architect 15 is the model based add-ins which can be created using JavaScript.  These model based add-ins are defined by a combination of Receptions, Attributes and Operations which can be easily added in a model by just creating with a valid stereotyped classes.

Assuming having basic knowledge with Sparx Traditional add-ins, broadcast events and JavaScript.

Why model based add-ins

    • Accessed by all the users within a model
    • Purely Model specific 
    • No installation, registry entries , distribution or license worries
    • Self-Documenting as everything is modelled and created directly in EA

Prerequisites

    • Signal Reference Library ( Broadcast Events ) -  Defines the entry points to the add-In similar to the com class in the traditional add-ins
    • Referencing relevant signals in the receptions

What is Signal Reference Library

These are Signal elements which contain definitions of all the Enterprise architect broadcast events. Signals that are added to the add-in will receive an event when triggered similar to traditional add-ins. EAExample model contains all the broadcast event signals under the package Example Model.EA 15 Examples.Dynamic Model Based Add-Ins.Broadcast Types

Mandatory Signals or Events for Add-in

    • EA_Connect
    • EA_GetMenuItems
    • EA_MenuClick

All the available events references can be found here https://www.sparxsystems.com/enterprise_architect_user_guide/15.0/automation/broadcastevents.html

To Create an JavaScript Add-In

  1. Create a Signal Reference Library referring EAExample model. (Simple way would be just do an XMI export of the Broadcast Types package from EA model and import into your working model).
  2. Create a package in the root node for modelling the add-in
    1

    1. Create a class object with stereotype JavascriptAddin ( this stereotyped element can be found in Model Add-Ins tool box as shown below
      2
    1. The name of the above defined will be used in the JavaScript code. In our case it will be “Javascript Addin”
    2. Add the signal reference in the created class using the reception.
      • To Access Reception Right-click on the Class element and select the 'Features | Receptions' option. The Features window displays, at the 'Receptions' page.
        2.1
      • Add the required events by clicking the button to the right of the New Receptiontext in the 'Name' column , the dialog will show the available Signals ( it will automatically fetch the parameters details from the object )
        3
    • Once selected all the added signals will be displayed in the class object.
      4
    1. After adding these events, its time to play with some JavaScript codes.
    2. Please open the behavior window (Develop > Source Code > Behavior) make sure the created class object “Javascript Addin” has been selected. It will show all the added events to which we need to add the code
      5
    1. Codes for these events are similar to the traditional add-ins ( please refer the attached model for more details )
    1. Finally make sure the add-in is enabled. To enable the add-in Specialize -> Manage-Addin and please click Load on startup
      6
    1. Once the add-in is loaded you can find it in the ribbon
      7

    Note:

    For more details or customization please contact This email address is being protected from spambots. You need JavaScript enabled to view it.

Published in White Papers
Saturday, 31 January 2015 07:59

EA-Matic a new add-in by Geert Bellekens

EA-Matic

EA-MaticLogo64

EA-Matic is an add-in for Sparx Enterprise Architect that enables rapid EA add-in development.

It uses the built-in scripting features of EA to relieve you of developing, building and deploying full-blown EA add-ins.
Aimed at corporate environments it greatly reduces the time to introduce new functionality.

With EA-Matic you can develop your EA add-in using nothing but EA, and deploy changes instantly to all model users.

The possibilities are endless. You can validate your own modelling rules, keep your model consistent by preventing the deletion of elements that are still used, add your own context menus, or make self-maintaining diagrams. The only limits are those of your imagination.

The table below shows how add-in development with EA-Matic differs from classic add-in development.

  EA-Matic Classic add-in development
Required tools Only EA Visual Studio, Sharpdevelop, or equivalent IDE
Installation of a new version Instantly available for all users without the need to install anything again on the workstations. Msi-deployment on all workstations
Languages VBScript, JScript, JavaScript VB, C#
Security access on development machine Normal user rights are enough. Local Administrator rights required.

Try and buy

Download EA-Matic and try it for free for 30 days   Buy EA-Matic from EAWorkplace

Download EA-Matic and try it for free for 30 days.

The evaluation version can be activated as full licensed version by entering a valid license key. No need to download and install another version.

EA-Matic is distributed through EAWorkplace. You should be registered and logged in to EAWorkplace in order to download or purchase.

Quantity Per seat Floating
1 – 4 € 50 € 70
5 – 19 € 46 € 63
20 – 100 € 42 € 60
100 + € 39 € 56

 

EA-Matic should be installed on all workstations that use EA, so you should have the same number of EA-Matic licenses as you have EA licenses.

Prerequisites

Examples

Usage

This one minute video will show how easy it is to create a new add-in for EA using EA-Matic

 
 

More info
 

More information can can be found on the authors website: http://bellekens.com/ea-matic/

 

Published in News
Wednesday, 24 April 2013 05:25

State Machine Simulation in Enterprise Architect

This paper introduces Enterprise Architect's simulation capabilities for State Machines by means of an example model.

State Machine simulation can help you to verify that the run-time behavior of your designed system conforms to specification. In this paper, we explore an example 'Digital Clock' system model and bring to life several aspects of Enterprise Architect's State Machine simulation support.

Published in White Papers