Files
storybook/tests/examples/equality.sb

41 lines
844 B
Plaintext
Raw Normal View History

// Test equality expressions in life arcs
life_arc NameCheck {
state checking {
on name is "Alice" -> found_alice
on name is "Bob" -> found_bob
}
state found_alice {
on ready -> checking
}
state found_bob {
on ready -> checking
}
}
life_arc StatusCheck {
state monitoring {
on status is active -> active_state
on status is inactive -> inactive_state
}
state active_state {
on status is inactive -> inactive_state
}
state inactive_state {
on status is active -> active_state
}
}
life_arc FlagCheck {
state idle {
on completed is true -> done
on completed is false -> working
}
state working {
on completed is true -> done
}
state done {
on completed is false -> working
}
}