Web stream exception Exception: stream execution snapshot not found with id '1'

I get below exceptions when I switch one state to another more than 15 times in the web stream.

No flow execution snapshot could be found with id '1'; perhaps the snapshot has been removed? . Stacktrace follows:
org.springframework.webflow.execution.repository.FlowExecutionRestorationFailureException: A problem occurred restoring the flow execution with key 'e7s1'
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.webflow.execution.repository.snapshot.SnapshotNotFoundException: No flow execution snapshot could be found with id '1'; perhaps the snapshot has been removed? 
... 3 more

I am using grails webflow plugin.

Does anyone have any idea why this is happening and how to resolve it?

+4
source share
3 answers

Thanks for the help. But I am using the grails application. I fixed it using the following code.

DefaultFlowExecutionRepository defaultFlowExecutionRepository=(DefaultFlowExecutionRepository)Holders.applicationContext.getBean('flowExecutionRepository');
defaultFlowExecutionRepository.setMaxSnapshots(100)
-1
source

Web- Executions ( "e7" ) ( "s1" ) . , . , 15, Execution "e7" 15 . "e7s16", "s1" , , .

<webflow:flow-execution-repository>:

<!-- Executes flows: the entry point into the Spring Web Flow system -->
<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
    <webflow:flow-execution-repository max-execution-snapshots="20" max-executions="2"/>
</webflow:flow-executor>

:

max-execution-snapshots, , . snapshotting, 0. , -1.

, , , , . , , -, - , .

( HttpSession , , .)

+8

For newer versions of SpringWebflow, as shown here:

https://docs.spring.io/spring-webflow/docs/2.4.4.RELEASE/reference/html/system-setup.html#tuning-flow-execution-repository

You can simply write this in your java configuration code:

@Bean
public FlowExecutor flowExecutor() {
    return getFlowExecutorBuilder(flowRegistry())
            .setMaxFlowExecutions(5)
            .setMaxFlowExecutionSnapshots(30)
            .build();
}

If you want to keep infinite snapshot version values, simply set maxFlorExecutionSnapshots to -1. A.

0
source

Source: https://habr.com/ru/post/1545178/


All Articles