We use -> to indicate the message transfer between participants, without explicitly declaring participants.
You can also use --> to indicate a dashed line.
You can also use <--, <-; these two symbols do not affect the drawing effect, only affect the readability
You can try to modify the content in the text box below, and then check the changes in the picture on the right
You can use the following keywords to declare participants:
You can try to modify the content in the text box below, and then check the changes in the picture on the right
We can use quotation marks to define participants, and we can also use the keyword as to define aliases for participants.
You can try to modify the content in the text box below, and then check the changes in the picture on the right
Participants can send messages to themselves
You can try to modify the content in the text box below, and then check the changes in the picture on the right
We can user autonumber to auto number messages
You can try to modify the content in the text box below, and then check the changes in the picture on the right
We can use the == keyword to divide your chart into multiple steps.
You can try to modify the content in the text box below, and then check the changes in the picture on the right
user hide footbox keyword to hide footbox.
You can try to modify the content in the text box below, and then check the changes in the picture on the right
use title keyword to add title
use header keyword to add header
use footer keyword to add footer
Messages can be combined through the following keywords:
Followed by the content of the message
You can add text that needs to be displayed in the header (except for group).
The keyword end is used to end the grouping.
*Note that grouping can be nested.
We can add notes to the message by adding the note left or note right keywords at the end of the message. You can also add multiple lines of notes by using end note.
You can use note left of, note right of or note over to place notes relative to the participant.
You can also highlight the comment by changing the background color.
And use the keyword end note to add multi-line notes.
We can use the ref over keyword in the figure to achieve reference.
We can use ... to indicate the delay, and we can also add a comment to the delay.
We can manually pass \n to wrap the line.
You can also use maxMessageSize.
We can increase the space by using |||. You can also use numbers to specify the number of pixels added.
The keywords activate and deactivate are used to represent the life activities of participants.
Once the participant is activated, its lifeline will be displayed.
Activate and deactivate apply to the above situations.
Destroy represents the end of a participant's lifeline.
You can also use nested lifelines, and run to add colors to the lifelines.
If you only want to follow some of the icons, you can use the enter and send arrows.
Use square brackets [and] to indicate the left and right sides of the diagram.
You can use box and end box to draw a box to wrap the participants.
You can also add a title or background color after the box keyword.