Book a Demo

Author Topic: What options do I have for showing tabular information based on UML?  (Read 5414 times)

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Is it possible to somehow generate tables based on UML elements?

For example, suppose I wanted to list a column with a method name, followed by columns of interface attributes. In the cells for the interfaces, I want to see a particular value from a scenario.

For those who want to see an example table, I am trying to produce a document from my model that resembles the following from the Framework for Integrated Test http://fit.c2.com.

I know how to generate reports in EA and be selective on information, it's really about trying to output things like the cell showing specific values. Because UML is graphical in nature, I need some way of specifying values.
« Last Edit: November 19, 2020, 08:13:17 pm by mse »

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: What options do I have for showing tabular information based on UML?
« Reply #1 on: November 19, 2020, 07:36:59 pm »
Hello,


The problem with EA's document generation facilities wrt tables is that there is no dynamicity in the columns. It's easy to create a template with a table where the number of rows is determined during document generation, but the set of columns is fixed in each template.

But anything's possible. I have created column-dynamic tables in the past; it's not pretty but it can be done.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

Ian Mitchell

  • EA User
  • **
  • Posts: 507
  • Karma: +22/-4
  • The eaDocX and Model Expert guy
    • View Profile
Re: What options do I have for showing tabular information based on UML?
« Reply #2 on: November 20, 2020, 01:30:32 am »
You can open a set of elements for read & write with eaDocX/eaXL as an Excel spreadsheet. It allows for adding of new columns (as tagged values), adding new rows (new elements) and (with care) deletion of rows. Is that what you're looking for ?
Ian Mitchell, Designer, eaDocX


www.eaDocX.com
www.theartfulmodeller.com

mse

  • EA User
  • **
  • Posts: 308
  • Karma: +1/-0
    • View Profile
Re: What options do I have for showing tabular information based on UML?
« Reply #3 on: November 20, 2020, 07:44:45 pm »
If this will help me achieve the results shown at http://fit.c2.com., then yes. However, the dynamicity of columns is a key aspect here. the most basic use case I have here is hte following:

I have an interface model element "iSpeed" with one attribute "displayedSpeed". I would like to show a table that shows all the conditions under which the attribute "displayedSpeed" can change. All this has to work based on UML elements such as <<interface>>, attributes, and somehow showing the value assignment, this is still unclear to me.

I have thought about modeling it with an activity diagram and getting a table from it, but the document generator I think will just output all the nodes of the activity diagram but not in some coherent way like you see in that FIT example.

EventinputSpeeddisplayedSpeed
UpdateSpeed() > MAX_SPEEDMAX_SPEED
UpdateSpeed()<= MAX_SPEEDinputSpeed

In the table above, UpdateSpeed() corresponds to some method of a class, inputSpeed is an attribute of some <<interface>> classifier, displayedSpeed is also an <<interface>> attribute. The constants MAX_SPEED is some defined constant in some DataType or enumeration classifier. The logical operators could be an activity diagram decision node perhaps.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What options do I have for showing tabular information based on UML?
« Reply #4 on: November 20, 2020, 08:28:55 pm »
If the number and names of the columns are not constant you probably need to resort to some kind of scripting solution.

I've done a few of those when exporting info to Excel.
You could also something similar to export to a table in an RTF template, but I don't think that will be easy at all.

I believe you would need a "Document script" template. The code in your script then needs to return the raw RTF code for your table.
Often this is not worth the effort though.

I usually try to persuade the client to go for a more different visalisation of the data, that is easier captured in a table with fixed columns.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: What options do I have for showing tabular information based on UML?
« Reply #5 on: November 20, 2020, 09:04:52 pm »
If the number and names of the columns are not constant you probably need to resort to some kind of scripting solution.
...
I believe you would need a "Document script" template. The code in your script then needs to return the raw RTF code for your table.

Not necessarily. If you can define the maximum number of columns, you can create a template for each number up to the max and then select the appropriate one in the script. With this approach there's no need for RTF injection, you can just use regular templates.
And you can usually define the maximum number of columns because ultimately they still need to fit on a page. It's never a thousand.

Quote
Often this is not worth the effort though.
Agreed. Sometimes, but not often.


/U
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: What options do I have for showing tabular information based on UML?
« Reply #6 on: November 20, 2020, 09:48:50 pm »
Not necessarily. If you can define the maximum number of columns, you can create a template for each number up to the max and then select the appropriate one in the script. With this approach there's no need for RTF injection, you can just use regular templates.
And you can usually define the maximum number of columns because ultimately they still need to fit on a page. It's never a thousand.
Ah, that's a clever workaround indeed. :)

Geert