Skip to content

Commit 97003f7

Browse files
authored
Merge pull request #45 from ebby-forks/feature/upgradeMacros
2 parents e271625 + 6920750 commit 97003f7

21 files changed

+1386
-192
lines changed

.devcontainer/devcontainer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker
3+
{
4+
"name": "PlantUml Dev Container",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "plantuml/plantuml-server:jetty",
7+
"features": {
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
9+
"version": "latest",
10+
"enableNonRootDocker": "true",
11+
"moby": "true"
12+
}
13+
},
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [],
16+
// Use 'postCreateCommand' to run commands after the container is created.
17+
//"postCreateCommand": "docker run -d -p 8080:8080 plantuml/plantuml-server:jetty",
18+
"customizations": {
19+
"vscode": {
20+
"extensions": [
21+
"jebbs.plantuml"
22+
]
23+
// "settings": {
24+
// "plantuml.exportFormat": "png",
25+
// "plantuml.render": "PlantUMLServer",
26+
// "plantuml.server": "http://localhost:8080",
27+
// "plantuml.diagramsRoot": "png",
28+
// "plantuml.exportOutDir": "png"
29+
// }
30+
}
31+
}
32+
// Configure tool-specific properties.
33+
// "customizations": {},
34+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
35+
// "remoteUser": "root"
36+
}

Archimate.puml

Lines changed: 720 additions & 171 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 88 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,45 @@
11
# Archimate-PlantUML
2-
PlantUML macros and other includes for creating Archimate Diagrams easily.
2+
3+
PlantUML macros and includes for creating Archimate Diagrams easily.
4+
35
![Archimate-PlantUML Sample image - Internet Browser](https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/images/Archimate%20Sample%20-%20Internet%20Browser.png)
46

