You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class StateMachineEventInterceptor extends StateMachineInterceptorAdapter < States, Events > {
public StateMachineEventInterceptor() {}
@Override
public void postStateChange(State < States, Events > state, Message < Events > message, Transition < States, Events > transition,
StateMachine < States, Events > stateMachine, StateMachine < States, Events > rootStateMachine) {
executorService.submit(() - > {
if (message != null) { // persist state, event in an audit table }
)
}
}
}
However, it seems like Message will always contain the last event sent to the statemachine, which in this case
is event AB. Is there any way I can know whether the transition was anonymous so that I can persist a null in the event column of my audit table?
The text was updated successfully, but these errors were encountered:
ericmiranda7
changed the title
Anonymous transitions the last sent event as the Message in StateMachineInterceptor
Anonymous transitions contain the last sent event as the Message in StateMachineInterceptor
Feb 27, 2025
I have a flow that looks like
I have an Interceptor class that looks like
However, it seems like
Message
will always contain the last event sent to the statemachine, which in this caseis event
AB
. Is there any way I can know whether the transition was anonymous so that I can persist a null in the event column of my audit table?The text was updated successfully, but these errors were encountered: