Monthly Archives: September 2014

Accessing your favourite tool from within EA

I’m not sure if this is just me, but there are a few things that frustrate me when working within a tool such as EA.

  1. Firstly, there is often more information I want to view at the same time than is possible because I just don’t have enough screens! There is a potential solution to this.
  2. Secondly, is when I want to do a related task using a different tool, so need to switch context. This is frustrating especially when I have my head down producing stuff and I just want to press a button.  This may be unique to me but the need to switch to another tool, which is more about the need to go back to windows and select the program, open it and establish context etc

So is there a way to improve the situation by having the tools I want operate within the context of EA?  Let’s do a little exploration to check out what EA provides and see if it can help me.

1. EA Tool menu

First up, in looking at the tools menu there are shortcuts which start an external application, albeit in it’s own window but at least it is just a single click.

I think the standard installation comes pre-configured with a few tools:

  • MS Paint
  • ODBC sources
  • System information

And you can add any application to the EA tools menu.

EA tool menu - add your own tool

EA tool menu – add your own tool

To add an application you use the “Tools | Customize | Tools tab” to configure the application. You need to provide:

  • A command – the application you want to run
  • Arguments – and EA supplies a range of parameters that can be set and passed to the external application
  • Initial directory – this can be set but doesn’t appear to have any dynamic options.

As an example I use IrfanView for doing a lot of image manipulations. So I can add a new tool item to support my access to this tool within my working context.

Configure EA tool menu item to open IrfanView with clipboard

Configure EA tool menu item to open IrfanView with clipboard

You see I have set the application, however there are no parameters available from EA that make sense within the context of the IrfanView arguments. However, the reason I want to open IrfanView from within EA is usually to manipulate an image, hence if I assume that I have saved my desired image to the clipboard with EA (ctrl+B) and then add an IfranView argument “/clippaste” it will open with the current clipboard contents all ready for editing.

Although this is no major advance it does improve productivity when producing help documentation!

2. Using the EA parameters

So what applications could benefit from the arguments that are available from EA.  I needed to think about this as it wasn’t clear what applications other than something specifically written to work with EA would attribute meaning to the arguments – initial and final thought was that this is only useful for applications you write.  I am sure there are some really good examples, however none come to mind so I’ll just illustrate a simple application to demonstrate the use.

Below is the code for a simple console application which takes EA arguments, opens an instance of EA with the project file name provided and prints the name of the current package.

==== Code starts =====

class Program
{
public static void Main(string[] args)
{
// the arguments from EA will be the project name – which may have spaces so need to be wrapped in “‘s
//
// command line input
// arg 1 – EA project full path filename ($f)
// arg 2 – name of calling application ($F)
// arg 3 – current package ID ($p)
// arg 4 – current package GUID ($P)
// arg 5 – ID of associated diagram  ($d)
// arg 6 – GUID for associated diagram ($D)
// arg 7 – CSV of ID’s for all selected elements in current diagram ($e)
// arg 8 – CSV of GUID’s for all selected elements in current diagram ($E)

Console.WriteLine(“Number of command line parameters = {0}”, args.Length);
foreach( string a in args)
{
Console.WriteLine(a);
}
//            Console.Write(“Press any key to continue . . . “);
//            Console.ReadKey(true);

// open EA

Console.WriteLine(“\r\nProject file = ” + args[0]);
Console.WriteLine(“Openning EA, please be patient!”);
EA.Repository EAR = new EA.RepositoryClass();
EAR.OpenFile(args[0]); // open EA

// now just use one of the arguments to do some processing
int packID = Convert.ToInt32(args[2]);
if (packID != 0)
{
Console.WriteLine(“Package ID = {0}”, packID);
EA.Package p = EAR.GetPackageByID(packID);
Console.WriteLine(“Name of current package = {0}”, p.Name);
}
Console.Write(“Press any key to continue and close EA “);
Console.ReadKey(true);
EAR.CloseFile();
}

===== code ends =====

So with the application written I use the EA customise to add my application to the tools menu.

EA Console Tool - example of an application that can handle EA arguments

EA Console Tool – example of an application that can handle EA arguments

And when run from my tools menu the output is as shown below.

Example output from the EA Console Tool test application

Example output from the EA Console Tool test application

As such this is an example that doesn’t do a lot other than illustrated that the mechanism works.  It is possible to call an external application and pass it information within the current user context – I repeat the current user context – as this is where the value will come.

A brief recap

In looking at accessing external tools I have reviewed how to existing tools as well as a custom tool.

In the case of the existing 3rd party tools, unless they are written specifically for EA, it is unlikely they can do much, although the ability to open my graphics application with the clipboard presented is really useful, and I am sure with some creativity there are some excellent use cases.

In the case that we have a custom application then we have a greater degree of freedom limited only by the application.  It provides the user with the ability to initiate some action within their current context.  I know I need to think about potentially other applications for this use case.

 

But can we bring our application closer?

In both these instances the access to out application is a manual process.  The user initiates the application.

In our custom application example we saw how the information provided to open a new instance of EA can be used to perform some operations.  Of course, our application could be used stand alone, i.e. without being called by EA, but in that instance we wouldn’t have the contextual information which was my starting point.

One downside is that our application runs as a separate entity and to access EA requires us to create a new instance, with the inherent start up time lag.  So is there a better way of adding functionality to EA as well as integrating with 3rd party tools.  The simple answer is yes – EA provides an AddIn framework which can address the shortfalls of working at “arms length” and I’ll come back to that in a future post.

In the meantime, I hope that this post has been interesting and at least made you think about how you use other tools with EA.  If you have any specific use cases that haven’t been covered please feel free to share your requests, ideas..

Thanks

Adrian

Advertisements

TeamPulse agile project management

Are you using Teleriks TeamPulse agile project management tool and EA?

Well, until recently I wasn’t aware of TeamPulse and I am sure there are many more tools out there that I’ve never heard of (and could benefit from!!).  It was through a request for help that I became aware of TeamPulse. As a server based system ,TeamPulse provides the features that a project manager needs to manage the full scope of any agile project.

The initial requirement from the user was for a means to seed their TeamPulse project with information derived from their initial analysis of a project which they performed in EA.

Although this could be done manually,  and if this were a one-off then why do anything else?! However, when the full scope of this simple requirement is considered, the need for automation is obvious.  For instance, you may wish to:

