Author Topic: 'Sorting' Archimate concepts  (Read 428 times)

JanC

  • Member
  • **
  • Posts: 13
'Sorting' Archimate concepts
« on: August 21, 2019, 07:32:47 AM »
Working on reports presenting my ArchiMate models to a wider audience I am playing with Jasper including some custome templates and a few extensions to the Archi Jasper Export functionality. I have achieved my first goal ... being able to group the elements and all their documentation and properties of a view per type (Business Objects with Business Objects, Application Components with Application Components). Looking at the result I realize that I really thing that grouping per layer (Strategy, Business, Application, …) plus Relations would suite best to most users. The reason for this post is - do others see this as a valuable feature (not only using Jasper, but any kind of documentation per view) and where to start? My initial thoughts are to extend the IArchimateConcept with a Layer property (though the name does not match really well for 'relations') and expose this property like 'Name' and 'Type'. I than would be able to sort and group by 'Layer' first - placing the Strategy elements first.

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1500
  • Archi Guy
    • Archi
Re: 'Sorting' Archimate concepts
« Reply #1 on: August 21, 2019, 09:11:13 AM »
Edit - I think you mean that you would like the elements to be grouped per type. Will investigate...
« Last Edit: August 21, 2019, 09:23:10 AM by Phil Beauvoir »
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

JanC

  • Member
  • **
  • Posts: 13
Re: 'Sorting' Archimate concepts
« Reply #2 on: August 21, 2019, 09:25:01 AM »
Phil,

I may have overlooked something. I had not (yet) seen the IBusinessObject. Thanks for the tip. I will give it a try … and once working share the code (and Jasper template). To be continued … .

Phil Beauvoir

  • Archi Guy
  • Hero Member
  • *****
  • Posts: 1500
  • Archi Guy
    • Archi
Re: 'Sorting' Archimate concepts
« Reply #3 on: August 21, 2019, 11:11:22 AM »
Jan, are you saying you want to access the elements by layer or type?

At the moment you can access elements by layer. For example:

Code: [Select]
<dataSourceExpression><![CDATA[((com.archimatetool.jasperreports.data.ArchimateModelDataSource)$P{REPORT_DATA_SOURCE}).getElementsDataSource("business")]]></dataSourceExpression>

See https://github.com/archimatetool/archi/blob/master/com.archimatetool.jasperreports/src/com/archimatetool/jasperreports/data/ElementsDataSource.java

At the code level each concept has a Java Interface that indicates its layer, and type.

See https://github.com/archimatetool/archi/tree/master/com.archimatetool.model/src/com/archimatetool/model
« Last Edit: August 21, 2019, 11:29:46 AM by Phil Beauvoir »
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

JanC

  • Member
  • **
  • Posts: 13
Re: 'Sorting' Archimate concepts
« Reply #4 on: August 21, 2019, 13:55:48 PM »

Interesting hint - I was going down the 'Group' route in Jasper.


The 'Group' route is based on fields. Thus grouping by layers would require to expose a new 'layer' field to group on. Using your suggestion instead I would need to make 7 or so Jasper bands for each layer saving me to write Java code to het a new 'layer' field exposed. I probably still need to do something as I was working on a per view basis - starting thus with the ViewChildrenDataSource instead.


I did already do some work there to group per type, using the type field (with sorting in the Archi - Jasper datasources instead of the <sortField> instruction as highlighted in the other post. The result though places the different types in alphabetical order, for example Association Relations, Application Components, Artifacts, … so a kind of a mix up from the layer perspective.


Maybe an example will help to illustrate what I want (and where I am) . Assume an ArchiMate model with 2 Views.

View 1

Business Proces  "Do something"  ---> realized by relation --> Application Component "Component A"  --> Associated to relation --> Application Component "Component B"

View 2

Business Proces "Do something without IT" --> Flow to relation --> Business Process "Do something"   …

I would want to see

<View 1 picture>
<Documentation of view 1>

Business Layer

Business Proces <"Do something" with all it's properties and documentation>

Application Layer
Application Component <"Component A" with all it's properties and documentation>
Application Component
<"Component B" with all it's properties and documentation>

Relations

[/size]Associate Relation <"Associated to" relation   with all it's properties and documentation>[/font]


Realize Relation <"Realized by" relation   with all it's properties and documentation>


and than View 2 similar


I think that is the most valuable 'reporting' if one looks for all details. Using some "Report:..." properties I than can hide certain details if desired - the Customizable Report gives here some very good hint.


I'm half way - I can get alle the elements (including relations) that belong to a view, but right now they are either alphabetical by name (that was already possible without code changes) or by type (for which I made some changes in code). The alphabetical order of types though mixes the layers though. So it looks right now


[/size][/color]
<View 1 picture>
<Documentation of view 1>



Associate Relations
<"Associated to" relation   with all it's properties and documentation>
Application Components
<"Component A" with all it's properties and documentation>
<"Component B" with all it's properties and documentation>


Business Processes
<"Do something" with all it's properties and documentation>


Realization Relations
<"Realized by" relation with all it's properties and documentation>