1

I am wanting to create a collaboration-like diagram which looks something like this: enter image description here

I am struggling to find a way to mark-up PlantUML to influence the positioning of the various objects. I have also tried using Graphviz directly, but with even worse results.

This is what I is renders as now: enter image description here

Can anyone provide some hints as to what I can try?

@startuml
actor "Operator" as op
actor "Subscriber" as sub
node "HSS" as hss
node "SMDP+" as smdp

op -right-> smdp : 1: Place profile order
smdp -> op : 2: Return provisioning data
op -right-> hss : 3: Provision profile data
op -down-> sub : 4: Provide download info
sub -[norank]> smdp : 5: Request download
hss -[hidden]down-> smdp
@enduml
Ron McLeod
  • 643
  • 7
  • 12
  • 1
    Your question would be better with a good title: collaboration diagrams. – Fuhrmanator Oct 31 '22 at 23:38
  • That diagram type is not supported. You could try `skinparam linetype polyline` – Fuhrmanator Oct 31 '22 at 23:42
  • @Fuhrmanator - thanks for the suggestion. I tried polyline and it did not change the position of the objects, just altered the lines from curves to lines with bends. – Ron McLeod Nov 01 '22 at 00:28
  • 1
    I know that it's not feasible to have labels follow the lines. https://stackoverflow.com/q/16615293/1168342 -- Some other hints: `rectangle` instead of `node` is closer. I'm not sure if `together { ... }` will work when you have actors, but you can try it to force groupings. The GraphViz algorithm (underneath PlantUML) puts boxes around the text (labels) and that is why you get the curves. Maybe you can try to put line breaks, e.g., `Provide\nprofile\ndata` to make the "boxes" less wide and reduce curving? – Fuhrmanator Nov 01 '22 at 00:46
  • 1
    You could also simplify. Eliminate message 2 and just have message 1 be `ProvisioningData := PlaceProfileOrder()` or something. I would just do the whole thing as a Sequence diagram. The reason collaboration diagrams are nice is they don't use as much (horizontal) space. But this one is simple enough that a sequence diagram would be fine. – Fuhrmanator Nov 01 '22 at 00:53

1 Answers1

1

Here's an attempt using my comments on your question:

enter image description here

@startuml
'left to right direction
together {
actor "Operator" as op
actor "Subscriber" as sub
}
together {
rectangle "HSS" as hss
rectangle "SMDP+" as smdp
}

op -right-> smdp : 1: Provisioning data:=\nPlace profile order
'smdp -> op : 2: Return provisioning data
op -right-> hss : 2: Provision profile data
op -down-> sub : 3: Provide\ndownload\ninfo
sub -[norank]> smdp : 4: Request download
hss -[hidden]down-> smdp
@enduml
Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111