/** * Notify all interested listeners that the active flow execution session is ending. */ public void fireSessionEnding(RequestContext context, FlowSession session, String outcomeId, MutableAttributeMap<?> output) { for (FlowExecutionListener listener : listeners) { listener.sessionEnding(context, session, outcomeId, output); } }
/** * Notify all interested listeners that the active flow execution session is ending. */ public void fireSessionEnding(RequestContext context, FlowSession session, MutableAttributeMap output) { for (int i = 0; i < listeners.length; i++) { listeners[i].sessionEnding(context, session, output); } }
/** * Notify all interested listeners that the active flow execution session is ending. */ public void fireSessionEnding(RequestContext context, FlowSession session, String outcomeId, MutableAttributeMap<?> output) { for (FlowExecutionListener listener : listeners) { listener.sessionEnding(context, session, outcomeId, output); } }
/** * Notify all interested listeners that the active flow execution session is ending. */ public void fireSessionEnding(RequestContext context, FlowSession session, String outcomeId, MutableAttributeMap output) { for (int i = 0; i < listeners.length; i++) { listeners[i].sessionEnding(context, session, outcomeId, output); } }
public void testSessionEnd_Pc_ParentPc() { MockFlowSession parentSession = newFlowSession(true, null); MockFlowSession childSession = newFlowSession(true, parentSession); getListener().sessionStarting(requestContext, parentSession, null); getListener().sessionStarting(requestContext, childSession, null); assertCommitState(true, false); requestContext.setActiveSession(childSession); // sessionEnding is a no-op getListener().sessionEnding(requestContext, childSession, "success", null); assertSessionBound(); assertCommitState(true, false); // sessionEnded binds Parent PersistenceContext getListener().sessionEnded(requestContext, childSession, "success", null); assertSessionBound(); }
public void testSessionEnd_Pc_NoParentPc() { MockFlowSession parentSession = newFlowSession(false, null); MockFlowSession childSession = newFlowSession(true, parentSession); getListener().sessionStarting(requestContext, parentSession, null); getListener().sessionStarting(requestContext, childSession, null); assertCommitState(true, false); requestContext.setActiveSession(childSession); // Session ending commits, unbinds/closes PersistenceContext getListener().sessionEnding(requestContext, childSession, "success", null); assertSessionNotBound(); // sessionEnded has no effect getListener().sessionEnded(requestContext, childSession, "success", null); assertSessionNotBound(); assertCommitState(false, true); }