Book a Demo

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

Prev Next

Writing a Custom Integration Plugin

We live in a highly connected world, and while there is a formidable list of out-of-the-box integrations provided with the Pro Cloud Server, custom (proprietary) integrations can be created with any product that has a standard web service interface.  This facility will both open up the contents of the Enterprise Architect repository to an external tool and make the information in the external tool available within Enterprise Architect. For example, a Project Management tool might define work pages that would be useful to visualize in Enterprise Architect, or an automated testing tool could define test cases and test procedures that could be related to implementation and specification elements in Enterprise Architect. This will require some technical expertise to create an integration using one of a number of programming languages such as C++ or C# , but this only needs to be done once and can be used across any number of repositories.

The Pro Cloud Server and Enterprise Architect will do the heavy lifting, and there is no need for an administrator to change any of the base security settings for the Pro Cloud Server as the new integration will operate through the existing Ports and firewalls. There is also no need for the developer to write http listening code, allowing them to focus on determining and configuring the RESTful API calls to pass the external items' information into and out of the server.

When installing the Pro Cloud Server, enable the 'SBPI Examples' component to include the custom integration examples. When enabled, the default location for the example files is within the 'SBPI Examples\ExampleIntegrationPlugins' folder. For example:

C:\Program Files (x86)\Sparx Systems\Pro Cloud Server\SBPI Examples\ExampleIntegrationPlugins

See the Pro Cloud Server Installation Help topic for more information.

Note, the 'SBPI Examples' installation option is not enabled by default. If you have already installed the Pro Cloud Server without the 'SBPI Examples', you can either perform a full re-install (enabling the 'SBPI Examples'), or use the installer's 'Change' option to add just the 'SBPI Examples' component.

To write your own Custom Integration Plug-in you can either start from scratch or make a copy of one of the examples and modify it. The Plug-ins can be written in either C++ or C#.

The examples are written using Visual Studio 2017 but this is not a pre-requisite.

The Custom Integration Plug-in must implement the interface defined in the ISBPIIntegrationPlugin, which is included in ISBPIIntegrationPlugin.h (for C++) or ISBPIIntegrationPlugin.cs (for C#).

The general flow of the program is:

  • The user performs an action within Enterprise Architect that needs information from the Integration Plug-in
  • The Plug-in will receive a call (or multiple calls) to the appropriate interface method
  • The Plug-in parses the request and, if required, makes its own request to the actual data provider
  • The Plug-in receives the result from the actual provider, and parses the data
  • The Plug-in sends the response to Enterprise Architect via the provided callback functions; this can either be the actual data requested or an error value
  • Enterprise Architect receives the callback data and displays it to the user

Function/Class

Details

See also

CheckVersion

(Not required in C#.)

input: unsigned int version

Returns true if your Plug-in supports the requested version.

Version 2 adds notifications when elements in Enterprise Architect are linked or unlinked to the external item, or when they are modified.

Version 2 extends version 1, so returns true for versions up to and including the version supported.

e.g. return (version <= 2);

Create Plug-in

(Not required in C#.)

The Plug-in must implement this export function:

     extern "C" SBPI_API SBPI_INTEGRATION_PLUGIN CreatePlugin();

It must return a pointer to a class that implements the ISBPIIntegrationPlugin interface. The recommended implementation is:

     SBPI_INTEGRATION_PLUGIN CreatePlugin()

     {

           return new ExampleIntegrationPlugin;

     }

The newly created ISBPIIntegrationPlugin can be deleted when it receives the ISBPIIntegrationPlugin::Release method.

ISBPIIntegrationPlugin Interface

The dll Plug-in must implement all methods in the ISBPIIntegrationPlugin interface.

ISBPIIntegrationPlugin interface