public FlowExecutionKey assignFlowExecutionKey() { GeneratedFlowExecutionKey key = new GeneratedFlowExecutionKey(); getMockFlowExecutionContext().setKey(key); return key; }
public void setRedirectInSameState(boolean redirectInSameState) { getMockFlowExecutionContext().getAttributeMap().put("redirectInSameState", redirectInSameState); }
public void setEmbeddedMode() { getMockFlowExecutionContext().getMockActiveSession().setEmbeddedMode(); } }
public void setCurrentState(State state) { getMockFlowExecutionContext().getMockActiveSession().setState(state); }
public boolean getEmbeddedMode() { return getMockFlowExecutionContext().getMockActiveSession().isEmbeddedMode(); }
public void setAlwaysRedirectOnPause(boolean alwaysRedirectOnPause) { getMockFlowExecutionContext().getAttributeMap().put("alwaysRedirectOnPause", alwaysRedirectOnPause); }
public void endActiveFlowSession(String outcome, MutableAttributeMap<Object> output) throws IllegalStateException { MockFlowSession endingSession = getMockFlowExecutionContext().getMockActiveSession(); endingSession.getDefinitionInternal().end(this, outcome, output); getMockFlowExecutionContext().setActiveSession(endingSession.getParent()); if (!getMockFlowExecutionContext().hasEnded()) { handleEvent(new Event(endingSession.getState(), outcome, output)); } }
public boolean getRedirectOnPause() { if (!getExternalContext().isResponseAllowed()) { return true; } Boolean redirectOnPause = getMockFlowExecutionContext().getAttributes().getBoolean("alwaysRedirectOnPause"); return redirectOnPause == null ? false : redirectOnPause; }
public boolean getRedirectInSameState() { if (!getExternalContext().isResponseAllowed()) { return true; } Boolean redirectInSameState = getMockFlowExecutionContext().getAttributes().getBoolean("redirectInSameState"); if (redirectInSameState != null) { return redirectInSameState; } else { return getRedirectOnPause(); } }
public void start(Flow flow, MutableAttributeMap<?> input) throws IllegalStateException { MockFlowSession session = new MockFlowSession(flow, input); if (getFlowExecutionContext().isActive()) { session.setParent(getFlowExecutionContext().getActiveSession()); } getMockFlowExecutionContext().setActiveSession(session); flow.start(this, input); }
public FlowExecutionKey assignFlowExecutionKey() { GeneratedFlowExecutionKey key = new GeneratedFlowExecutionKey(); getMockFlowExecutionContext().setKey(key); return key; }
public FlowExecutionKey assignFlowExecutionKey() { GeneratedFlowExecutionKey key = new GeneratedFlowExecutionKey(); getMockFlowExecutionContext().setKey(key); return key; }
public void setCurrentState(State state) { State previousState = (State) getCurrentState(); getMockFlowExecutionContext().getMockActiveSession().setState(state); if (previousState == null) { getMockFlowExecutionContext().getMockActiveSession().setStatus(FlowSessionStatus.ACTIVE); } }
public ViewSelection start(Flow flow, MutableAttributeMap input) throws IllegalStateException { getMockFlowExecutionContext().setActiveSession(new MockFlowSession(flow, input)); getMockFlowExecutionContext().getMockActiveSession().setStatus(FlowSessionStatus.STARTING); ViewSelection selectedView = flow.start(this, input); return selectedView; }
public FlowSession endActiveFlowSession(MutableAttributeMap output) throws IllegalStateException { MockFlowSession endingSession = getMockFlowExecutionContext().getMockActiveSession(); endingSession.getDefinitionInternal().end(this, output); endingSession.setStatus(FlowSessionStatus.ENDED); getMockFlowExecutionContext().setActiveSession(null); return endingSession; }
public void endActiveFlowSession(String outcome, MutableAttributeMap<Object> output) throws IllegalStateException { MockFlowSession endingSession = getMockFlowExecutionContext().getMockActiveSession(); endingSession.getDefinitionInternal().end(this, outcome, output); getMockFlowExecutionContext().setActiveSession(endingSession.getParent()); if (!getMockFlowExecutionContext().hasEnded()) { handleEvent(new Event(endingSession.getState(), outcome, output)); } }
public void endActiveFlowSession(String outcome, MutableAttributeMap output) throws IllegalStateException { MockFlowSession endingSession = getMockFlowExecutionContext().getMockActiveSession(); endingSession.getDefinitionInternal().end(this, outcome, output); getMockFlowExecutionContext().setActiveSession(endingSession.getParent()); if (!getMockFlowExecutionContext().hasEnded()) { handleEvent(new Event(endingSession.getState(), outcome, output)); } }
public boolean getRedirectOnPause() { if (!getExternalContext().isResponseAllowed()) { return true; } Boolean redirectOnPause = getMockFlowExecutionContext().getAttributes().getBoolean("alwaysRedirectOnPause"); return redirectOnPause == null ? false : redirectOnPause; }
public boolean getRedirectInSameState() { if (!getExternalContext().isResponseAllowed()) { return true; } Boolean redirectInSameState = getMockFlowExecutionContext().getAttributes().getBoolean("redirectInSameState"); if (redirectInSameState != null) { return redirectInSameState; } else { return getRedirectOnPause(); } }
public void start(Flow flow, MutableAttributeMap<?> input) throws IllegalStateException { MockFlowSession session = new MockFlowSession(flow, input); if (getFlowExecutionContext().isActive()) { session.setParent(getFlowExecutionContext().getActiveSession()); } getMockFlowExecutionContext().setActiveSession(session); flow.start(this, input); }