|
|
sessionEnding and sessionEnded not fired at end of subflow
I am using rc3 and have created a simple implementation of FlowExecutionListener using the FlowExecutionListenerAdapter, and tried again just using the interface, logging the method calls.
In both cases when a subflow ends, sessionEnding and sessionEnded do not get called. When the root flow ends those methods do get called.
I would expect the sessionEnd* methods to get called when exiting a subflow, as they seem to me to be more useful in that context.
Are you sure the listener is indeed attached? If the subflow session is ending those sessionEnd* methods should be being called. Might want to make sure you overridded the correct 1.0rc3 signature, as those sigs have changed a little between releases.
Keith
I am sure the listener is attached, it is attached with the Static Listener Loader and fires all the other events seemingly appropriately, and fires the sessionEnding and sessionEnded events when exiting the root flow.
Running in a debugger, I have a breakpoint in FlowExecutionImpl.endActiveFlowSession()
I never hit the breakpoint when exiting a subflow, but do hit it when exiting the root flow.
The end state of my subflow is straight out of the swf-flowlauncher sample
lt;end-state id=quot;endquot;/gt;
and the subflow state in the root flow is similarly simple
lt;subflow-state id=quot;theSubflowquot; flow=quot;theSubflowquot;gt; lt;transition on=quot;endquot; to=quot;flowChooserFormquot;/gt; lt;/subflow-stategt;
After ending the subflow, I do indeed end up at the flowChooserForm state,
but the events in question never get fired.
further debugging shows that the doEnter method of EndState is not called when in a subflow, but is called when you get to an EndState in the root flow.
also verified that the behavior is consistent when transitioning to an end state from a view state or an action state.
User Error.
I wasnt passing the flow execution around in the subflow, so when I thought I was hitting the end state, I was actually just being put back into the root flow.
I guess that is one of the dangers of having a defaultFlow, which maksed the real issuegt; |
|