public class FlowExecutorImpl extends java.lang.Object implements FlowExecutor
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 |
FlowDefinitionLocator
,
FlowExecutionFactory
,
FlowExecutionRepository
Constructor and Description |
---|
FlowExecutorImpl(FlowDefinitionLocator definitionLocator,
FlowExecutionFactory executionFactory,
FlowExecutionRepository executionRepository)
Create a new flow executor.
|
Modifier and Type | Method and Description |
---|---|
FlowDefinitionLocator |
getDefinitionLocator()
Returns the locator to load flow definitions to execute.
|
FlowExecutionFactory |
getExecutionFactory()
Returns the abstract factory used to create new executions of a flow.
|
FlowExecutionRepository |
getExecutionRepository()
Returns the repository used to save, update, and load existing flow executions to/from a persistent store.
|
FlowExecutionResult |
launchExecution(java.lang.String flowId,
MutableAttributeMap input,
ExternalContext context)
Launch a new execution of the flow with the provided id.
|
FlowExecutionResult |
resumeExecution(java.lang.String flowExecutionKey,
ExternalContext context)
Resume the flow execution with the provided execution key.
|
public FlowExecutorImpl(FlowDefinitionLocator definitionLocator, FlowExecutionFactory executionFactory, FlowExecutionRepository executionRepository)
definitionLocator
- the locator for accessing flow definitions to executeexecutionFactory
- the factory for creating executions of flow definitionsexecutionRepository
- the repository for persisting paused flow executionspublic FlowDefinitionLocator getDefinitionLocator()
public FlowExecutionFactory getExecutionFactory()
public FlowExecutionRepository getExecutionRepository()
public FlowExecutionResult launchExecution(java.lang.String flowId, MutableAttributeMap input, ExternalContext context) throws FlowException
FlowExecutor
launchExecution
in interface FlowExecutor
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)FlowException
public FlowExecutionResult resumeExecution(java.lang.String flowExecutionKey, ExternalContext context) throws FlowException
FlowExecutor
resumeExecution
in interface FlowExecutor
flowExecutionKey
- the key of a paused execution of the flow definitioncontext
- access to the calling environmentFlowException