How to implement a global check and redirect or transition
We have a need for each request to check a "global" value (a cookie in this case) and send the user to a specific state/URL if it occurs, no matter which state they're currently in. Except, of course, it would need to be able to except its own state.
We've used an Interceptor in the past that redirects to a configured URL, but I don't like that it has forced me to have that URL be something outside the flow. (Since I couldn't come up with any way to except that URL itself. Trying to tack on an _eventId=globalTransition, I never found a working incantation.)
I considered FlowExecutionListener, but that doesn't seem to have any way to cause a specific transition/state. I had it throw an unchecked Exception thinking I could handle that declaratively, but it seems Exceptions thrown from there don't reach the SWF configuration.
I'm hoping I'm just missing some simple approach.