Book a Demo

Author Topic: Batch generation of HTML Reports  (Read 4358 times)

John Allen

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Batch generation of HTML Reports
« on: February 29, 2008, 11:58:39 pm »
Dear All,

We wish to be able to generate our HTML Reports at night via a batch process. Ideally this would be possible from the XMI we have stored in Subversion but we could try and use the EA files if not. Does anyone know a way we can do this? Does EA have a CLI or batch invocable scripting interface that will could use for this?

Kind regards,

John

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Batch generation of HTML Reports
« Reply #1 on: March 01, 2008, 12:07:48 am »
Hi John,

Off hand I don't know, but I've not heard of such a thing.

But there are some API calls you could use. The things you want are methods of the Project Interface. There are methods that allow you to export a package tree to XMI - in case you run your reports with an external tool - or to run RTF and HTML reports.

In the case of the HTML reports, the method allows you to specify the package, destination path, image format, style and file extension (these last two are the same as the options on the HTML report dialog).

So, you could write an (external) automation project that does the necessary wizardry. Then just use whatever scripting you'd normally use to run a timed job, invoke your program, and have it read a list of projects and packages, generating reports accordingly.

HTH, David
No, you can't have it!

John Allen

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Batch generation of HTML Reports
« Reply #2 on: March 01, 2008, 12:14:42 am »
So in summary: there is an API that we can code to that provides an interface for this kind functionality and all we need to do is knock up the program and fork it from whatever execution environment we like? Fantastic, thanks David! Now all i need to do is read the manual :)

Kind regards,
John

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Batch generation of HTML Reports
« Reply #3 on: March 01, 2008, 12:22:50 am »
Sure John,

Last I looked - and it has been a while - it was 1600+ pages and counting.

Read it at night. It cures insomnia.   ;)

My advice is to write the program first, then read the manual. That way you can have your nightly reports this year.

David
No, you can't have it!

John Allen

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Batch generation of HTML Reports
« Reply #4 on: March 01, 2008, 12:55:12 am »
Ahh you mean employ the 'if it looks like an eject button it better bloody eject something' approach to engineering. I wouldn't dream of doing anything else:) Saying that though i am now wandering round here http://www.sparxsystems.com/resources/developers where this jumped out at me "The Automation Interface is a means to extending the capabilities of EA using Windows OLE Automation (ActiveX). Sparx gets you started with examples in C# and VB 6.0 and Delphi ." So no multi-platform interps supported for this kind of integration, i'll need to be win32 based?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Batch generation of HTML Reports
« Reply #5 on: March 01, 2008, 01:17:58 am »
Well, sort of...

The API also has a primary interop assembly for .Net integration. This works very well.

There is a Java API, though this is fairly new, and still suffering growing pains (though it has improved considerably in recent months). The Java interface is done through a third-part bridge application.

Since EA is a Windows-based application, you are not in bad shape. Just ensure that your automation application is also installed where the EA executable that you are triggering (or will be triggering) lives. You should be alright at that point.

David
No, you can't have it!