PlantUML macros and includes for creating Archimate Diagrams easily.
PlantUML is an open-source project that allows you to create UML diagrams using a simple text language. It utilizes Graphviz for diagram layout, generating images in PNG, SVG, or LaTeX formats.
ArchiMate is an enterprise architecture modeling language that supports the description, analysis, and visualization of architecture across business domains.
ArchiMate offers a common language for describing the construction and operation of business processes, organizational structures, information flows, IT systems, and technical infrastructure. This is just like an architectural drawing in classical building where the architecture describes the various aspects of the construction and use of a building. This insight helps the different stakeholders to design, assess, and communicate the consequences of decisions and changes within and between these business domains.
Archimate-PlantUML combines the benefits of PlantUML and ArchiMate for providing a simple way of creating and managing ArchiMate diagrams. The Archimate-PlantUML is a set of macros and other includes written on top of PlantUML Archimate specification, with an aim to simplify the syntax for creating elements and defining relationships.
Include the Archimate.puml
file in your .puml
or .wsd
file:
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/Archimate.puml
For offline use, download the files and reference them locally:
!include path/to/Archimate.puml
After you have included Archimate.puml
you can use the defined macros for ArchiMate elements.
The ArchiMate elements are defined in the following pattern:
Category_ElementName(nameOfTheElement, "description")
or
Category_ElementName(nameOfTheElement, "description", true) //To Enable nesting of elements
For example:
Stakeholder
element, which is part of Motivation
category, the synax will be
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
Output:
Business Service
element,
Business_Service(BService, "Business Service", true) {
Application_Service("AppService01", "App Service 01")
Application_Service("AppService02", "App Service 02")
Application_Service("AppService03", "App Service 03")
}
Output:
The ArchiMate relationships are defined with the following pattern:
Rel_RelationType(fromElement, toElement, "description")
and to define the direction / orientation of the two elements:
Rel_RelationType_Direction(fromElement, toElement, "description")
The RelationTypes
supported are:
The Directions
supported are:
For example:
composition
relationship between the Stakeholder and Business Service defined above, the syntax will be
Rel_Composition(StakeholderElement, BService, "Description for the relationship")
Output:
Rel_Composition_Down(StakeholderElement, BService, "Description for the relationship")
Output:
Groups in ArchiMate are denoted using the following syntax:
Grouping(nameOfTheGroup, "Group Description"){
//Define the ArchiMate Elements
}
and to define the direction / orientation of the two elements:
Group(nameOfTheGroup, "Group Description"){
//Define the ArchiMate Elements
}
For example
Grouping(Example01, "Group Type 01"){
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
Business_Service(BService, "Business Service")
}
Output:
Group(Example01, "Group Type 01"){
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
Business_Service(BService, "Business Service")
}
Output:
Nesting allows grouping components hierarchically, improving diagram clarity. There are no limitations on the number of levels of nesting. The implementation allows nesting of any components inside any other components. When nesting, the element will be displayed as a rectangle with the archimate architype on the top right corner.
Nesting can be enabled in the following pattern
Category_ElementName(nameOfTheElement, "description", true) {
Category_ElementName(uniqueName, "description)
}
For example:
Business_Product("BusProduct01", "Business Product 01", true) {
Business_Service("BusService01", "Business Service 01")
Business_Service("BusService02", "Business Service 02")
Business_Service("BusService03", "Business Service 03")
}
Technology_Device("TechDevice01", "Technology Device 01", true) {
Technology_Device("TechDevice02", "Technology Device 02")
Technology_Device("TechnDevice03", "Technology Device 03", true) {
Technology_Device("TechnDevice04", "Technology Device 04", false)
Technology_Device("TechnDevice05", "Technology Device 05")
}
}
Output: Note that the representation of Technology-Device element changed from a node to rectangle when nesting was enabled.
Theme support is enabled and 5 variations are available. All the themes are based on Archimate specifications.
Theme can be enabled by adding the following line.
!theme <theme-name> from <theme-folder>
// Example
!theme archimate-saturated from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
Theme Name | Preview |
---|---|
Default (No line added) | |
archimate-standard | |
archimate-alternate | |
archimate-saturated | |
archimate-lowsaturation | |
archimate-handwriting |
@startuml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/Archimate.puml
!theme archimate-standard from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
title Archimate Sample - Requirement & Application Services
'Elements'
Motivation_Requirement(ReqPayrollStandard, "Do Payroll with a standard system")
Motivation_Requirement(ReqBudgetPlanning, "Do budget planning within the ERP system")
Application_Service(ASPayroll,"Payroll Service")
Application_Service(ASBudgetPlanning,"Budget Planning Service")
Application_Component(ACSAPFinanceAccRec, "SAP Finance - Accounts Recievables")
Application_Component(ACSAPHR, "SAP Human Resources")
Application_Component(ACSAPFin, "SAP Finance")
Application_Component(ACSAP,"SAP")
'Relationships'
Rel_Realization_Up(ASPayroll, ReqPayrollStandard)
Rel_Realization_Up(ASBudgetPlanning, ReqBudgetPlanning)
Rel_Realization_Up(ACSAPFinanceAccRec, ASBudgetPlanning)
Rel_Realization_Up(ACSAPHR, ASPayroll)
Rel_Composition_Up(ACSAPFin, ACSAPFinanceAccRec)
Rel_Composition_Up(ACSAP, ACSAPHR)
Rel_Composition_Up(ACSAP, ACSAPFin)
@enduml
Output:
If you have any ideas, open an issue or fork the repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details