Hi anon,
I don't know if you had any syntax in mind for your idea; I'm sure the developers would be more likely to respond if you have fleshed out the idea a bit.
But did you know that to some extent you can use the preprocessing options to get close to what you want?
1) idea 1 - redefine alt / else /end as functions:
@startuml
!procedure _alt()
|||
alt
!endprocedure
!procedure _else()
|||
else
!endprocedure
!procedure _end()
|||
end
|||
!endprocedure
_alt() valid PIN
Siteminder -> Siteminder : build response
_else() invalid PIN attempt
Siteminder -> Siteminder : increment FAC stored in loginData and build response
_end()
@enduml
2) Redefine alt / else / end as functions that take a text parameter:
@startuml
!unquoted procedure alt_($txt)
|||
alt $txt
!endprocedure
!unquoted procedure else_($txt)
|||
else $txt
!endprocedure
!unquoted procedure end_()
|||
end
|||
!endprocedure
alt_(valid PIN)
Siteminder -> Siteminder : build response
else_(invalid PIN attempt)
Siteminder -> Siteminder : increment FAC stored in loginData and build response
end_()
@enduml
3) Create a one-liner function (shame you can't seem to split the call over multiple lines)
@startuml
!unquoted procedure my_alt($a, $b, $c, $d, $e)
|||
alt $b
$a -> $a: $c
|||
else $d
$a -> $a: $e
|||
end
|||
!endprocedure
my_alt(Siteminder, valid PIN, build response, invalid PIN attempt, increment FAC stored in loginData and build response)
@enduml
(note: functions should properly start with $, and the arguments really should be quoted; but I wanted to reduce clutter).
I mean, I do appreciate that you're after the existing syntax, but with your style. But as I said, I think you need to suggest some syntax as to how that could be implemented.