|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FlowExecution
A top-level instance of a flow definition that carries out definition execution on behalf of a single client. Typically used to support the orchestration of a web conversation.
This is the central facade interface for manipulating one runtime execution of a flow definition. Implementations of this interface are the finite state machine that is the heart of Spring Web Flow.
Typically, when a client wants to launch a flow execution at production time,
she passes the id of the governing flow definition to
a coordinating
flow executor.
This coordinator then typically uses a
flow execution factory to create an object
implementing this interface, initializing it with the requested flow
definition which becomes the execution's "root" or top-level flow.
After execution creation, the
start operation is
called, which causes this execution to activate a new
session for its root flow definition. That session is
then said to become the active flow. An execution
request context is created, the Flow's
start state is entered, and the
request is processed.
In a distributed environment such as HTTP, after a call into this object has
completed and control returns to the caller, this execution object (if still
active) is typically saved out to a repository before the server request
ends. For example it might be saved out to the HttpSession, a Database, or a
client-side hidden form field for later restoration and manipulation. This
execution persistence is the responsibility of the
flow execution repository
subsystem.
Subsequent requests from the client to manipuate this flow execution trigger
restoration of this object, followed by an invocation of the
signal event operation. The
signalEvent operation resumes this execution by indicating what action the
user took from within the current state; for example, the user may have
pressed the "submit" button, or pressed "cancel". After the user
event is processed, control again goes back to the caller and if this
execution is still active, it is again saved out to the repository.
This process continues until a client event causes this flow execution to end (by the root flow reaching an end state). At that time this object is no longer active, and is removed from the repository and discarded.
Flow executions can have their lifecycle observed by listeners.
FlowDefinition,
FlowSession,
RequestContext,
FlowExecutionListener,
FlowExecutionRepository,
FlowExecutor| Method Summary | |
|---|---|
ViewSelection |
refresh(ExternalContext context)
Refresh this flow execution, asking the current view selection to be reconstituted to support reissuing the last response. |
ViewSelection |
signalEvent(java.lang.String eventId,
ExternalContext context)
Signal an occurrence of the specified user event in the current state of this executing flow. |
ViewSelection |
start(MutableAttributeMap input,
ExternalContext context)
Start this flow execution, transitioning it to the root flow's start state and returning the starting view selection needed to issue an initial user response. |
| Methods inherited from interface org.springframework.webflow.execution.FlowExecutionContext |
|---|
getActiveSession, getAttributes, getConversationScope, getDefinition, isActive |
| Method Detail |
|---|
ViewSelection start(MutableAttributeMap input,
ExternalContext context)
throws FlowExecutionException
This will start the entire flow execution from scratch.
input - input attributes to pass to the flow, which the flow may
choose to map into its scopecontext - the external context in which the starting event occured
FlowExecutionException - if an exception was thrown within a state
of the flow execution during request processing
ViewSelection signalEvent(java.lang.String eventId,
ExternalContext context)
throws FlowExecutionException
eventId - the identifier of the user event that occuredcontext - the external context in which the event occured
FlowExecutionException - if an exception was thrown within a state
of the resumed flow execution during event processing
ViewSelection refresh(ExternalContext context)
throws FlowExecutionException
context - the externa context in which the refresh event occured
FlowExecutionException - if an exception was thrown within a state
of the resumed flow execution during event processing
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||