Search in sources :

Example 1 with DefaultFlowExecutionRepository

use of org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository in project cas by apereo.

the class CasWebflowContextConfiguration method flowExecutorViaServerSessionBindingExecution.

@Bean
public FlowExecutor flowExecutorViaServerSessionBindingExecution() {
    final FlowDefinitionRegistry loginFlowRegistry = loginFlowRegistry();
    final SessionBindingConversationManager conversationManager = new SessionBindingConversationManager();
    conversationManager.setLockTimeoutSeconds(Long.valueOf(casProperties.getWebflow().getSession().getLockTimeout()).intValue());
    conversationManager.setMaxConversations(casProperties.getWebflow().getSession().getMaxConversations());
    final FlowExecutionImplFactory executionFactory = new FlowExecutionImplFactory();
    final SerializedFlowExecutionSnapshotFactory flowExecutionSnapshotFactory = new SerializedFlowExecutionSnapshotFactory(executionFactory, loginFlowRegistry);
    flowExecutionSnapshotFactory.setCompress(casProperties.getWebflow().getSession().isCompress());
    final DefaultFlowExecutionRepository repository = new DefaultFlowExecutionRepository(conversationManager, flowExecutionSnapshotFactory);
    executionFactory.setExecutionKeyFactory(repository);
    return new FlowExecutorImpl(loginFlowRegistry, executionFactory, repository);
}
Also used : DefaultFlowExecutionRepository(org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository) SessionBindingConversationManager(org.springframework.webflow.conversation.impl.SessionBindingConversationManager) SerializedFlowExecutionSnapshotFactory(org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory) FlowDefinitionRegistry(org.springframework.webflow.definition.registry.FlowDefinitionRegistry) FlowExecutorImpl(org.springframework.webflow.executor.FlowExecutorImpl) FlowExecutionImplFactory(org.springframework.webflow.engine.impl.FlowExecutionImplFactory) CipherBean(org.cryptacular.bean.CipherBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

CipherBean (org.cryptacular.bean.CipherBean)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1 SessionBindingConversationManager (org.springframework.webflow.conversation.impl.SessionBindingConversationManager)1 FlowDefinitionRegistry (org.springframework.webflow.definition.registry.FlowDefinitionRegistry)1 FlowExecutionImplFactory (org.springframework.webflow.engine.impl.FlowExecutionImplFactory)1 DefaultFlowExecutionRepository (org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository)1 SerializedFlowExecutionSnapshotFactory (org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory)1 FlowExecutorImpl (org.springframework.webflow.executor.FlowExecutorImpl)1