Archi, jArchi and Heat Maps/RAG Status Maps

Update… and that’s why you don’t publish until your brain stops working…

I’ve updated the script to support a colour picker, and any number of colours (up to the number of values in the selected property)

I recently had a request to highlight all applications which store Personally Identifiable Information (PII) as well as “Sensitive PII” in use within an organisation. I already had the data available as “Properties” stored against each element within a Landscape view. There are a number of artefacts that could be produced from this, firstly I could export the view as a CSV, import this into a spreadsheet, and display the data as a table, however, I also wanted to provide a “heat map” view of the landscape, red being “Sensitive PII”, amber being “PII” and green being “none”.

Rather than spend the time in Archi reviewing each property and manually applying the colour scheme based on these values, I knocked up a jArchi script to loop through the view and complete the task for me. A few iterations later, and I’m releasing the script on GitHub Gists, as I hope it will be useful for others.

The script is available here: HeatMapByPropertyValue.ajs

Heat Map by Property Value Script Usage

Consider the following basic Landscape:

This highlights a number of Applications and System Software/Nodes, etc. used by the “ArchiSurance” organisation. Behind the scenes, each Element has a number of properties associated, e.g.

Name[lr] Liferay DXP
CategoryPhysical Application Component
Standards ClassStandard

Running the “HeatMapByPropertyValue” script on the View by right clicking on the view, selecting “Scripts” and finding the script:

We’re first asked for which property we wish to use for the process:

These are all the Properties in use by Elements in this view. I select the “PII” property by typing 10, and hitting OK. I am then asked for how many colours I want to use (up to the maximum number of values in the chosen property):

I choose the default value (the maximum number of values in the property), and am now asked for the first Value I want to colourise:

In this case I choose 1, “SENSITIVE”, I am then presented with a colour picker to choose my colour:

I select the Red colour, click OK, and then follow this process for “YES”, choosing an Amber colour, and “NO” choosing a green colour.

Finally I am asked whether I wish to set the background of elements NOT MATCHED to their default colour (selecting Cancel will keep their current colours):

Once the script has run, the view is updated with the selected colours, and a key is added for clarity:

If I wished to, I could now run the script again to highlight another Property, for example, the current Standards Class for each component:

The script is available here: HeatMapByPropertyValue.ajs

One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.