plantuml / plantuml

Generate diagrams from textual description
https://plantuml.com
Other
9.97k stars 901 forks source link

State diagram: Misalignment of entry points with concurrent substates #1234

Open jmewes opened 1 year ago

jmewes commented 1 year ago

Observed

After adding a concurrent state, the placement of the entry points is not at the state boundary anymore.

concurrent-states_png_—_08_22_plantuml-bug-entry-p

Expected

I tried to create a diagram like this:

Concurrent_orthogonal_states_-_Visual_Paradigm_Community_Edition_Jan_Mewes___not_for_commercial_use_

Steps to reproduce

@startuml

hide empty description

state foo {
  state qux <<entryPoint>>
  state quux <<entryPoint>>

  [*] --> zxc
  qux --> zxc
  quux --> spqr

  --

  state wombat
  state shme
}

@enduml
PlantUML version 1.2022.14 (Tue Dec 06 18:24:13 GMT 2022)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US

PLANTUML_LIMIT_SIZE: 4096

Dot version: dot - graphviz version 2.44.0 ()
Installation seems OK. File generation OK

References

PlantUML online documentation

Related GitHub issues

jmewes commented 1 year ago

As workaround, a pseudo state might be used for the region:

@startuml

hide empty description

state foo {

  state Region1 #line.dotted {
    state qux <<entryPoint>>
    state quux <<entryPoint>>

    [*] --> zxc
    qux --> zxc
    quux --> spqr
  }

  --

  state Region2 #line.dotted {
    state wombat
    state shme  
  }
}

@enduml

experiment