"Humane Image" Script

Started by yveszoundi, November 22, 2021, 23:55:59 PM

Previous topic - Next topic

yveszoundi

I created a small script called "Humane Image" and I'm wondering if it's something that could be of any interest (maybe additional polishing).

Purpose of "Humane Image"
The goal is to create "humane diagrams" with just rectangles and plain lines for a wider audience. This is achieved via custom drawing.
  • Design with Archimate conventions for Enterprise Architecture diagrams
  • Export with Archimate colors (custom font sizes and colors are matched). There are few other options such as enabling dashed lines, using rounded or plain rectangles, drawing a simple user icon for business roles or business actors or stakeholders, etc.

Dependencies
  • GraalVM engine (no testing with Nashorn)
  • 2 custom js libraries (Java reflection helper, string manipulation for text dimensions and line wrapping)
  • 2 custom jars loaded via Java reflection (SVG to PNG, Shortest Path Routing)

Screenshot

The screenshot below is from Archisurance models, that I use to test the script.
archi_test.jpg



yveszoundi

#1
On a side note, I experimented briefly with an alternate approach based on a temporary canvas view:
- Custom jArchi build with minimal support for stickies and blocks manipulation
- Lines and and shapes drawn based on some conventions (in addition to allowing user specified colors)

I didn't like the "glowing" look of stickies and I also felt like I had a bit more control with custom drawing:
- Draw small minimal user icon for business roles & actors, along with "stakeholder" elements, control the sapes
- Avoid creating temporary canvas views for custom rendering and then deleting them (file modified indicator)

It was also fun overall, leading me to reflect on audience receptiveness to the diagrams:
- Automatic generation of one or multiple Confluence pages (from "driver views" pipelines)
- Generation of PowerPoint decks (also from "driver views")
- Can people even guess that it's all coming from Archi, except for the fact that I follow closely default Archimate colors? I can "easily" draw "non-complex" custom icons (users, database, etc.)

Jean-Baptiste Sarrodie

Hi,

Thank you for sharing, very interresting. I once wished I could create PowerPoint slides using its set of shapes so that some people can change it a bit if needed, but never found time to create such script.

Quoteexcept for the fact that I follow closely default Archimate colors

There's no such thing. ArchiMate specification is not prescriptive on color, quite the opposite: "In ArchiMate models, there are no formal semantics assigned to colors and the use of color is left to the modeler."

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.

yveszoundi

Thanks for the feedback.

I'll add quickly an easy configuration of default shape colors: they use to Archimate colors (unless overridden in diagrams) and this is also not exposed as "function parameters/options".

yveszoundi

I just released the archi-humaneimage script and supporting files on GitHub, in case it could be useful to others.

It is by no mean perfect, but I do use the script regularly for publishing diagrams to Confluence pages (via additional scripts that I'll likely publish soon).

Alberto

Quotepublishing diagrams to Confluence pages

I'm also a user of Confluence, I'm curious as to what workflows you have developed around Archi.  Looking forward to this thread.

Xavier Mayeur

I have developed a workflow to export views to Confluence pages. It first start by converting the view as a markdown document with images, creating a table of content, the documentation of all elements of the view. It is an enhancement of some existing work of Steven Mileham (like attaching json or plantuml objects).

Then I have 'toConfluence' python script (sorry, not java script that I do not master well) that converts and uploads the markdown file, image and attachments to a Confluence page, also managing the related meta data (e.g. page ID, parent page ID of Confluence) as properties of the view in Archi. The toConfluence script is invoked from the jArchi script.

I will be happy to share this, and still need to perform some cleaning and expose it publicly on GitHub.

yveszoundi

#7
QuoteI will be happy to share this, and still need to perform some cleaning and expose it publicly on GitHub.
.

Cool @Xavier, maybe we could combine our efforts? I'm also cleaning up my scripts a little bit, with a focus on the "publishing pipeline", but I'll quickly describe the process. @Alberto, I'll create a new forum thread once the script is publicly available.

1. Publishing Pipeline aka "Driving views"
I use an approach "conceptually similar" (I think) to the existing documentation.ajs and Export to Markdown.ajs scripts.

2. Data upload to Confluence
I think that my approach is similar to @Xavier's, with a limitation on my end to "pre-existing" pages (fetch metadata such as page ID, page version, etc.). It looks like @Xavier is able to handle both create/update workflows on the fly?

  • The "documentation" property of diagrams is parsed as markdown
  • The diagram is exported as an image, with an option to also not render the image (text only section). For non-free form diagrams (sketch, canvas), I render diagrams using the "Humane Image" scripts.
  • Using the confluence API, text and images are uploaded, for either one or multiple wiki pages (accordingly to selected "Driving views" mentioned in point 1.)

Xavier Mayeur


See: https://github.com/xmayeur/archiScript and look for 'Export to Markdown.ajs'
and: https://github.com/xmayeur/toConfluence for the import/export script from/to Confluence API

I think we share the same idea, with the possibility to embed the architecture publication in a pipeline like Azure DevOps, where the pipeline build and deploy a released architecture to confluence on commit of a model in the master branch. You have therefore to containerize Archi with the coArchi & jArchi plugins & the needed scripts but I am not yet ready with the management of the authorizations mechanisms to enable the pipeline to deploy in Confluence and it is very dependent of your own implementation (cloud or on-premise, firewall setting, IT Security policies etc...)  :P