Please provide a skinparam to limit the message length of ascii-art sequence diagrams

0 votes
asked Feb 2, 2016 in Closed feature request by anonymous
The normative form of an Internet RFC is the ASCII-7 version, limited to 78 characters in width.

Please provide a skinparam to limit the message length of ascii-art sequence diagrams, so I can achieve a diagram with 78 characters in width.

1 Answer

0 votes
answered Feb 2, 2016 by plantuml (208,860 points)
selected Jul 8, 2018 by Anthony-Gaudino
 
Best answer

We have just added the new skin parameter maxAsciiMessageLength in last beta: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

The maxAsciiMessageLength receives a value which is the maximum size (in characters) between two lifelines.

With this version, you can have:

@startuml
skinparam maxAsciiMessageLength 8

title RUE Automatic Configuration
box "RUE Side" #5fddd6
actor "RUE User" as RUEUSER
participant "RUE" as RUE
end box
box "Domain Name Service" #bb7068
participant DNS
end box
box "Configuration Service" #5c7068
participant "HTTPS Server" as CONFIGSERVER
participant "Provider Global Settings" AS PROVIDERSETTINGS
end box
box "Customer Relationship Management" #6fc65f
participant "CRM"
end box
autonumber "<b>[0]"
RUEUSER -> RUE: Select a VRS Provider name
RUE -> DNS: Look up SRV DNS for _rueconfig._tcp.providerdomain.com
DNS -> RUE: SRV DNS response with server.providerdomain.com:443
RUE -> DNS: If SRV record found, look up DNS for server.providerdomain.com
RUE -->> DNS: If SRV record does not exist, look up DNS for config.providerdomain.com
DNS -> RUE: IP Address of Config Server
RUE -> CONFIGSERVER: TCP connection to 443: TLS: ClientHello (RFC-5246)
CONFIGSERVER -> RUE: TLS: ServerHello
CONFIGSERVER -> RUE: TLS: ServerCertificate
CONFIGSERVER -->> RUE: TLS: ServerKeyExchange if required for premaster secret handshake
CONFIGSERVER -> RUE: TLS: ServerHelloDone
RUE -> CONFIGSERVER: HTTP: GET https://config.providerdomain.com/v1
CONFIGSERVER -> RUE: HTTP: 401 Unauthorized WWW-Authenticate Digest\nusername="X" realm="Y" qop="auth,auth-int" nonce=...
RUE -> CONFIGSERVER: HTTP: https://config.providerdomain.com/v1 Authorization Digest\nusername="X" realm="Y" qop="auth" nonce=...
CONFIGSERVER -> CRM: Find subscriber information\nfor username="X"
CRM -> CONFIGSERVER: Subscriber specific\nconfiguration information
CONFIGSERVER -> PROVIDERSETTINGS: Retrieve provider specific settings
PROVIDERSETTINGS -> CONFIGSERVER: Provider specific configuration information
CONFIGSERVER -> RUE: 200 OK + JSON key/value hash merge of subscriber specific and\nprovider specific configurations
@enduml

We have added some \n in some message, so that the diagram fits in 78 columns.
Is this what you where expecting ?

commented Feb 2, 2016 by anonymous
Thank you.
It works.
commented Sep 27 by valexiev (960 points)

I can't believe how usable the asciiArt version is!

https://gist.githubusercontent.com/VladimirAlexiev/23bc3067176cd25682077303b4207591/raw/8c8845b0d933971e31f760daf0ec07e30c465023/sequence-asciiArt.txt

For comparison, here's the PNG https://i.imgur.com/zGFzsrI.png.

The source and two output files are at https://gist.github.com/VladimirAlexiev/23bc3067176cd25682077303b4207591

...