Comments (5)
Erwin Vervaet commented
It would indeed be very nice to have an 'expired' event that is signaled to the listeners when a flow execution expires.
However, there are a number of problems when implementing this:
-
Using the cleanup filter there is no guarantee when, and even if, the 'expired' event would be triggered since the user needs to do additional requests in the same HTTP session for the filter to be able to expire the flow execution.
-
When you're using a continuations based flow execution storage, you actually have multiple physical copies of the same 'logical' flow execution. This could lead to situations where you receive multiple 'expired' events for the same logical flow execution.
-
When using client side continuations, the flow execution is actually stored on the client side, so we have no way of managing expiry.
So for the time being this seems problematic to implement in a way that the behaviour would be deterministic. Does anybody have any ideas on how to tackle this elegantly?
from spring-webflow.
Erwin Vervaet commented
The cleanup filter no longer exists. The execution repository subsystem uses a conversation manager to store state associated with a logical conversation between the user and the server. It's the conversation manager that's responsible for expiring the state (data) it manages.
So the first bullet in my previous remark is no longer a concern: the conversation manager has full control over how and when it decides to expire flow executions. The current implementations use HTTP session expiry.
The second and the third bullet are also no longer a problem since the there might be multiple flow executions that are all part of the same logical conversation and its the conversation that expires. The conversation is always managed centrally on the server so no problem there.
One thing to keep in mind is what this would given in a clustered environment.
from spring-webflow.
Erwin Vervaet commented
This issue can be investigated in the context of the revision of the conversation package implementation.
from spring-webflow.
Erwin Vervaet commented
For the time being we're not planning on making drastic enhancements to the simple SessionBindingConversationManager that's currently included in the SWF distribution.
Other parties can provide SWF ConversationManager implementations that provide the features discussed in this issue:
- real conversation expiry (i.e. where the ConversationManager has a thread to monitor and expire conversations)
- listener support to get notifications of conversation expiration
- ...
from spring-webflow.
Mircea Deaconu commented
In SessionBindingConversationManager:
// hooks for subclassing
protected ConversationContainer createConversationContainer() {
return new ConversationContainer(maxConversations, sessionKey);
}
but ConversationContainer is package local. So this "hook" is useless. Can anybody give an example of how to implement a ConversationManager (by subclassing SessionBindingConversationManager for instance) that does some of the above mentioned stuff (sends an expired event to the flow)?
from spring-webflow.
Related Issues (20)
- Spring Faces migration to Jakarta EE HOT 7
- Update JSF samples to Jakarta EE HOT 1
- How accept a enum value in post method? HOT 1
- No documentation published yet for SWF 3.0.0 GA HOT 6
- Running with Framework 6.2.0-SNAPSHOT gives NoSuchMethodException for parameterless action HOT 1
- Is Spring Webflow worth using? Seems dead... HOT 5
- Does CONTRIBUTING.md need updating? Broken link, references to Jira. HOT 1
- Springboot Version 2.5.12 [SWF-1754] HOT 1
- spring ws security vulnerability [SWF-1758] HOT 1
- Not possible to find out how to change the location of the message bundle used by a flow [SWF-1748] HOT 1
- SWF makes JSF's ViewState lose CSRF token characteristics [SWF-1749]
- Plans to port to Jakarta EE 9? [SWF-1750] HOT 1
- Spring boot microservice not falling back to default [SWF-1751] HOT 1
- Spring does not Throw Exception if duplicate property [SWF-1752] HOT 1
- Redundant default security when spring-security-core in the classpath [SWF-1753] HOT 2
- Spring rsocket not works properly in request Channel mode from version 2.5 of the spring framework onwards [SWF-1755] HOT 1
- Loading document with Map<String,Object> as one of field giving Basic type must not be null! [SWF-1756] HOT 1
- Compatibility with Spring Framework 6, Java 17, and Jakarta EE [SWF-1757] HOT 3
- Spring Data Redis -2.7.3 [SWF-1759] HOT 1
- Maximum cursor exceeds ORA-01000: maximum open cursors exceeded [SWF-1760] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-webflow.