Skip to content

Instantly share code, notes, and snippets.

@smileham
Last active September 30, 2025 16:52
Show Gist options
  • Save smileham/26f8baa46c638093aa2b3a049546da6f to your computer and use it in GitHub Desktop.
Save smileham/26f8baa46c638093aa2b3a049546da6f to your computer and use it in GitHub Desktop.
@startuml Archi Usage
!include archi-seq.puml
title Archi Print Usage
' Define Elements
$businessActor("Architect","architect")
$applicationComponent("Archi","archi")
$applicationFunction("Update\nModel","update")
$applicationFunction("Print\nView","print")
$systemSoftware("Windows\nPrint\nService","windowsPrint")
$equipment("Printer", "printer")
' Define Sequence
architect->archi ++
archi->update ++ : Make changes
$document("Not exactly correct!\nBut you get the idea.","right","update")
return Updated Model
archi ->print ++ : Click print
print -\windowsPrint ++
print --> archi --: Sent to printer
windowsPrint -> printer ++
return Complete
archi --> architect --
@enduml
@smileham
Copy link
Author

Neither, just using Archimate concepts in Puml I'm afraid.

@jeanmarc
Copy link

@smileham , I read your blog-post (https://smileham.co.uk/2019/04/23/archimate-plantuml-sequence-diagram-joy/), and really like the solution you created.
I've recently contributed some changes to plantuml-stdlib/ArchiMate-PlantUML, and think it would be a great idea to incorporate your library into it, so people can use it directly from within PlantUML without needing additional dependencies.
Are you OK with adding the definitions from your archi-seq.puml to the Archimate-PlantUML repo, so it can be included in a future update of PlantUML?

@smileham
Copy link
Author

Hey @jeanmarc that sounds like a fabulous idea if these are of use... I'd be happy to help contribute... let me know what I need to do!

@jeanmarc
Copy link

jeanmarc commented Sep 30, 2025

@smileham , take a look at jeanmarc-contrib/Archimate-PlantUML#1, where I've taken your gist and adopted it to the way Archimate.puml is structured at the moment.
Let me know what you think.

@smileham
Copy link
Author

That's really interesting...

I'm wondering if we can make it more consistent by doing something like this though.

Seeing as you have introduced a "global" variable ($ARCH_SEQUENCE_SUPPORT), I'm wondering if you could use that to "migrate" these functions to use the "standard" methods, e.g.

Instead of calling:
$applicationComponent("Archi","archi")

You could call
Application_Component("Archi","archi")

and then in the existing "Archimate.puml" you could update the current "Application_Component" method to something along the lines of:

!unquoted procedure Application_Component($alias, $label, $nest=0)
  !if ($ARCH_SEQUENCE_SUPPORT == %true())
        $element("Application","component","active", $alias, $label)
    !else
        archimate $ARCH_APPLICATION_FILLCOLOR "$label" <<application-component>> as $alias
    !endif
!endprocedure

That way, in theory, you have a consistent way to "define" your participants whether you are using "native" archimate or the sequence diagrams...

Just a thought...

Otherwise, if you just want to nab the "vanilla" version, feel free...

The only other thing that I would look to do, is remove my "Notes" type methods from "archi-seq.puml" ($assume, $document, $question, etc) as they were just me trying to standardise on some "diagram comments" type functions, but in general, probably better to encourage users to stick with regular "Notes"...

Either way, very happy to contribute 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment