This is a set of Archi scripts for Confluence integration. Often diagrams need to be shared via multiple channels (presentation decks, Confluence pages, chat, etc.).
This has been tested with recent versions of Archi and Confluence Cloud (1000+ build version).
The scripts provide the following functionality:
- A “convenient” dialog stores Confluence settings (URL, API token, etc.).
- A “pipeline definition” can be created for updating one or multiple pages on Confluence directly from Archi.
This is used for publishing Confluence pages with Archimate diagrams and their associate documentation (Documentation
text in diagram Properties
).
Eventually, a slightly modified version of this work might get hooked to a CI/CD pipeline (with Humane Image scripts, etc.).
- Archi 4.9.x
- The latest version of jArchi compatible with Archi 4.9.x
- The GraalVM JavaScript engine selected in Archi preferences (
Scripting > JavaScript Engine
)
Please link the contents of this repository under your jArchi scripts folder (Preferences >Scriting > Scripts folder:
): if you still don’t understand the procedure, please visit the jArchi wiki or forum.
You can then right-click on any diagram in Archi and explore available scripts (Scripts
context menu).
An archi-Confluence page is modeled as a Group
element on a Sketch
diagram:
- An archi-Confluence page contains either nested sections (
Group
) or references to diagrams (Canvas, Sketch or default Archimate diagrams). - Within an archi-Confluence page, the flow between sections is specified via
connections
. All page contents but the last element, must point to something (either a section or diagram reference).
An archi-Confluence pipeline contains one or multiple archi-Confluence pages:
- If you don’t select anything on a sketch diagram, all the ‘archi-Confluence pages’ will be published.
- Alternatively, you can select specific archi-Confluence pages to publish.
Notes: The name of archi-Confluence page is used as Confluence page title (retrieve existing page information by title and Confluence space). Maybe it will be possible to override it via a diagram property in the future.
Diagram documentation and images are published through the Confluence REST API.
- You, create a Confluence API token and keep it in your password manager.
- You, configure Confluence publishing settings in Archi: A utility script provides a dialog that helps persisting Confluence configuration in the Archi
workbench
preferences. - You, retrieve Confluence page information (
page id
andpage version
, based on the page title: Page titles are unique in Confluence within a givenspace
(space key). - The scripts, render any documentation associated to a view or ‘section’ using markdown (view/section documentation is parsed as Markdown and converted to HTML
- The scripts, export diagrams as PNG binary data: It is possible to skip uploading diagrams by specifying a
ContentOnly
diagram property (“YES” or “TRUE” values). - The scripts, publish text and image contents to Confluence accordingly to desired sections.
It is more flexible to use Sketch diagrams than Canvas or regular Archimate views.
- You can connect directly ‘view references’ to each other, without additional nesting.
- The allowed structure is simple: groups, view references & connections.
For now, the scripts don’t auto-create non-existent Confluence pages on the fly: this may or may not be desirable (human errors, etc.).
The best way to contribute is via a pull request.