Skip to content

Commit a57b13f

Browse files
authored
Merge pull request #3 from ebbypeter/develop
Updated ReadMe.md and minor fixes on samples
2 parents 3e236d8 + 6b590c5 commit a57b13f

File tree

3 files changed

+143
-13
lines changed

3 files changed

+143
-13
lines changed

README.md

Lines changed: 140 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Archimate-PlantUML
22
PlantUML macros and other includes for creating Archimate Diagrams easily.
3-
> Sample image comes here...
3+
![Archimate-PlantUML Sample image - Internet Browser](https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/images/Archimate%20Sample%20-%20Internet%20Browser.png)
44

55
## Background
66
### PlantUML
@@ -15,14 +15,147 @@ ArchiMate offers a common language for describing the construction and operation
1515
[Archimate-PlanUML](https://github.com/ebbypeter/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.
1616

1717
## Getting Started
18-
> __Todo__
19-
>
20-
>
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.
19+
20+
To always use the most updated version from this repo, add the following inlcude statement
21+
```javascript
22+
!includeurl https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
23+
```
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
25+
```javascript
26+
!include path/to/Archimate.puml
27+
```
2128

2229
## Usage
23-
> __Todo__
24-
>
25-
>
30+
After you have included `Archimate.puml` you can use the defined macros for ArchiMate elements.
31+
32+
### ArchiMate Elements
33+
The ArchiMate elements are defined in the following pattern:
34+
```javascript
35+
Category_ElementName(nameOfTheElement, "description")
36+
```
37+
For example:
38+
* To define a `Stakeholder` element, which is part of `Motivation` category, the synax will be
39+
```javascript
40+
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
41+
```
42+
Output:
43+
![Stakeholder](https://www.plantuml.com/plantuml/png/LOtB2i8m44NtXVv3x4f16zswgc1t5WHnBTDqCA5vCPdu-7lRNTrTxkMUqoG6ukoiQ3_WeiNzeInMnYkR1ynaXMQEwIWbmRj-6jQvpmb91S_ekLR1IUpxRqH6aYTIsZXWt5qjUBvt5-aW_Irrd5nbKHPTOFC2Di4_RWmZwc07fFKYjnRTvDYAQb6ACoP59ix7QZE36lJ3nFm1 "Stakeholder")
44+
* To define a `Business Service` element,
45+
```javascript
46+
Business_Service(BService, "Business Service")
47+
```
48+
Output:
49+
![Business Service](https://www.plantuml.com/plantuml/png/LOsz2i8m54RtGjuXTbBGH1oTseARWY3EagGN6qZISE-DFszlXJguVPp3uMk83NA9GHvU9kO0svse5ZwvK7ee6EJ0d6clDPgdkdiUYYq4wCR4a5YvCMgmzfs10NMBRl3HC6pEmII-deuw6lepAazVeX9LLyWd8BfT01_UmRARnrhMFoTdLA--HGEfd-8F "Business Service")
50+
51+
### ArchiMate Relationships
52+
The ArchiMate relationships are defined with the following pattern:
53+
```javascript
54+
Rel_RelationType(fromElement, toElement, "description")
55+
```
56+
and to define the direction / orientation of the two elements:
57+
```javascript
58+
Rel_RelationType_Direction(fromElement, toElement, "description")
59+
```
60+
The `RelationTypes` supported are:
61+
- Access
62+
- Aggregation
63+
- Assignment
64+
- Association
65+
- Composition
66+
- Flow
67+
- Influnce
68+
- Realization
69+
- Serving
70+
- Specilization
71+
- Triggering
72+
73+
The `Directions` supported are:
74+
- Up
75+
- Down
76+
- Left
77+
- Right
78+
79+
For example:
80+
* To denote a `composition` relationship between the Stakeholder and Business Service defined above, the syntax will be
81+
```javascript
82+
Rel_Composition(StakeholderElement, BService, "Description for the relationship")
83+
```
84+
Output:
85+
![Composition Relationship](https://www.plantuml.com/plantuml/png/ROzFImD13CNl2_iTnfugw8xWpLEjzcP1B9wNsTdK2MR-a6IgVdjtfS8Ati9xUU-NR4GTQuraTfyk5eARsxQvmEIfZb2PJ50jScSjku_k3JNKeGgmpqaXQUTpj30CNmKKsDwp3nYTmlKpkQIl-oSRdVnnkZAnscQV5KzECQV-eEuTGgOHUBsOTmHn8boPrK8qZo2UiSp1rMNRRAjW0f7-07n23-ljUPXYlvuvI_D-sxm0zGyvbYmub_nBN9GiUEQOsMW0mq0_bql0CfTk88tJKzy0 "Composition Relationship")
86+
* To orient the two elements in top - down position, the syntax will be
87+
```javascript
88+
Rel_Composition_Down(StakeholderElement, BService, "Description for the relationship")
89+
```
90+
Output:
91+
![Composition Relationship Down](https://www.plantuml.com/plantuml/png/ROzBQyD038Jl1l-7RKuffDuUUkefpUFMG4desQpNQbPaNqZQ9FttjKCABlGcPZJpIKiMGrA2Lzkh2Td3yqjTFM2qllHGo2idalbLQpANveZYIbSOoAOe4AMnAMZekkyC0gJVo3eCHk3fmviedxjt7Gp_SPeyiEfgbmJFHZ35zY3c12xv7cW-cRSUma1OgDb4L1jWIvZ7uEonhbQ5CG9pUm0weuNvwZuCiLzFtQLnlwxsuDjr2ZantkYRT8d_OYTD4wZwIgJ4WIBmj_FPOHwRbn3xuRCV "Composition Relationship Down")
92+
93+
### ArchiMate Groups
94+
Groups in ArchiMate are denoted using the following syntax:
95+
```javascript
96+
Grouping(nameOfTheGroup, "Group Description"){
97+
//Define the ArchiMate Elements
98+
}
99+
```
100+
and to define the direction / orientation of the two elements:
101+
```javascript
102+
Group(nameOfTheGroup, "Group Description"){
103+
//Define the ArchiMate Elements
104+
}
105+
```
106+
For example
107+
* Group Type 1:
108+
```javascript
109+
Grouping(Example01, "Group Type 01"){
110+
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
111+
Business_Service(BService, "Business Service")
112+
}
113+
```
114+
Output:
115+
![Group Type 1](https://www.plantuml.com/plantuml/png/LKvDQm8n5Bm7yX_IFQtGRlJGYoShbLug56pFaiq-t4VpnSkBRH7_UsEhe7CQPfYFHMP3NBnJgs_ZauFfenHt6Amh0nHoQcHEUQurcQzkXpoMlcGW6mD3uCv6hw7lVn8ma7uYEw8t30zlpWJ-MBzgR_ADqwMw9SKBnP8mxDhBwknUDN-YUgzbQZfh9WSfLCKwCkuDOmpR3PjF6ACRWDehldBWwvdQS2MgPyYMC9s2pUI_Qbao1iXvkm7QeuLsUIOrUl7KMJfbZb98iO0mrC-_ "Group Type 1")
116+
117+
* Group Type 2:
118+
```javascript
119+
Group(Example01, "Group Type 01"){
120+
Motivation_Stakeholder(StakeholderElement, "Stakeholder Description")
121+
Business_Service(BService, "Business Service")
122+
}
123+
```
124+
Output:
125+
![Group Type 2](https://www.plantuml.com/plantuml/png/LKxBQW8n5Dq7yW_fh4Qm4t7HHLUZLBgf8AXhoMGkJcXUtDpueFJVZLR1djNX7CwZJQIGihDYSL8kMfYySVPYlBQvXunM34GnlKk9wjZi3GsvombG1q_WgT71IUYwSmG2b3FKWt6Au7LbbQVjyaiwbVuvJInRd77sYI77-Z4w7OlgfeXDwHAJQJNwuKmKB0EPWo8J_6vDwXk6O7l0-ealBBZofJGyYU83aaOJhy5gz5SrpybuI6ct1ZmO3VNyJahquOcxTCtySjQ2xylX2m00 "Group Type 2")
126+
127+
## Example
128+
```javascript
129+
@startuml
130+
!includeurl https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
131+
132+
title Archimate Sample - Requirement & Application Services
133+
134+
'Elements'
135+
Motivation_Requirement(ReqPayrollStandard, "Do Payroll with a standard system")
136+
Motivation_Requirement(ReqBudgetPlanning, "Do budget planning within the ERP system")
137+
138+
Application_Service(ASPayroll,"Payroll Service")
139+
Application_Service(ASBudgetPlanning,"Budget Planning Service")
140+
Application_Component(ACSAPFinanceAccRec, "SAP Finance - Accounts Recievables")
141+
Application_Component(ACSAPHR, "SAP Human Resources")
142+
Application_Component(ACSAPFin, "SAP Finance")
143+
Application_Component(ACSAP,"SAP")
144+
145+
'Relationships'
146+
Rel_Realization_Up(ASPayroll, ReqPayrollStandard)
147+
Rel_Realization_Up(ASBudgetPlanning, ReqBudgetPlanning)
148+
Rel_Realization_Up(ACSAPFinanceAccRec, ASBudgetPlanning)
149+
Rel_Realization_Up(ACSAPHR, ASPayroll)
150+
151+
Rel_Composition_Up(ACSAPFin, ACSAPFinanceAccRec)
152+
Rel_Composition_Up(ACSAP, ACSAPHR)
153+
Rel_Composition_Up(ACSAP, ACSAPFin)
154+
@enduml
155+
```
156+
157+
Output:
158+
![Archimate-PlantUML Sample image - Internet Browser](https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/images/Archimate%20Sample%20-%20Requirement%20%26%20Application%20Services.png)
26159

27160
## Contributing
28161
If you have any ideas, just [open an issue](https://github.com/ebbypeter/Archimate-PlantUML/issues/new) and tell me what you think.

samples/Archimate-InternetBrowser.wsd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@startuml
2-
!include Archimate.puml
2+
'!include Archimate.puml
3+
!includeurl https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
34

45
title Archimate Sample - Internet Browser
56

samples/Archimate-Sample01.wsd

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
@startuml
2-
!include Archimate.puml
2+
!includeurl https://raw.githubusercontent.com/ebbypeter/Archimate-PlantUML/master/Archimate.puml
33

44
title Archimate Sample - Requirement & Application Services
55

6-
'LAYOUT_AS_SKETCH
7-
'LAYOUT_LEFT_RIGHT
8-
'LAYOUT_TOP_DOWN
9-
106
Motivation_Requirement(ReqPayrollStandard, "Do Payroll with a standard system")
117
Motivation_Requirement(ReqBudgetPlanning, "Do budget planning within the ERP system")
128

0 commit comments

Comments
 (0)