Class FlowExecutorBuilder

java.lang.Object
org.springframework.webflow.config.FlowExecutorBuilder

public class FlowExecutorBuilder extends Object
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 Details

    • FlowExecutorBuilder

      public FlowExecutorBuilder(FlowDefinitionLocator flowRegistry)
    • FlowExecutorBuilder

      public FlowExecutorBuilder(FlowDefinitionLocator flowRegistry, org.springframework.context.ApplicationContext applicationContext)
      Deprecated.
      as of 2.5 an ApplicationContext is no longer required
      Create a new instance with the given flow registry and ApplicationContext.
      Parameters:
      flowRegistry - the flow registry that will locate flow definitions
      applicationContext - the Spring ApplicationContext
  • Method Details

    • setMaxFlowExecutions

      public FlowExecutorBuilder setMaxFlowExecutions(int maxFlowExecutions)
      Set the maximum number of allowed flow executions per user.
      Parameters:
      maxFlowExecutions - the max flow executions
    • setMaxFlowExecutionSnapshots

      public FlowExecutorBuilder setMaxFlowExecutionSnapshots(int maxFlowExecutionSnapshots)
      Set the maximum number of history snapshots allowed per flow execution.
      Parameters:
      maxFlowExecutionSnapshots - the max flow execution snapshots
    • setAlwaysRedirectOnPause

      public FlowExecutorBuilder setAlwaysRedirectOnPause(boolean redirectOnPause)
      Whether flow executions should redirect after they pause before rendering.
      Parameters:
      redirectOnPause - whether to redirect or not
    • setRedirectInSameState

      public FlowExecutorBuilder setRedirectInSameState(boolean redirectInSameState)
      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

      public FlowExecutorBuilder addFlowExecutionAttribute(String name, Object value)
      Add a single flow execution meta attribute.
      Parameters:
      name - the attribute name
      value - the attribute value
    • addFlowExecutionListener

      public FlowExecutorBuilder addFlowExecutionListener(FlowExecutionListener listener)
      Register a FlowExecutionListener 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 a FlowExecutionListener that observes the lifecycle of flow executions launched by this executor.
      Parameters:
      listener - the listener to be registered
      criteria - the criteria that determines the flow definitions a listener should observe, delimited by commas or '*' for "all". Example: 'flow1,flow2,flow3'.
    • setConversationManager

      public FlowExecutorBuilder 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.. Note that when this attribute is provided, the "max-execution-snapshots" attribute is meaningless.
      Parameters:
      conversationManager - the ConversationManager instance to use
    • build

      public FlowExecutor build()
      Create and return a FlowExecutor instance.