Class FlowExecutorImpl
java.lang.Object
org.springframework.webflow.executor.FlowExecutorImpl
- All Implemented Interfaces:
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.
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 Summary
ConstructorDescriptionFlowExecutorImpl
(FlowDefinitionLocator definitionLocator, FlowExecutionFactory executionFactory, FlowExecutionRepository executionRepository) Create a new flow executor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the locator to load flow definitions to execute.Returns the abstract factory used to create new executions of a flow.Returns the repository used to save, update, and load existing flow executions to/from a persistent store.launchExecution
(String flowId, MutableAttributeMap<?> input, ExternalContext context) Launch a new execution of the flow with the provided id.resumeExecution
(String flowExecutionKey, ExternalContext context) Resume the flow execution with the provided execution key.
-
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 executeexecutionFactory
- the factory for creating executions of flow definitionsexecutionRepository
- the repository for persisting paused flow executions
-
-
Method Details
-
getDefinitionLocator
Returns the locator to load flow definitions to execute. -
getExecutionFactory
Returns the abstract factory used to create new executions of a flow. -
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 interfaceFlowExecutor
- 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 interfaceFlowExecutor
- Parameters:
flowExecutionKey
- the key of a paused execution of the flow definitioncontext
- access to the calling environment- Throws:
FlowException
-