Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Common include for PlantUML scripts to define ArchiMate concepts
@startuml Common
' PlantUML ArchiMate Sequence Diagram template v4
' Changelog:
' v3 Updated for new PreProcessor
' v4 Function to Procedure
' Author: Steven Mileham (steven.mileham@gmail.com)
skinparam dpi 150
skinparam shadowing false
skinparam BoxPadding 10
skinparam defaultFontName "Roboto"
skinparam participantBorderColor black
skinparam noteBorderColor black
skinparam sequence {
ArrowColor black
LifeLineBorderColor DimGray
LifeLineBackgroundColor LightGray
BoxBorderColor Gray
BoxBackgroundColor #f2f2f2
}
skinparam participant<<Business>> {
BorderColor #GoldenRod
BackgroundColor #Business
}
skinparam participant<<Application>> {
BorderColor #LightSteelBlue
BackgroundColor #Application
}
skinparam participant<<Technology>> {
BorderColor #LimeGreen
BackgroundColor #Technology
}
skinparam participant<<Physical>> {
BorderColor #LimeGreen
BackgroundColor #Technology
}
skinparam participant<<Motivation>>{
BorderColor #Purple
BackgroundColor #Motivation
DiagonalCorner 10
}
' Archimate Components
' Generic
!procedure $element($layer,$type,$label,$name="")
!if ($name=="")
participant "<$archimate/$type>\r $label" as $label << $layer >>
!else
participant "<$archimate/$type>\r $label" as $name << $layer >>
!endif
!endprocedure
' Motivation
!procedure $driver($label,$name="")
$element("Motivation", "driver", $label, $name)
!endprocedure
!procedure $assessment($label,$name="")
$element("Motivation", "assessment", $label, $name)
!endprocedure
!procedure $goal($label,$name="")
$element("Motivation", "goal", $label, $name)
!endprocedure
!procedure $outcome($label,$name="")
$element("Motivation", "motivation-outcome", $label, $name)
!endprocedure
!procedure $principle($label,$name="")
$element("Motivation", "principle", $label, $name)
!procedure $requirement($label,$name="")
$element("Motivation", "requirement", $label, $name)
!procedure $constraint($label,$name="")
$element("Motivation", "constraint", $label, $name)
!procedure $value($label,$name="")
$element("Motivation", "value", $label, $name)
!procedure $meaning($label,$name="")
$element("Motivation", "meaning", $label, $name)
!procedure $stakeholder($label,$name="")
$element("Motivation", "role", $label, $name)
' Business
!procedure $businessActor($label,$name="")
$element("Business", "actor", $label, $name)
!endprocedure
!procedure $businessCollaboration($label,$name="")
$element("Business", "collaboration", $label, $name)
!endprocedure
!procedure $businessEvent($label,$name="")
$element("Business", "event", $label, $name)
!endprocedure
!procedure $businessInteraction($label,$name="")
$element("Business","interaction", $label, $name)
!endprocedure
!procedure $businessInterface($label,$name="")
$element("Business","interface", $label, $name)
!endprocedure
!procedure $businessObject($label,$name="")
$element("Business","object", $label, $name)
!endprocedure
!procedure $businessProcess($label,$name="")
$element("Business","process", $label, $name)
!endprocedure
!procedure $businessRole($label,$name="")
$element("Business","role", $label, $name)
!endprocedure
!procedure $businessService($label,$name="")
$element("Business","service", $label, $name)
!endprocedure
!procedure $contract($label,$name="")
$element("Business","contract", $label, $name)
!endprocedure
!procedure $product($label,$name="")
$element("Business","product", $label, $name)
!endprocedure
!procedure $representation($label,$name="")
$element("Business","representation", $label, $name)
!endprocedure
' Application
!procedure $applicationCollaboration($label,$name="")
$element("Application","collaboration", $label, $name)
!endprocedure
!procedure $applicationComponent($label,$name="")
$element("Application","component", $label, $name)
!endprocedure
!procedure $applicationEvent($label,$name="")
$element("Application","event", $label, $name)
!endprocedure
!procedure $applicationFunction($label,$name="")
$element("Application","function", $label, $name)
!endprocedure
!procedure $applicationInteraction($label,$name="")
$element("Application","interaction", $label, $name)
!endprocedure
!procedure $applicationInterface($label,$name="")
$element("Application","interface", $label, $name)
!endprocedure
!procedure $applicationProcess($label,$name="")
$element("Application","process", $label, $name)
!endprocedure
!procedure $applicationService($label,$name="")
$element("Application","service", $label, $name)
!endprocedure
!procedure $dataObject($label,$name="")
$element("Application","object", $label, $name)
!endprocedure
' Technology
!procedure $artifact($label,$name="")
$element("Technology","technology-artifact", $label, $name)
!endprocedure
!procedure $communicationNetwork($label,$name="")
$element("Technology","network", $label, $name)
!endprocedure
!procedure $device($label,$name="")
$element("Technology","device", $label, $name)
!endprocedure
!procedure $node($label,$name="")
$element("Technology","node", $label, $name)
!endprocedure
!procedure $path($label,$name="")
$element("Technology","technology-communication-path", $label, $name)
!endprocedure
!procedure $systemSoftware($label,$name="")
$element("Technology","system-software", $label, $name)
!endprocedure
!procedure $technologyCollaboration($label,$name="")
$element("Technology","collaboration", $label, $name)
!endprocedure
!procedure $technologyEvent($label,$name="")
$element("Technology","event", $label, $name)
!endprocedure
!procedure $technologyFunction($label,$name="")
$element("Technology","function", $label, $name)
!endprocedure
!procedure $technologyInteraction($label,$name="")
$element("Technology","interaction", $label, $name)
!endprocedure
!procedure $technologyInterface($label,$name="")
$element("Technology","interface", $label, $name)
!endprocedure
!procedure $technologyProcess($label,$name="")
$element("Technology","process", $label, $name)
!endprocedure
!procedure $technologyService($label,$name="")
$element("Technology","service", $label, $name)
!endprocedure
' Physical
!procedure $distributionNetwork($label,$name="")
$element("Physical","physical-distribution-network", $label, $name)
!endprocedure
!procedure $equipment($label,$name="")
$element("Physical","physical-equipment", $label, $name)
!endprocedure
!procedure $facility($label,$name="")
$element("Physical","physical-facility", $label, $name)
!endprocedure
!procedure $material($label,$name="")
$element("Physical","physical-material", $label, $name)
!endprocedure
' Notes
!procedure $assume($text, $placement = "left", $component = "")
hnote $placement $component #FFAAAA: <&warning> $text
!endprocedure
!procedure $document($text, $placement = "left", $component = "")
note $placement $component #FFFFA5: <&document> $text
!endprocedure
!procedure $question($text, $placement = "left", $component = "")
rnote $placement $component #FFBF00: <&question-mark> $text
!endprocedure
!procedure $schedule($text, $placement = "left", $component = "")
rnote $placement $component #98FB98: <&timer> $text
!endprocedure
!procedure $change($text, $placement = "left", $component = "")
rnote $placement $component #FFBF00: <&circle-check> $text
!endprocedure
!procedure $reuse($text, $placement = "left", $component = "")
rnote $placement $component #98FB98: <&circle-check> $text
!endprocedure
!procedure $error($text, $placement = "left", $component = "")
rnote $placement $component #FFCCCB: <&bug> $text
!endprocedure
hide stereotype
footer Generated on %date()
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.