/** * Creates a new mock flow execution context for the specified active flow session. */ public MockFlowExecutionContext(FlowSession flowSession) { setActiveSession(flowSession); this.flow = flowSession.getDefinition(); }
/** * Sets the active flow session of the executing flow associated with this request. This will influence * {@link #getActiveFlow()} and {@link #getCurrentState()}, as well as {@link #getFlowScope()} and * {@link #getFlashScope()}. */ public void setActiveSession(FlowSession flowSession) { getMockFlowExecutionContext().setActiveSession(flowSession); }
/** * Creates a new mock flow execution context -- automatically installs a root flow definition and active flow * session. */ public MockFlowExecutionContext() { setActiveSession(new MockFlowSession()); this.flow = activeSession.getDefinition(); }
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 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)); } }
/** * Sets the active flow session of the executing flow associated with this request. This will influence * {@link #getActiveFlow()} and {@link #getCurrentState()}, as well as {@link #getFlowScope()} and * {@link #getFlashScope()}. */ public void setActiveSession(FlowSession flowSession) { getMockFlowExecutionContext().setActiveSession(flowSession); }
/** * Creates a new mock flow execution context for the specified active flow session. */ public MockFlowExecutionContext(FlowSession flowSession) { setActiveSession(flowSession); this.flow = flowSession.getDefinition(); }
/** * Creates a new mock flow execution context for the specified active flow session. */ public MockFlowExecutionContext(FlowSession flowSession) { setActiveSession(flowSession); this.flow = flowSession.getDefinition(); }
/** * Sets the active flow session of the executing flow associated with this request. This will influence * {@link #getActiveFlow()} and {@link #getCurrentState()}, as well as {@link #getFlowScope()} and * {@link #getFlashScope()}. */ public void setActiveSession(FlowSession flowSession) { getMockFlowExecutionContext().setActiveSession(flowSession); }
/** * Sets the active flow session of the executing flow associated with this request. This will influence * {@link #getActiveFlow()} and {@link #getCurrentState()}, as well as {@link #getFlowScope()} and * {@link #getFlashScope()}. */ public void setActiveSession(FlowSession flowSession) { getMockFlowExecutionContext().setActiveSession(flowSession); }
/** * Creates a new mock flow execution context -- automatically installs a root flow definition and active flow * session. */ public MockFlowExecutionContext() { setActiveSession(new MockFlowSession()); this.flow = activeSession.getDefinition(); }
/** * Creates a new mock flow execution context -- automatically installs a root flow definition and active flow * session. */ public MockFlowExecutionContext() { setActiveSession(new MockFlowSession()); this.flow = activeSession.getDefinition(); }
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 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 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 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)); } }