Class FlowExecutorImpl

java.lang.Object
org.springframework.webflow.executor.FlowExecutorImpl
All Implemented Interfaces:
FlowExecutor

public class FlowExecutorImpl extends Object implements FlowExecutor
The default implementation of the central facade for driving the execution of flows within an application.

This object is responsible for creating and launching new flow executions as requested by clients, as well as resuming existing, paused executions (that were waiting to be resumed in response to a user event).

This object is a facade or entry point into the Spring Web Flow execution system and makes the overall system easier to use. The name executor was chosen as executors drive executions.

Commonly used configurable properties
name description default
definitionLocator The service locator responsible for loading flow definitions to execute. None
executionFactory The factory responsible for creating new flow executions. None
executionRepository The repository responsible for managing flow execution persistence. None
Author:
Keith Donald, Erwin Vervaet, Colin Sampaleanu
See Also:
  • Constructor Details

    • FlowExecutorImpl

      public FlowExecutorImpl(FlowDefinitionLocator definitionLocator, FlowExecutionFactory executionFactory, FlowExecutionRepository executionRepository)
      Create a new flow executor.
      Parameters:
      definitionLocator - the locator for accessing flow definitions to execute
      executionFactory - the factory for creating executions of flow definitions
      executionRepository - the repository for persisting paused flow executions
  • Method Details

    • getDefinitionLocator

      public FlowDefinitionLocator getDefinitionLocator()
      Returns the locator to load flow definitions to execute.
    • getExecutionFactory

      public FlowExecutionFactory getExecutionFactory()
      Returns the abstract factory used to create new executions of a flow.
    • getExecutionRepository

      public FlowExecutionRepository getExecutionRepository()
      Returns the repository used to save, update, and load existing flow executions to/from a persistent store.
    • launchExecution

      public FlowExecutionResult launchExecution(String flowId, MutableAttributeMap<?> input, ExternalContext context) throws FlowException
      Description copied from interface: FlowExecutor
      Launch a new execution of the flow with the provided id.
      Specified by:
      launchExecution in interface FlowExecutor
      Parameters:
      flowId - the flow definition identifier; should be unique among all top-level flow definitions (required).
      input - input to pass to the new execution on startup (optional)
      context - access to the calling environment (required)
      Throws:
      FlowException
    • resumeExecution

      public FlowExecutionResult resumeExecution(String flowExecutionKey, ExternalContext context) throws FlowException
      Description copied from interface: FlowExecutor
      Resume the flow execution with the provided execution key.
      Specified by:
      resumeExecution in interface FlowExecutor
      Parameters:
      flowExecutionKey - the key of a paused execution of the flow definition
      context - access to the calling environment
      Throws:
      FlowException