How can a database component be added to a statechart diagram?

0 votes
asked Mar 24, 2023 in Question / help by Mircea Trifan
If a database component is added to a statechart diagram containing states and transitions, a Syntax Error is raised.

Thank you very much for your help.

1 Answer

0 votes
answered Mar 24, 2023 by plantuml (295,000 points)
It would be nice if you could post here a very simple example that shows the issue.

Thanks!
commented Mar 24, 2023 by Mircea Trifan
@startuml
'https://plantuml.com/state-diagram

scale 350 width
[*] --> NotShooting

state NotShooting {
  [*] --> Idle
  Idle --> Configuring : EvConfig
  Configuring --> Idle : EvConfig
}

state Configuring {
  [*] --> NewValueSelection
  NewValueSelection --> NewValuePreview : EvNewValue
  NewValuePreview --> NewValueSelection : EvNewValueRejected
  NewValuePreview --> NewValueSelection : EvNewValueSaved

  state NewValuePreview {
     State1 -> State2
  }

}

database test [
  test
]

@enduml
If database test is added at the end of the statechart a Syntax Error is raised. If the states are deleted and the file only contains the database it is properly displayed. 
commented Mar 24, 2023 by The-Lu (64,340 points)

Hi all,

Similar to :
- https://forum.plantuml.net/17275/composite-state-functionality-with-allow_mixing?show=17275#q17275

Here are some minimal issue examples:

Simple state OK:

@startuml

allowmixing

state s

'state a {
'state b
'}

database test

@enduml

Nested state KO:

@startuml

allowmixing

state s

state a {
 state b
}

database test

@enduml

Regards.

...