Interface FlowSession

All Known Implementing Classes:
MockFlowSession

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.

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.

Author:
Keith Donald, Erwin Vervaet
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the flow definition backing this session.
    Returns the parent flow session in the current flow execution, or null if there is no parent flow session.
    Return this session's local attributes; the basis for "flow scope" (flow session scope).
    Returns the current state of this flow session.
    Returns a mutable map for data held in "view scope".
    boolean
    Returns true if the flow session was started in embedded page mode.
    boolean
    Returns whether this flow session is the root flow session in the ongoing flow execution.
  • Method Details

    • getDefinition

      FlowDefinition getDefinition()
      Returns the flow definition backing this session.
    • getState

      StateDefinition getState()
      Returns the current state of this flow session. This value changes as the flow executes.
    • getScope

      Return this session's local attributes; the basis for "flow scope" (flow session scope).
      Returns:
      the flow scope attributes
    • getViewScope

      Returns a mutable map for data held in "view scope". Attributes in this map are cleared out when the current view state exits.
      Returns:
      view scope
      Throws:
      IllegalStateException - if this flow session is not currently in a view state
    • isEmbeddedMode

      boolean isEmbeddedMode()
      Returns true if the flow session was started in embedded page mode. An embedded flow can make different assumptions with regards to whether redirect after post is necessary.
    • getParent

      FlowSession getParent()
      Returns the parent flow session in the current flow execution, or null if there is no parent flow session.
    • isRoot

      boolean isRoot()
      Returns whether this flow session is the root flow session in the ongoing flow execution. The root flow session does not have a parent flow session.