Skip to content

mermaid samples: stateDiagram-v2 #4

@pollenjp

Description

@pollenjp

Example 1

stateDiagram-v2
  [*] --> ExeSequential1
  state ExeSequential1 {
    [*] --> play1
    play1 --> play2
    play2 --> ExeParallel1
    state ExeParallel1 {
      [*] --> ExeParallel2
      state ExeParallel2 {
        [*] --> play3
        --
        [*] --> play4
        --
        [*] --> play5
      }
      --
      [*] --> ExeSequential2
      state ExeSequential2 {
        [*] --> play6
        play6 --> play7
      }
      --
      [*] --> play8
    }
    ExeParallel1 --> play9
  }
  play9 --> [*]
Loading

Example 2

stateDiagram-v2
  ExeSequential1
  state ExeSequential1 {
    play1 --> play2
    play2 --> ExeParallel1
    state ExeParallel1 {
      ExeParallel2
      state ExeParallel2 {
        play3
        --
        play4
        --
        play5
      }
      --
      state ExeSequential2 {
        play6 --> play7
      }
      --
      play8
    }
    ExeParallel1 --> play9
  }
Loading

Example 3

stateDiagram-v2
  [*] --> play1
  play1 --> play2
  state ForkExeParallel1 <<fork>>
    play2 --> ForkExeParallel1

    state ForkExeParallel2 <<fork>>
      ForkExeParallel1 --> ForkExeParallel2

      ForkExeParallel2 --> play3
      ForkExeParallel2 --> play4
      ForkExeParallel2 --> play5

      state JoinExeParallel2 <<join>>
      play3 --> JoinExeParallel2
      play4 --> JoinExeParallel2
      play5 --> JoinExeParallel2

    ForkExeParallel1 --> play6
    play6 --> play7

    ForkExeParallel1 --> play8

    state JoinExeParallel1 <<join>>
    JoinExeParallel2 --> JoinExeParallel1
    play7 --> JoinExeParallel1
    play8 --> JoinExeParallel1

  JoinExeParallel1 --> play9
  play9 --> [*]
Loading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions