New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ConversationManagers easier to subclass [SWF-756] #247
Comments
!!Use pwebb rather than philw commented A hook factory method on ConversationContainer to create the ContainedConversation would also be helpful. As would access to the conversations list. |
!!Use pwebb rather than philw commented Attached a patch |
!!Use pwebb rather than philw commented OK, sorry about the rambling nature of this issue, I should have thought about this a bit more before I started typing. I have an updated patch, but perhaps I should try to explain what I am doing then the suggested changes will make a bit more sense. I have the requirement to allow users to save their current flows without completing them and restore them again later. The saved flows will be stored to a database linked to a user ID. When the user returns and logs in they can restore any previously saved flows. They way I intend to implement this is to subclass DefaultFlowExecutionRepository and provide additional load/save methods. The save method gets the specified flow and saves the Conversation and FlowExecution. I remove the "flowExecutionSnapshotGroup" from the conversation before it is saved as I only need the current snapshot. The load method creates a new flow execution key then restores the conversation. The problem now is that the conversation is not linked to a manager. What I need to do is rebind the conversation to the existing conversation manager along with the newly generated conversation id. As I am working with SessionBindingConversationManager I currently have no way of implementing the rebind functionality without a lot copy/paste code. If the conversation.impl package could be updated with the following changes I
Obviously you might be deliberately keeping these classes package scope to prevent subclassing. Perhaps these classes are just too likely to change to be made public. |
!!Use pwebb rather than philw commented Updated patch (ignore the older one) |
Donnchadh O Donnabhain commented It would be really nice if createConversationContainer returned a public type since the comment in the source code indicates that it is a hook function. |
Donnchadh O Donnabhain commented #247 looks like it would be relevant to the use case mentioned above. |
Donnchadh O Donnabhain commented Any news on this. Any chance of getting it scheduled? Making |
Phil Webb commented I have scheduled this for 2.4 |
Phil Webb commented I have increased the visibility of several conversation scope classes [1]. Can you let me know if I missed anything that you need? I did not change the existing I will mark this JIRA as resolved for now; but feel free to re-open or submit additional pull requests as appropriate. Cheers, [1] 6f6e062 |
Donnchadh O Donnabhain commented Hi Phil, that helps a lot. I would have liked |
Phil Webb commented Donnchadh O Donnabhain, Thanks for the feedback! |
!!Use pwebb rather than philw opened SWF-756 and commented
Could you consider changing the package scoped ConversationContainer and ContainedConversation classes in org.springframework.webflow.conversation.impl to be public?
I would like to override SessionBindingConversationManager, there is a hook method called createConversationContainer but because the return type is not public I cannot override it.
Affects: 2.0.2
Attachments:
2 votes, 3 watchers
The text was updated successfully, but these errors were encountered: