Are there any sample scripts on how to pull out the relationship elements

Started by Steve G, February 24, 2021, 15:15:37 PM

Previous topic - Next topic

Steve G

Has anyone created this? I have a really big requirement for this and as the current report template actually does somewhat fit the need, I do also need for engineers to see the relationships in the target architectures we are developing.

Is the report:View:Tag element not applicable to a relationship view element in my view to only drop that relationship into the report? It seems to be overridden by global properties if I set it to false in the model then true in the view.

Any plans to include this in the next release? Would be a feature many are requesting...as well as my peers in EA at my organization and also others.

Thanks in advance and great work so far.

Phil Beauvoir

Hi Steve,

I'm not clear what you're trying to do with jArchi or how this relates to the report properties. What do you mean by "pull out the relationship elements"?

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Steve G

In the architecture view, we have arrows representing various relationships between building blocks. Serving, triggering, composition etc. I want the report to identify those relationships as they do when you hover your mouse pointer over it (BB1 serves BB2 or SBB1 triggers SBB2 etc). Id even be happy with just listing out the relationship altogether with the associated view using the view tags (or any other method).

Does that clarify it?

Jean-Baptiste Sarrodie

Hi,

Have you tried the CSV export? You'll get 3 CSV: one for relationships, one for elements and one for properties.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Chris Usher

Steve G, if you are enquiring about using Jasper Reports to show relationships, I believe setting 'report:View:Detailed' property to 'true' also includes relationship details in the  report for the relevant view.  However this is standard reporting capability rather than something that can be achieved through jArchi.

Steve G

Yes that works fine however I need it in a PDF report template. It seems odd that a relationship is an object that is not applicable to the filtering logic in Archi.

Im building an EA team for security and reporting will be used to document architectures in the centralized bitbucket repository. As we document building blocks we also need to iterate the meaning of them using relationships in a PDF document to engineers. This is missing in reporting so I was hoping to close that gap.

Thanks

Steve

Phil Beauvoir

The default Jasper Reports template does output relationship information at the end of the report in the "Relations" section. If you need to modify this, the template can be configured by editing or creating the *.jrxml files. See the section "User Report Templates" in the Archi User Guide (page 95).

Alternatively, you could feasibly create a jArchi script to create a data model that could then output to HTML or PDF using a Java or JS library.

Because everyone's needs are different we can only supply default options and users can refine these.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Steve G

Hi all,

Let me clarify further. I was wondering if while using the report:view:tag property I can include only the relationships related to it like how the elements are listed when the report gets generated.

I have added global root model properties because, if I don't use Model:Hide:Relationships, etc. it includes the relationships of entire model even when a View Tag is used making the report huge.
So, I was wondering if jArchi has any capabilities to include that as it can work with adding and updating properties and so on.

Lastly, I was wondering if someone already has worked on a Jasper report template i.e. main.jrxml or view.jrxml (as this one is responsible for the View report when tags are used, if I am not wrong) to include relationships that were tagged or related to the tagged view.

Or if there is a different way to accomplish this.

Thanks!  :)

Jean-Baptiste Sarrodie

Hi,

Report:View:Tag properties are only meant to filter the Views report section, not other sections like Business, Application or Relationships.

I can see two ways to solve your issue: either you create an adhoc jArchi script or you run a SQL query against the model using the DB embedded into the HTML report (when the report launches in a browser, there's a "Query" tab on the right panel which allows you to run almost any query ; run a "SHOW TABLES" to get the list of available tables ; the db engine is alasql, see https://github.com/agershun/alasql/wiki for more information).

If you go the jArchi way, you could easily filter views based on a tag, and then export relationships used in those filtered views. It is even possible to create an Excel file (see provided examples in the Patreon distribution).

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.