  • output single items and/or whole package trees – so this could end up being a lot of information
  • output linked items, so the output of a single item may result in the export of many items – even more information and what’s more, the need to verify all the relationships are handled; this can be a bit of an auditing minefield if done manually!!
  • output attachments as well as linked diagrams – in what format etc
  • perform subsequent exports adding new items whilst only making updates to items that have previously been exported and avoid duplication

All whilst:

  • avoiding potentially time consuming manual process

and

  • minimising the risk of making errors in the process.

Having produced quite a few EA AddIns the export of information is usually not a problem provided there is a well documented API.  And, if there is a requirement to maintain future relationship or awareness of EA elements, a place to store information (usually the EA GUID) in the target tool.  With the excellent support received from Telerik I was able to gain access to the relevant information to address these issues, and when there were questions regarding some of the detail very help support.

TeamPulse:

  • provides a suitable REST based API, and we were able to wrap this in a API that provided all the functionality we needed within our AddIn
  • supports additional custom fields to be added to its workitems and we were able to use this to store the GUID of our related EA element. This meant we could match EA elements with TeamPulse items.

So with the relevant capabilities in place we have been able to produce an EA AddIn (eaTP) that addresses the basic use case to support the export of information from EA to TeamPulse throughout the life of the project.

Export options

Example of eaTP export options

This means that EA users can continue to do their work in EA, whilst providing the project manager with the information they need to perform their tasks. And although the focus of eaTP is very much on exporting the information into TeamPulse, it also provides a means to inspect individual TeamPulse items within EA so the EA user can have a quick look at information that may be relevant to their work.

Work item information

Example work item information as seen in EA

So if you are a TeamPulse user (or looking for a project management system to work alongside EA then perhaps TeamPulse is a tool to review) and using EA you may wish to try eaTP.  If why not give eaTP a try and importantly provide us with feedback on its functionality and usefulness.

For  more information on eaTP click here

I’m off back to do some more exploring of EA – but just want to point out that there was a really interesting webinar this morning from Sparx on “Creating Charts in Enterprise Architect to Aid Decision Making ” – if you missed this event keep an eye out on the webinar section of Sparx as I’m sure they will make it available soon.

Adrian

Launch of eaForms @ EA Workplace

When I looked at my last post I was surprised that it was so long ago – time flies.  During the summer months I’ve been focused on some very important topics:

  1. Finishing off our eaForms product, getting it ready for users and ensuring that there was a place from which users could buy it (see later)
  2. The wedding of my youngest daughter, whose grand plan involved me in making lots of stuff – all great fun but once again time consuming

Plus having a few days off over what was a very successful summer.

So with that done I’m pleased to let you know that eaForms has been launched and is ready for download from EA Workplace

I’m using EA Workplace to do the stuff that I don’t have the time, energies or skills to do myself. The guys behind EA Workplace (Ability Engineering) have a lot of experience with EA and producing their own EA related products.  And in their own words they saw the need for a “one-stop shop for all Sparx Enterprise Architect tools, services and talent” and in doing this provide a marketplace for products such as my eaForms AddIn.

Whether a developer or user it’s probably worth checking out their site both to find out more about my products, such as eaForms, as well as the other resources they list.

So with eaForms launch – what next?

Well I hope many of you visit EA Workplace and download eaForms, have a play, and even if you don’t purchase, provide us with feedback. As with all products it starts from an idea which a few people discuss, requirements are defined and a product developed.  Users then have a look and decide that it looks interesting but it doesn’t quite do what they need – well if that’s you please make sure you tell us; you never know what features we might add.

We’ve got some ideas for more features and related products but there is nothing like hearing from you, not least as I’ve no firm plans yet.

Other developments

I’ve also been developing some other AddIns which I plan on making available as early access products – keep an eye on our Early Access Site where we provide information and links through to product sites as they develop.  For example:

  • eaTP ( EA To Teampulse)
  • eaProject (EA and MS project)

Hopefully with not too many other distractions these should both appear during September, but don’t hold me to that!

So off to get some of this done and don’t forget to check out EA workplace

Adrian