Automating Tasks Associated with Sparx EA

Are you someone who is using Sparx EA as the tool to manage your (Enterprise) IT landscape – strategy, vision, requirements, process models, data models, etc.? As someone who has been using Sparx EA quite extensively, I believe that capturing details that target different stakeholders is only one part of the story. It is equally important that the same details is made accessible and readily available to all within your enterprise (domain).

There is a license cost for Sparx EA and hence, it is impossible to install the tool on every workstation. An alternative approach would be to export the project (.eap) as HTML pages to a shared network location or even publish the exported HTML pages to a SharePoint site. This can be done manually using Sparx EA IDE (and SharePoint) but can be quite painful when you have to repeat it every day or week. With the availability of automation interface, the same tasks can be fully automated.

In my work, I found myself performing the following tasks quite often:

  • Taking backups of the project (.eap) (since I use relational database as the project repository)
  • Publishing the project as HTML pages to a shared network location
  • Uploading the published HTML pages to a SharePoint site so that all stakeholders within the enterprise can access the information

Using .NET Core and the automation interface provided by Sparx, I was able to create a console application that automated the above tasks successfully. The entire source code can found in my github repo, feel free to clone or download the repo and use it. Make sure to refer the for instructions on how to configure the application.

Once you have successfully configured the application and when you run it, you should see something similar to the image below:

console application

You can now proceed to create a new task in Windows Task Scheduler so that the application runs daily without any user intervention. I have been running the application for a few months without any problems. However, if you find any issues or has the need to modify the code to fit your requirements, please feel free to contribute.

Leave a Reply