7+
## Table of Contents
8+
1. [Background](#background)
9+
- [PlantUML](#plantuml)
10+
- [ArchiMate](#archimate)
11+
2. [Getting Started](#getting-started)
12+
3. [Usage](#usage)
13+
- [ArchiMate Elements](#archimate-elements)
14+
- [ArchiMate Relationships](#archimate-relationships)
15+
- [ArchiMate Groups](#archimate-groups)
16+
- [Nesting of Components](#nesting-of-components)
17+
- [Theme Support](#theme-support)
18+
6. [Example](#example)
19+
7. [Contributing](#contributing)
20+
8. [License](#license)
21+
9. [Acknowledgments](#acknowledgments)
22+
523
## Background
24+
625
### PlantUML
7-
[PlantUML](http://en.plantuml.com/) is an open source project that allows you to create UML diagrams.
8-
Diagrams are defined using a simple and intuitive plain text language. It uses [Graphviz](https://en.wikipedia.org/wiki/Graphviz) software to lay out its diagrams. Images can be generated in PNG, in SVG or in LaTeX format.
26+
[PlantUML](http://en.plantuml.com/) is an open-source project that allows you to create UML diagrams using a simple text language. It utilizes [Graphviz](https://en.wikipedia.org/wiki/Graphviz) for diagram layout, generating images in PNG, SVG, or LaTeX formats.
927

1028
### ArchiMate
11-
[ArchiMate](http://pubs.opengroup.org/architecture/archimate3-doc/) is an open and independent enterprise architecture modeling language to support the description, analysis and visualization of architecture within and across business domains in an unambiguous way.
29+
[ArchiMate](http://pubs.opengroup.org/architecture/archimate3-doc/) is an enterprise architecture modeling language that supports the description, analysis, and visualization of architecture across business domains.
1230

1331
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.
1432

1533
[Archimate-PlantUML](https://github.com/plantuml-stdlib/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](http://plantuml.com/archimate-diagram), with an aim to simplify the syntax for creating elements and defining relationships.
1634

1735
## Getting Started
18-
Include the `Archimate.puml` file to the top of your ArchiMate PlantUML `.puml` or `.wsd` file. This will allow you to use all the macros that are defined in the `Archimate.puml` file.
36+
Include the `Archimate.puml` file in your `.puml` or `.wsd` file:
1937

20-
To always use the most updated version from this repo, add the following inlcude statement
2138
```javascript
22-
!includeurl https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
39+
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/Archimate.puml
2340
```
24-
However, if you want offline capability and be independent of any internet connectivity, you can also download the files found in the `root` of this repository and referece in locally with
41+
42+
For offline use, download the files and reference them locally:
2543
```javascript
2644
!include path/to/Archimate.puml
2745
```
@@ -33,6 +51,8 @@ After you have included `Archimate.puml` you can use the defined macros for Arch
3351
The ArchiMate elements are defined in the following pattern:
3452
```javascript
3553
Category_ElementName(nameOfTheElement, "description")
54+
or
55+
Category_ElementName(nameOfTheElement, "description", true) //To Enable nesting of elements
3656
```
3757
For example:
3858
* To define a `Stakeholder` element, which is part of `Motivation` category, the synax will be
@@ -43,7 +63,11 @@ For example:
4363
![Stakeholder](https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/images/Example-Stakeholder.png)
4464
* To define a `Business Service` element,
4565
```javascript
46-
Business_Service(BService, "Business Service")
66+
Business_Service(BService, "Business Service", true) {
67+
Application_Service("AppService01", "App Service 01")
68+
Application_Service("AppService02", "App Service 02")
69+
Application_Service("AppService03", "App Service 03")
70+
}
4771
```
4872
Output:
4973
![Business Service](https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/images/Example-BusinessService.png)
@@ -124,10 +148,63 @@ For example
124148
Output:
125149
![Group Type 2](https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/images/Example-Group.png)
126150

151+
### Nesting of Components
152+
Nesting allows grouping components hierarchically, improving diagram clarity. There are no limitations on the number of levels of nesting.
153+
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.
154+
155+
156+
Nesting can be enabled in the following pattern
157+
```javascript
158+
Category_ElementName(nameOfTheElement, "description", true) {
159+
Category_ElementName(uniqueName, "description)
160+
}
161+
```
162+
163+
For example:
164+
```javascript
165+
Business_Product("BusProduct01", "Business Product 01", true) {
166+
Business_Service("BusService01", "Business Service 01")
167+
Business_Service("BusService02", "Business Service 02")
168+
Business_Service("BusService03", "Business Service 03")
169+
}
170+
171+
Technology_Device("TechDevice01", "Technology Device 01", true) {
172+
Technology_Device("TechDevice02", "Technology Device 02")
173+
Technology_Device("TechnDevice03", "Technology Device 03", true) {
174+
Technology_Device("TechnDevice04", "Technology Device 04", false)
175+
Technology_Device("TechnDevice05", "Technology Device 05")
176+
}
177+
}
178+
```
179+
Output:
180+
![Nesting Example](./images/Example-Nesting.png)
181+
Note that the representation of Technology-Device element changed from a node to rectangle when nesting was enabled.
182+
183+
### Theme Support
184+
Theme support is enabled and 5 variations are available. All the themes are based on Archimate specifications.
185+
186+
Theme can be enabled by adding the following line.
187+
```javascript
188+
!theme <theme-name> from <theme-folder>
189+
190+
// Example
191+
!theme archimate-saturated from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
192+
```
193+
194+
|Theme Name | Preview |
195+
|------------------------|----------------------------------------------------|
196+
|Default (No line added) | ![default](./images/theme-default.png) |
197+
|archimate-standard | ![standard](./images/theme-standard.png) |
198+
|archimate-alternate | ![alternate](./images/theme-alternate.png) |
199+
|archimate-saturated | ![saturated](./images/theme-saturated.png) |
200+
|archimate-lowsaturation | ![low saturated](./images/theme-lowsaturation.png) |
201+
|archimate-handwriting | ![handwriting](./images/theme-handwriting.png) |
202+
127203
## Example
128204
```javascript
129205
@startuml
130-
!includeurl https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
206+
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/Archimate.puml
207+
!theme archimate-standard from https://raw.githubusercontent.com/plantuml-stdlib/Archimate-PlantUML/master/themes
131208
132209
title Archimate Sample - Requirement & Application Services
133210
@@ -158,10 +235,7 @@ Output:
158235
![Archimate-PlantUML Sample image - Internet Browser](https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/images/Archimate%20Sample%20-%20Requirement%20%26%20Application%20Services.png)
159236

160237
## Contributing
161-
If you have any ideas, just [open an issue](https://github.com/ebbypeter/Archimate-PlantUML/issues/new) and tell me what you think.
162-
163-
If you'd like to contribute, please fork the repository and use a feature branch.
164-
Pull requests are warmly welcome.
238+
If you have any ideas, [open an issue](https://github.com/plantuml-stdlib/Archimate-PlantUML/issues/new) or fork the repository and submit a pull request.
165239

166240
## License
167241
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

images/Example-Nesting.png

330 KB
Loading

images/theme-alternate.png

666 KB
Loading

images/theme-default.png

644 KB
Loading

images/theme-handwriting.png

855 KB
Loading

images/theme-lowsaturation.png

670 KB
Loading

images/theme-saturated.png

671 KB
Loading

images/theme-standard.png

640 KB
Loading

samples/Archimate-Elements.wsd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
@startuml
1+
@startuml Sprite List
22
!include ../Archimate.puml
3+
!theme archimate-saturated from ../themes
34

45
title Archimate Example - Elements
56

@@ -35,7 +36,6 @@ Application_Event(AE_01, "Application Event")
3536
Application_Service(AS_01, "Application Service")
3637
Application_DataObject(AD_01, "Data Object")
3738

38-
3939
Technology_Node(TN_01, "Node")
4040
Technology_Device(TD_01, "Device")
4141
Technology_SystemSoftware(TSS_01, "System Software")
@@ -59,13 +59,12 @@ Physical_Material(PM_01, "Material")
5959
Motivation_Stakeholder(MS_01, "Stakeholder")
6060
Motivation_Driver(MD_01, "Driver")
6161
Motivation_Assessment(MA_01, "Assessment")
62-
Motivation_Goal(MG_01, "Goal")
6362
Motivation_Outcome(MO_01, "Outcome")
6463
Motivation_Principle(MP_01, "Principle")
6564
Motivation_Requirement(MR_01, "Requirement")
6665
Motivation_Constraint(MC_01, "Constraint")
6766
Motivation_Meaning(MM_01, "Meaning")
68-
Motivation_Value(MV_01, "Value with some longer text\nand multiline\nand more")
67+
Motivation_Value(MV_01, "Value")
6968

7069
'Implementation Elements
7170
Implementation_WorkPackage(IWP_01, "Work Package")

samples/Archimate-InternetBrowser.wsd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
@startuml
1+
@startuml Internet Browser Sample
22
!include ../Archimate.puml
3+
!theme archimate-standard from ../themes
34

45
title Archimate Sample - Internet Browser
56

samples/Archimate-Overview.wsd

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
@startuml
1+
@startuml Archimate Overview
22
!include ../Archimate.puml
3+
!theme archimate-saturated from ../themes
34

45
title Archimate Overview
56

@@ -96,4 +97,26 @@ Grouping(P_Group, "Physical"){
9697
Physical_Equipment(PEquipment, "Equipment")
9798
Physical_DistributionNetwork(PDistributionNetwork, "Distribution Network")
9899
}
100+
101+
Grouping(N_Group, "Nesting Samples"){
102+
Application_Component(AppComp01, "Application Component 01", true) {
103+
Application_Component("AppComp02", "Application Comp 02", true) {
104+
Application_Service("AppService01", "App Service 01")
105+
Application_Service("AppService02", "App Service 02")
106+
Application_Service("AppService03", "App Service 03")
107+
}
108+
Application_Component("AppComp03", "Application Comp 03")
109+
}
110+
111+
Technology_Process(HandleClaim, "Handle Claim", true) {
112+
Business_Process(BP_Register, "Register")
113+
Business_Process(BP_Accept, "Accpet")
114+
Business_Process(BP_Valuate, "Valuate")
115+
Business_Process(BP_Pay, "Pay")
116+
117+
Rel_Triggering_Right(BP_Register, BP_Accept)
118+
Rel_Triggering_Right(BP_Accept, BP_Valuate)
119+
Rel_Triggering_Right(BP_Valuate, BP_Pay)
120+
}
121+
}
99122
@enduml

samples/Archimate-Relationships.wsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@startuml
22
!include ../Archimate.puml
3+
!theme archimate-handwriting from ../themes
34

45
title Archimate Example - Relationships
56

samples/Archimate-Sample01.wsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@startuml
22
!include ../Archimate.puml
3+
!theme archimate-saturated from ../themes
34

45
title Archimate Sample - Requirement & Application Services
56

samples/Syntax-Examples.wsd

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@ Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
88
@startuml Example-BusinessService
99
!include ../Archimate.puml
1010

11-
Business_Service(BService, "Business Service")
11+
Business_Product("BusProduct01", "Business Product 01", true) {
12+
Business_Service("BusService01", "Business Service 01")
13+
Business_Service("BusService02", "Business Service 02")
14+
Business_Service("BusService03", "Business Service 03")
15+
}
16+
17+
Technology_Device("TechDevice01", "Technology Device 01", true) {
18+
Technology_Device("TechDevice02", "Technology Device 02")
19+
Technology_Device("TechnDevice03", "Technology Device 03", true) {
20+
Technology_Device("TechnDevice04", "Technology Device 04", false)
21+
Technology_Device("TechnDevice05", "Technology Device 05")
22+
}
23+
}
1224

1325
@enduml
1426

0 commit comments

Comments
 (0)