A context for a single request to manipulate a flow execution. Allows Web
Flow users to access contextual information about the executing request, as
well as the governing
RequestContext.getFlowExecutionContext() active flow execution .
The term request is used to describe a single call (thread) into the
flow system by an external actor to manipulate exactly one flow execution.
A new instance of this object is typically created when one of the core
operations supported by a flow execution is invoked, either
start to launch the flow execution, signalEvent
to resume the flow execution, or refresh to reconstitute the
flow execution's last view selection for purposes of reissuing a user
response.
Once created this context object is passed around throughout flow execution
request processing where it may be accessed and reasoned upon by SWF-internal
artifacts such as states, user-implemented action code, and state transition
criteria.
When a call into a flow execution returns this object goes out of scope and
is disposed of automatically. Thus a request context is an internal artifact
used within a FlowExecution: this object is not exposed to external client
code, e.g. a view implementation (JSP).
The
RequestContext.getRequestScope() requestScope property may be used as a store
for arbitrary data that should exist for the life of this object.
Request-scoped data, along with all data in
RequestContext.getFlashScope() flash scope ,
RequestContext.getFlowScope() flow scope and
RequestContext.getConversationScope() conversation scope is available for exposing
to view templates via a
RequestContext.getModel() model property.
The web flow system will ensure that a RequestContext object is local to the
current thread. It can be safely manipulated without needing to worry about
concurrent access.
Note: this request context is in no way linked to an HTTP or Portlet request.
It uses the familiar "request" naming convention to indicate a single call to
manipulate a runtime execution of a flow definition.
author: Keith Donald author: Erwin Vervaet |