Class FlowExecutorBuilder
java.lang.Object
org.springframework.webflow.config.FlowExecutorBuilder
A builder for
FlowExecutor
instances designed for programmatic use in
@Bean
factory methods. For XML configuration consider using the
webflow-config
XML namespace.- Since:
- 2.4
- Author:
- Rossen Stoyanchev
-
Constructor Summary
ConstructorDescriptionFlowExecutorBuilder
(FlowDefinitionLocator flowRegistry) FlowExecutorBuilder
(FlowDefinitionLocator flowRegistry, org.springframework.context.ApplicationContext applicationContext) Deprecated.as of 2.5 an ApplicationContext is no longer required -
Method Summary
Modifier and TypeMethodDescriptionaddFlowExecutionAttribute
(String name, Object value) Add a single flow execution meta attribute.Register aFlowExecutionListener
that observes the lifecycle of all flow executions launched by this executor.addFlowExecutionListener
(FlowExecutionListener listener, String criteria) Register aFlowExecutionListener
that observes the lifecycle of flow executions launched by this executor.build()
Create and return aFlowExecutor
instance.setAlwaysRedirectOnPause
(boolean redirectOnPause) Whether flow executions should redirect after they pause before rendering.setConversationManager
(ConversationManager conversationManager) Set the ConversationManager implementation to use for storing conversations in the session effectively controlling how state is stored physically when a flow execution is paused..setMaxFlowExecutions
(int maxFlowExecutions) Set the maximum number of allowed flow executions per user.setMaxFlowExecutionSnapshots
(int maxFlowExecutionSnapshots) Set the maximum number of history snapshots allowed per flow execution.setRedirectInSameState
(boolean redirectInSameState) Whether flow executions redirect after they pause for transitions that remain in the same view state.
-
Constructor Details
-
FlowExecutorBuilder
-
FlowExecutorBuilder
public FlowExecutorBuilder(FlowDefinitionLocator flowRegistry, org.springframework.context.ApplicationContext applicationContext) Deprecated.as of 2.5 an ApplicationContext is no longer requiredCreate a new instance with the given flow registry and ApplicationContext.- Parameters:
flowRegistry
- the flow registry that will locate flow definitionsapplicationContext
- the Spring ApplicationContext
-
-
Method Details
-
setMaxFlowExecutions
Set the maximum number of allowed flow executions per user.- Parameters:
maxFlowExecutions
- the max flow executions
-
setMaxFlowExecutionSnapshots
Set the maximum number of history snapshots allowed per flow execution.- Parameters:
maxFlowExecutionSnapshots
- the max flow execution snapshots
-
setAlwaysRedirectOnPause
Whether flow executions should redirect after they pause before rendering.- Parameters:
redirectOnPause
- whether to redirect or not
-
setRedirectInSameState
Whether flow executions redirect after they pause for transitions that remain in the same view state. This attribute effectively overrides the value of the "always-redirect-on-pause" attribute in same state transitions.- Parameters:
redirectInSameState
- whether to redirect or not
-
addFlowExecutionAttribute
Add a single flow execution meta attribute.- Parameters:
name
- the attribute namevalue
- the attribute value
-
addFlowExecutionListener
Register aFlowExecutionListener
that observes the lifecycle of all flow executions launched by this executor.- Parameters:
listener
- the listener to be registered
-
addFlowExecutionListener
public FlowExecutorBuilder addFlowExecutionListener(FlowExecutionListener listener, String criteria) Register aFlowExecutionListener
that observes the lifecycle of flow executions launched by this executor.- Parameters:
listener
- the listener to be registeredcriteria
- the criteria that determines the flow definitions a listener should observe, delimited by commas or '*' for "all". Example: 'flow1,flow2,flow3'.
-
setConversationManager
Set the ConversationManager implementation to use for storing conversations in the session effectively controlling how state is stored physically when a flow execution is paused.. Note that when this attribute is provided, the "max-execution-snapshots" attribute is meaningless.- Parameters:
conversationManager
- the ConversationManager instance to use
-
build
Create and return aFlowExecutor
instance.
-