org.springframework.webflow.execution
Interface FlowExecutionContext

All Known Subinterfaces:
FlowExecution
All Known Implementing Classes:
FlowExecutionImpl, MockFlowExecutionContext

public interface FlowExecutionContext

Provides contextual information about a flow execution. A flow execution is an runnable instance of a FlowDefinition. In other words, it is the central Spring Web Flow construct for carrying out a conversation with a client. This immutable interface provides access to runtime information about the conversation, such as it's status and current state.

An object implementing this interface is also traversable from a execution request context (see RequestContext.getFlowExecutionContext()).

This interface provides information that may span more than one request in a thread safe manner. The RequestContext interface defines a request specific control interface for manipulating exactly one flow execution locally from exactly one request.

Author:
Keith Donald, Erwin Vervaet
See Also:
FlowDefinition, FlowSession, RequestContext

Method Summary
 FlowSession getActiveSession()
          Returns the active flow session of this flow execution.
 AttributeMap getAttributes()
          Returns runtime execution attributes that may influence the behavior of flow artifacts, such as states and actions.
 MutableAttributeMap getConversationScope()
          Returns a mutable map for data held in "conversation scope".
 FlowDefinition getDefinition()
          Returns the root flow definition associated with this executing flow.
 boolean isActive()
          Is the flow execution active?
 

Method Detail

getDefinition

FlowDefinition getDefinition()
Returns the root flow definition associated with this executing flow.

A call to this method always returns the same flow definition -- the top-level "root" -- no matter what flow may actually be active (for example, if subflows have been spawned).

Returns:
the root flow definition

isActive

boolean isActive()
Is the flow execution active?

All methods on an active flow execution context can be called successfully. If the flow execution is not active, a caller cannot access some methods such as getActiveSession().

Returns:
true if active, false if the flow execution has terminated

getActiveSession

FlowSession getActiveSession()
                             throws java.lang.IllegalStateException
Returns the active flow session of this flow execution. The active flow session is the currently executing session -- it may be the "root flow" session, or it may be a subflow session if this flow execution has spawned a subflow.

Returns:
the active flow session
Throws:
java.lang.IllegalStateException - if this flow execution has not been started at all or if this execution has ended and is no longer actively executing

getConversationScope

MutableAttributeMap getConversationScope()
Returns a mutable map for data held in "conversation scope". Conversation scope is a data structure that exists for the life of this flow execution and is accessible to all flow sessions.

Returns:
conversation scope

getAttributes

AttributeMap getAttributes()
Returns runtime execution attributes that may influence the behavior of flow artifacts, such as states and actions.

Returns:
execution attributes


Copyright © 2004-2007. All Rights Reserved.