Extensions Wiki » Extensions Wiki » Sequence Diagram Macro

Sequence Diagram Macro

Last modified by Thomas Mortagne on 2012/02/22
chart_organizationDraw UML Sequence Diagrams
TypeXAR
Developed by

Vincent Massol

LicenseGNU Lesser General Public License 2.1
Installable with the Extension Manager

Download v1.0

Description

Draw UML Sequence Diagrams using Web Sequence Diagram.

Usage

{{sequence style="default|earth|modern-blue|mscgen|omegapple|qsd|rose|roundgreen|napkin"}}
content here...
{{/sequence}}

For more detail see the Web Sequence Diagram web site.

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
styleyesa string"default"The style of the sequence diagram. Valid values are "default", "earth", "modern-blue", "mscgen", "omegapple", "qsd", "rose", "roundgreen" and "napkin"

Examples

Simple with Default style

{{sequence}}
Alice->Bob: Authentication Request
Bob-->Alice: Authentication Response
{{/sequence}}

Generates:

simple.png

Grouping with Blue style

{{sequence style="modern-blue"}}
Alice->Bob: Authentication Request
alt successful case
  Bob->Alice: Authentication Accepted
else some kind of failure
  Bob->Alice: Authentication Failure
  opt
    loop 1000 times
      Alice->Bob: DNS Attack
    end
  end
else Another type of failure
  Bob->Alice: Please repeat
end
{{/sequence}}

Generates:

grouping.png

Activation and Destruction with Napkin style

{{sequence style="napkin"}}
User->A: DoWork
activate A
A->B: <<createRequest>>
activate B
B->C: DoWork
activate C
C-->B: WorkDone
destroy C
B-->A: RequestCreated
deactivate B
A->User: Done
{{/sequence}}

Generates:

activation.png

Notes with Round Green style

{{sequence style="roundgreen"}}
participant Alice
participant Bob

note left of Alice
  This is displayed
  left of Alice.
end note
note right of Alice: This is displayed right of Alice.
note over Alice: This is displayed over Alice.
note over Alice, Bob: This is displayed over Bob and Alice.
{{/sequence}}

Generates:

notes.png

Prerequisites & Installation Instructions

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
Tags:
Created by Vincent Massol on 2010/02/11

Download XWiki

My Recent Modifications