0

I'm new to Spring State Machine. I've defined a state machine configuration using UML modeling tool(Eclipse Papyrus) as is described in enter link description here . I have defined states and events and guards in my diagram. Now i want to define some choice state (Choice pseudostate) in my UML diagram but I don't know how I can do that. I really wondering if I could pick your brain.

Amir
  • 652
  • 9
  • 19

1 Answers1

1

Looks like I need to make docs better as those are missing indeed. In a meanwhile you could try to open simple-choice.di (or its uml) from our unit tests to see how things are defined.

choice statechart

Lemmy know if this didn't help.

Janne Valkealahti
  • 2,552
  • 1
  • 14
  • 12
  • Thanks for your reply, Do you mean that I should put a guard on each transition after choice. when the execution of state machine arrive the choice, guards of each transition will be evaluated and the next state will choose based on the guards evaluation. if it is true so what about the order of the guards evaluation? – Amir Nov 12 '16 at 07:34
  • Guards matter as those just allows you to create if/elseif/else structure. I.e. you should not have overlapping Guard conditions because then chosen path will not be predictable. One transition without guard is usually added to make sure one choice path is always possible. If even in theory a choice configuration allows you to get stuck in a choice, machine is ill-formed. – Janne Valkealahti Nov 12 '16 at 08:28