Insert participant boxes

+1 vote
asked Dec 31, 2019 in Wanted features by anonymous
Hello,

For long sequence diagrams, it would be great if there is a way to insert participant boxes at arbitrary point in the sequences.

Is this possible ?
commented Dec 31, 2019 by diagramBob
Do you have a visual example about the idea?

3 Answers

0 votes
answered Dec 31, 2019 by anonymous
e.g

Here P1, P2, P3 are participants and have some interactions via sequences. Since the set of interactions/sequences are long it's not possible to see participants and sequences on the same page. Newpage forces the diagrams to be split into multiple pages, but that;s not the desired intent. This request specially helps when scrolling long sequences on a screen. (Sorry, I couldnt figure out how to attach a picture from local desktop to this response).

P1          P2        P3

  |             |           |

 ... some sequences...

  |             |           |

P1          P2        P3

  |             |           |

 ... some sequences...

  |             |           |

P1          P2        P3

  |             |           |

 ... some sequences...

  |             |           |
0 votes
answered Jan 8, 2020 by kjw
commented Jan 10, 2020 by anonymous
Sorry, i dont think it meets the needs.  The solution suggested grouped things together. However, the request is to reinsert participant boxes.
0 votes
answered Jun 30, 2021 by The-Lu (63,920 points)

Hello all,

Adapted from this answer:

A possible workaround is to add and complete a user procedure as:

!procedure $insert_participants()
   rnote over P1 #FEFECE: P1 
  /rnote over P2 #FEFECE: P2
  /rnote over P3 #FEFECE: P3
!endprocedure

And just to use it anywhere like that:

$insert_participants()

Example:


[Click to see code on online server]

See similar request here:

If that can help,
Regards,
Th.

commented Sep 21, 2021 by Largo (160 points)

Hello,

your above example works for me, but in my very big sequence diagram (extract below), the repeated participants are displayed like stairs!

@startuml
skinparam ParticipantFontColor automatic

!procedure $insert_participants()
   rnote over CT #lightblue: Customer
   rnote over UI #lightblue: UI
   rnote over BFF #lightblue: BackEnd for \nFrontEnd
   rnote over CART #Black: <color #FFFFFF>Shopping Cart</color> \n<color #FFFFFF>Component</color>
' I cannot make ParticipantFontColor function work in procedure. Also, <color> doesn't work with multiple lines, need to repeat it for each line.
   rnote over CPQ #Black: CPQ \nComponent
   rnote over POQ #Black: Product Offering Qualification \nComponent
   rnote over PCM #Black: Product Catalog Management \nComponent
   rnote over PR #lightgreen: A.I. Product Recommendation \nComponent
   rnote over TSQ #orange: Technical Service\nQualification
!endprocedure

actor Customer as CT
participant "UI" as UI #lightblue
participant "BackEnd for \nFrontEnd" as BFF #lightblue
participant "Shopping Cart \nComponent" as CART #Black
participant "CPQ \nComponent" as CPQ #Black
participant "Product Offering Qualification \nComponent" as POQ #Black
participant "Product Catalog Management \nComponent" as PCM #Black
participant "A.I. Product Recommendation \nComponent" as PR #lightgreen
participant "Technical Service\nQualification" as TSQ #orange

autonumber "<font color=blue><b>00. "

UI -> BFF: get Product Configuration \n(shoppingCartId)
BFF -> CART: <font color=blue>TMF663 GET /shoppingCart </font> \n(shoppingCartId)
CART -> CART: Shopping Create ShopCart\n(CartId, PartyId...)
CART --> CART: ShopCartObjectId created
$insert_participants()
PCM --> BFF: dummy message for testing
@enduml

gives me this:

I can't see what's wrong in my code

commented Sep 21, 2021 by The-Lu (63,920 points)

Hello L.,

With adding slash '/' on the beginning of rnote for all the rnote expect the first, like:

!procedure $insert_participants()
   rnote over CT #lightblue: Customer
   /rnote over UI #lightblue: UI
   /rnote over BFF #lightblue: BackEnd for \nFrontEnd
   /rnote over CART #Black: <color #FFFFFF>Shopping Cart</color> \n<color #FFFFFF>Component</color>
' I cannot make ParticipantFontColor function work in procedure. Also, <color> doesn't work with multiple lines, need to repeat it for each line.
   /rnote over CPQ #Black: <color #FFFFFF>CPQ \n<color #FFFFFF>Component
   /rnote over POQ #Black: <color #FFFFFF>Product Offering Qualification \n<color #FFFFFF>Component
   /rnote over PCM #Black: <color #FFFFFF>Product Catalog Management \n<color #FFFFFF>Component
   /rnote over PR #lightgreen: A.I. Product Recommendation \nComponent
   /rnote over TSQ #orange: Technical Service\nQualification
!endprocedure

We can observe the expected result:

Regards,
Th.

commented Sep 22, 2021 by Largo (160 points)
yes, indeed, sorry, I should have seen that.
...