Skip to content

Commit 908c96d

Browse files
author
JeanMarc van Leerdam
committed
Update readme on sequence diagram support; use camelCase in procedure names; remove unneeded aspect-prefix from procedure names
1 parent c90144e commit 908c96d

File tree

3 files changed

+113
-43
lines changed

3 files changed

+113
-43
lines changed

README.md

Lines changed: 106 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ PlantUML macros and includes for creating Archimate Diagrams easily.
99
- [PlantUML](#plantuml)
1010
- [ArchiMate](#archimate)
1111
2. [Getting Started](#getting-started)
12+
- [Using built-in support](#using-built-in-support)
13+
- [Using a version available on the internet](#using-a-version-available-on-the-internet)
1214
3. [Usage](#usage)
1315
- [ArchiMate Elements](#archimate-elements)
1416
- [ArchiMate Relationships](#archimate-relationships)
1517
- [ArchiMate Groups](#archimate-groups)
18+
- [Special shapes](#special-shapes)
1619
- [Nesting of Components](#nesting-of-components)
1720
- [Theme Support](#theme-support)
21+
- [Sequence Diagrams using Archimate elements](#sequence-diagrams-using-archimate-elements)
1822
4. [Example](#example)
1923
5. [Contributing](#contributing)
2024
6. [License](#license)
@@ -306,41 +310,7 @@ Theme can be enabled by adding the following line.
306310
| archimate-lowsaturation | ![low saturation](./images/theme-lowsaturation.png) |
307311
| archimate-handwriting | ![handwriting](./images/theme-handwriting.png) |
308312

309-
## Example
310-
```plantuml
311-
@startuml
312-
!include <archimate/Archimate>
313-
!theme archimate-standard from <archimate/themes>
314-
315-
title Archimate Sample - Requirement & Application Services
316-
317-
'Elements'
318-
Motivation_Requirement(ReqPayrollStandard, "Do Payroll with a standard system")
319-
Motivation_Requirement(ReqBudgetPlanning, "Do budget planning within the ERP system")
320-
321-
Application_Service(ASPayroll,"Payroll Service")
322-
Application_Service(ASBudgetPlanning,"Budget Planning Service")
323-
Application_Component(ACSAPFinanceAccRec, "SAP Finance - Accounts Recievables")
324-
Application_Component(ACSAPHR, "SAP Human Resources")
325-
Application_Component(ACSAPFin, "SAP Finance")
326-
Application_Component(ACSAP,"SAP")
327-
328-
'Relationships'
329-
Rel_Realization_Up(ASPayroll, ReqPayrollStandard)
330-
Rel_Realization_Up(ASBudgetPlanning, ReqBudgetPlanning)
331-
Rel_Realization_Up(ACSAPFinanceAccRec, ASBudgetPlanning)
332-
Rel_Realization_Up(ACSAPHR, ASPayroll)
333-
334-
Rel_Composition_Up(ACSAPFin, ACSAPFinanceAccRec)
335-
Rel_Composition_Up(ACSAP, ACSAPHR)
336-
Rel_Composition_Up(ACSAP, ACSAPFin)
337-
@enduml
338-
```
339-
340-
Output:
341-
![Archimate-PlantUML Sample image - Requirement & Application Services](./images/Archimate%20Sample%20-%20Requirement%20%26%20Application%20Services.png)
342-
343-
## Sequence Diagrams using Archimate elements
313+
### Sequence Diagrams using Archimate elements
344314
Additional support for using Archimate elements in sequence diagrams is provided by setting a global variable:
345315
```puml
346316
!global $ARCH_SEQUENCE_SUPPORT = %true()
@@ -381,8 +351,107 @@ Output:
381351

382352
![Sequence Diagram using Archimate elements](./images/Archimate-Sequence-Diagram.png)
383353

354+
Call the procedure with a label, and if the label is not unique within the diagram also provide an ID to refer to the participant.
355+
```puml
356+
$elementType("Label")
357+
$elementType("Label", ID)
358+
```
384359
The supported elements for sequence diagrams are:
385-
*
360+
361+
| Aspect | Type | Procedure |
362+
|------------------------------|-----------------------|-----------------------------|
363+
| Application | Component | `$applicationComponent` |
364+
| Application | Collaboration | `$applicationCollaboration` |
365+
| Application | Data Object | `$dataObject` |
366+
| Application | Event | `$applicationEvent` |
367+
| Application | Function | `$applicationFunction` |
368+
| Application | Interaction | `$applicationInteraction` |
369+
| Application | Interface | `$applicationInterface` |
370+
| Application | Process | `$applicationProcess` |
371+
| Application | Service | `$applicationService` |
372+
| Business | Actor | `$actor` |
373+
| Business | Collaboration | `$businessCollaboration` |
374+
| Business | Contract | `$contract` |
375+
| Business | Event | `$businessEvent` |
376+
| Business | Function | `$businessFunction` |
377+
| Business | Interaction | `$businessInteraction` |
378+
| Business | Interface | `$businessInterface` |
379+
| Business | Object | `$businessObject` |
380+
| Business | Process | `$businessProcess` |
381+
| Business | Product | `$product` |
382+
| Business | Role | `$role` |
383+
| Business | Service | `$businessService` |
384+
| Business | Representation | `$representation` |
385+
| Implementation and Migration | Deliverable | `$deliverable` |
386+
| Implementation and Migration | Gap | `$gap` |
387+
| Implementation and Migration | Implementation Event | `$implementationEvent` |
388+
| Implementation and Migration | Plateau | `$plateau` |
389+
| Implementation and Migration | Work Package | `$workPackage` |
390+
| Motivation | Assessment | `$assessment` |
391+
| Motivation | Constraint | `$constraint` |
392+
| Motivation | Driver | `$driver` |
393+
| Motivation | Goal | `$goal` |
394+
| Motivation | Meaning | `$meaning` |
395+
| Motivation | Outcome | `$outcome` |
396+
| Motivation | Principle | `$principle` |
397+
| Motivation | Requirement | `$requirement` |
398+
| Motivation | Stakeholder | `$stakeholder` |
399+
| Motivation | Value | `$value` |
400+
| Strategy | Capability | `$capability` |
401+
| Strategy | Course Of Action | `$courseOfAction` |
402+
| Strategy | Resource | `$resource` |
403+
| Strategy | Value Stream | `$valueStream` |
404+
| Technology | Artifact | `$artifact` |
405+
| Technology | Collaboration | `$technologyCollaboration` |
406+
| Technology | Communication Network | `$communicationNetwork` |
407+
| Technology | Device | `$device` |
408+
| Technology | Event | `$technologyEvent` |
409+
| Technology | Function | `$technologyFunction` |
410+
| Technology | Interaction | `$technologyInteraction` |
411+
| Technology | Interface | `$technologyInterface` |
412+
| Technology | Node | `$node` |
413+
| Technology | Path | `$path` |
414+
| Technology | Process | `$technologyProcess` |
415+
| Technology | Service | `$technologyService` |
416+
| Technology | System Software | `$systemSoftware` |
417+
| Technology - Physical | Distribution Network | `$distributionNetwork` |
418+
| Technology - Physical | Equipment | `$equipment` |
419+
| Technology - Physical | Facility | `$facility` |
420+
| Technology - Physical | Material | `$material` |
421+
422+
## Example
423+
```plantuml
424+
@startuml
425+
!include <archimate/Archimate>
426+
!theme archimate-standard from <archimate/themes>
427+
428+
title Archimate Sample - Requirement & Application Services
429+
430+
'Elements'
431+
Motivation_Requirement(ReqPayrollStandard, "Do Payroll with a standard system")
432+
Motivation_Requirement(ReqBudgetPlanning, "Do budget planning within the ERP system")
433+
434+
Application_Service(ASPayroll,"Payroll Service")
435+
Application_Service(ASBudgetPlanning,"Budget Planning Service")
436+
Application_Component(ACSAPFinanceAccRec, "SAP Finance - Accounts Recievables")
437+
Application_Component(ACSAPHR, "SAP Human Resources")
438+
Application_Component(ACSAPFin, "SAP Finance")
439+
Application_Component(ACSAP,"SAP")
440+
441+
'Relationships'
442+
Rel_Realization_Up(ASPayroll, ReqPayrollStandard)
443+
Rel_Realization_Up(ASBudgetPlanning, ReqBudgetPlanning)
444+
Rel_Realization_Up(ACSAPFinanceAccRec, ASBudgetPlanning)
445+
Rel_Realization_Up(ACSAPHR, ASPayroll)
446+
447+
Rel_Composition_Up(ACSAPFin, ACSAPFinanceAccRec)
448+
Rel_Composition_Up(ACSAP, ACSAPHR)
449+
Rel_Composition_Up(ACSAP, ACSAPFin)
450+
@enduml
451+
```
452+
453+
Output:
454+
![Archimate-PlantUML Sample image - Requirement & Application Services](./images/Archimate%20Sample%20-%20Requirement%20%26%20Application%20Services.png)
386455

387456
## Contributing
388457
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.
@@ -395,3 +464,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
395464
* [Archimate 3.1 Specification](http://pubs.opengroup.org/architecture/archimate3-doc/) - Archimate Specifications
396465
* [Plant UML Archimate Specifications](http://plantuml.com/archimate-diagram) - for archimate spec in PlantUML
397466
* [C4-PlantUML](https://github.com/plantuml-stdlib/C4-PlantUML) - for inspiration, base structure and scripts idea
467+
* Steven Mileham, for allowing inclusion of his [Sequence Diagram support for Archimate elements](https://smileham.co.uk/2019/04/23/archimate-plantuml-sequence-diagram-joy/)

dist/plantuml-stdlib/stdlib/archimate/ArchimateSequenceDiagramSupport.puml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
' Defines functions and procedures to support Archimate elements as participants in sequence diagrams
22
' Based on the work by Steven Mileham (see [1]), and included here with his permission.
3-
' [1] - ]https://smileham.co.uk/2019/04/23/archimate-plantuml-sequence-diagram-joy/
3+
' [1] - https://smileham.co.uk/2019/04/23/archimate-plantuml-sequence-diagram-joy/
44

55
hide stereotype
66
<style>
@@ -88,15 +88,15 @@ hide stereotype
8888
!procedure $capability($label,$name="")
8989
$element("Strategy", "strategy-capability","behavior", $label, $name)
9090
!endprocedure
91-
!procedure $valuestream($label,$name="")
91+
!procedure $valueStream($label,$name="")
9292
$element("Strategy", "strategy-valuestream","behavior", $label, $name)
9393
!endprocedure
94-
!procedure $courseofaction($label,$name="")
94+
!procedure $courseOfAction($label,$name="")
9595
$element("Strategy", "strategy-course-of-action","behavior", $label, $name)
9696
!endprocedure
9797

9898
' Implementation and Migration
99-
!procedure $workpackage($label,$name="")
99+
!procedure $workPackage($label,$name="")
100100
$element("Implementation", "implementation-workpackage","behavior", $label, $name)
101101
!endprocedure
102102
!procedure $implementationEvent($label,$name="")
@@ -113,10 +113,10 @@ hide stereotype
113113
!endprocedure
114114

115115
' Business
116-
!procedure $businessActor($label,$name="")
116+
!procedure $actor($label,$name="")
117117
$element("Business", "actor","active", $label, $name)
118118
!endprocedure
119-
!procedure $businessRole($label,$name="")
119+
!procedure $role($label,$name="")
120120
$element("Business","role","behavior", $label, $name)
121121
!endprocedure
122122
!procedure $businessCollaboration($label,$name="")

samples/Archimate-Sequence-Diagram.puml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
title Archi Print Usage
2626

2727
' Define Elements
28-
$businessActor("Architect","architect")
28+
$actor("Architect","architect")
2929
$applicationComponent("Archi","archi")
3030
$applicationFunction("Update\nModel","update")
3131
$applicationFunction("Print\nView","print")

0 commit comments

Comments
 (0)