Back Forum Reply New

flow redirects

There aint no much of redirect info available, I have a session invalidation check and also an authorization check in each and every flow, and every single state it  has.

I designed a FlowExecutionListenerAdapter class, since every state was checked for appropriate authorization, I did override on stateEntering method, I am now stuck at a point where redirecting should happen.

Some of the threads talked about an exception based redirect, which aint an appropriate solution.

I am just wondering if there is a cleaner way of handling such situations, firstly I need to determine how to redirect to appropriate flow. Secondly I need to take care of the flow in which the redirect is happening, I dont want to leave a flow in a paused state caused due to an intermediate redirect which happened for some authorization check or session invalidation.

Need your expert advice on this

Thanks
Srini

I also have struggled/am struggling with issues like this.

I have a FlowExecutionListener that throws an exception when a user is required to login. I have a StateExceptionHandler that sends the user to a login state like thisCode:   public ViewSelection handle(StateException exception, FlowExecutionControlContext context) {       return context.signalEvent(new Event(this, quot;loginquot;));   }
I don't really like this because I don't like driving flow execution using exceptions. Also, I have not found a good way to bring the user back to where they were going after a successful login. Right now I'm storing the state that they were to enter in the flow scope and using that to redirect after loginCode:
lt;transition on=quot;finishquot; to=quot;${flowScope.afterLoginState}quot;/gt;
This works as long as there are no request parameters with the request.
¥
Back Forum Reply New