Search here...
< All Topics

EA Custom Reports

EA Custom Reports

Would you laugh if we said any architecture or model information that you require from Enterprise Architect models is just a click away?

What if

  1. you can get a list of related business services when viewing the details of business capability?
  2. you can get a list of related applications that are in production when viewing the details of business activity?
  3. you can get a list of servers that are utilized by an application?
  4. you can get a list of requirements when viewing the details of an use-case?

Prerequisites

  1. Modeling Language/MDG XML file uploaded to Prolaborate
  2. Capability to copy and paste a SQL query and change the Where conditions

How it works?

Let’s take the example of use-case and requirements and see how it can be done.

To re-iterate, the goal is to let users see a specific list of requirements that are connected to a use-case on a click.

This is the normal view before adding the custom report:

Follow the steps to define the custom query:

  1. Prepare your query using SQL Scratch Pad in Enterprise Architect
    Here is the query which we are going to use for our example:
SELECT distinct incomingObject.name as SourceName,
outgoingObject.name, outgoingObject.ea_guid,
outgoingObject.object_type as basetype,
outgoingObject.stereotype
FROM t_object as tobject
LEFT JOIN t_connector connector on ( (connector.start_object_id = tobject.object_id) or
(connector.end_object_id = tobject.object_id ))
LEFT JOIN t_object as incomingObject on (incomingObject.object_id = connector.start_object_id and
tobject.object_id != connector.start_object_id)
LEFT JOIN t_object as outgoingObject on (outgoingObject.object_id = connector.end_object_id and
tobject.object_id != connector.end_object_id)
WHERE
tobject.ea_guid = '' AND
outgoingObject.object_type IN ('Requirement')

  • Name alias, GUID, Type, and Stereotype should be mandatorily part of the SELECT statement
  •  The field that is marked with Alias as Name will be shown in the report
  •  <guid> should be mandatorily added to WHERE condition

2. Test the query by replacing with an actual GUID like below:

The results are showing up and so, we know the query works fine.

3. Open Prolaborate

4. Click Menu > Modeling Languages

5. Click Manage Custom Attributes

6. Click Add and select EA Custom Attribute

7. Give a Name, select Query, and paste the query (Ensure the actual GUID is replaced with <guid>)

8. Save

important Note: As of now, Custom Attributes cannot be edited once added and so, please click on Save only after validating the query properly.

Follow these steps to add the newly created query attribute to an object:

  1. Identify the Stereotype. In this case, it is UML – UseCase. UML is the modeling language and UseCase is the Type/Stereotype
  2. Click Menu > Modeling Languages
  3. Click Manage Profiles against UML

4. Edit the Profile that is in use now

5. Open Form Designer of UseCase

6. Click on Custom Attributes on the right (Last tab)

7. Drag and drop the newly created attribute to the form

8. Click Save

9. Click Update Profile

Now, open any use-case to see the list of requirements.

You can click on any of the requirements to get more details.

In the same way, you can create reports to get

  • a list of related business services when viewing the details of business capability
  • a list of related applications that are in production when viewing the details of business activity
  • a list of servers that are utilized by an application, etc.,

We are just limited by our creativity!

sparxsystems-logo-inverted

Start Here
Book a Demo