|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FlowSession
A single, local instantiation of a flow definition
launched within an overall flow execution.
This object maintains all instance state including session status within exactly one governing FlowExecution, as well
as the current flow state. This object also acts as the local "flow scope" data model. Data in
flow scope
lives for the life of this object and is cleaned up automatically when this object is
destroyed. Destruction happens when this session enters an end state.
A flow session will go through several status changes during its lifecycle. Initially it will be
FlowSessionStatus.CREATED
when a new execution is started.
After passing through the FlowSessionStatus.STARTING
status, the flow session is activated (about to be
manipulated) and its status becomes FlowSessionStatus.ACTIVE
. In the case of a new execution session
activation happens immediately after creation to put the "root flow" at the top of the stack and transition it to its
start state.
When control returns to the client for user think time the status is updated to FlowSessionStatus.PAUSED
.
The flow is no longer actively processing then, as it is stored off to a repository waiting on the user to resume.
If a flow session is pushed down in the stack because a subflow is spawned, its status becomes
FlowSessionStatus.SUSPENDED
until the subflow returns (ends) and is popped off the stack. The resuming flow
session then becomes active once again.
When a flow session is terminated because an EndState is reached its status becomes FlowSessionStatus.ENDED
,
which ends its life. When this happens the session is popped off the stack and discarded, and any allocated resources
in "flow scope" are automatically cleaned up.
Note that a flow session is in no way linked to an HTTP session. It just uses the familiar "session" naming convention to denote a stateful object.
FlowDefinition
,
FlowExecution
,
FlowSessionStatus
Method Summary | |
---|---|
FlowDefinition |
getDefinition()
Returns the flow definition backing this session. |
MutableAttributeMap |
getFlashMap()
Returns the local "flash map". |
FlowSession |
getParent()
Returns the parent flow session in the current flow execution, or null if there is no parent flow
session. |
MutableAttributeMap |
getScope()
Return this session's local attributes; the basis for "flow scope" (flow session scope). |
StateDefinition |
getState()
Returns the current state of this flow session. |
FlowSessionStatus |
getStatus()
Returns the current status of this flow session. |
boolean |
isRoot()
Returns whether this flow session is the root flow session in the ongoing flow execution. |
Method Detail |
---|
FlowDefinition getDefinition()
StateDefinition getState()
FlowSessionStatus getStatus()
MutableAttributeMap getScope()
MutableAttributeMap getFlashMap()
FlowSession getParent()
null
if there is no parent flow
session.
boolean isRoot()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |