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
org.springframework.security.access.AccessDeniedException: Access is denied
at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:84)
at org.springframework.statemachine.security.StateMachineSecurityInterceptor.decide(StateMachineSecurityInterceptor.java:190)
at org.springframework.statemachine.security.StateMachineSecurityInterceptor.decide(StateMachineSecurityInterceptor.java:157)
at org.springframework.statemachine.security.StateMachineSecurityInterceptor.preTransition(StateMachineSecurityInterceptor.java:109)
at org.springframework.statemachine.support.StateMachineInterceptorList.preTransition(StateMachineInterceptorList.java:128)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.handleTriggerTrans(DefaultStateMachineExecutor.java:266)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.handleTriggerTrans(DefaultStateMachineExecutor.java:211)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.processTriggerQueue(DefaultStateMachineExecutor.java:449)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.access$200(DefaultStateMachineExecutor.java:65)
at org.springframework.statemachine.support.DefaultStateMachineExecutor$1.run(DefaultStateMachineExecutor.java:323)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.scheduleEventQueueProcessing(DefaultStateMachineExecutor.java:352)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.execute(DefaultStateMachineExecutor.java:163)
at org.springframework.statemachine.support.AbstractStateMachine.sendEventInternal(AbstractStateMachine.java:603)
at org.springframework.statemachine.support.AbstractStateMachine.sendEvent(AbstractStateMachine.java:218)
at org.springframework.statemachine.support.AbstractStateMachine.sendEvent(AbstractStateMachine.java:230)
This behavior is as expected by application based on spring security. However i want to catch this exception throw it back to my api user. For the same I have written a custom listener.
public class ErrorStateMachineListener
extends StateMachineListenerAdapter<AgreementSubStatus, AgreementEvents> {
@Override
public void stateMachineError(
StateMachine<AgreementSubStatus, AgreementEvents> stateMachine, Exception exception) {
//System.out.println("here i am -------------");
//throw new IllegalStateTransitionException("Illegal state transition.");
}
@Override
public void stateEntered(State<AgreementSubStatus, AgreementEvents> state){
//System.out.println("here i am 2-------------"+state.getId().name());
}
}
Any feedback on this issue? We are having the same problem as described here. Ideally we'd like to register a global error handler that deals with exceptions rather than littering the transition configuration with , errorAction)
I am getting an exception
This behavior is as expected by application based on spring security. However i want to catch this exception throw it back to my api user. For the same I have written a custom listener.
And registered this listener in
However the control never goes to this method --public void stateMachineError
The text was updated successfully, but these errors were encountered: