In the Spring Statemachine reference doc is this sample code:
@WithStateMachine
static class Bean1 {
@OnTransition(source = "S1", target = "S2")
public void fromS1ToS2() {
}
}
Is it possible to access the StateContext
object from a method annotated with @OnTransition
? Perhaps I don't understand the correct use of the annotation...I thought it could be used in a similar manner as an Action
, where I could access data stored in the ExtendedState
.