Dashboard > RIFE > ... > Web engine > Fine-grained control over continuation trees and their invalidation
RIFE Log In | Sign Up   View a printable version of the current page.
Fine-grained control over continuation trees and their invalidation


Added by Geert Bevin, last edited by Geert Bevin on Jul 31, 2006
Labels: 
(None)

Continuations are perfect for expressing a transactional multi-step process that either fully completes, or not at all. At completion however, you most of the time have the requirement that the same process should not be able to be completed a second time (when a user re-submits the final form, for example a payment, this should not be accepted). It's now very easy to achieve this by using continuations by simply removing the entire continuation tree. This means that when the user re-submits, the corresponding continuation will not be found and instead of resuming at a previously paused location, the execution will jump back all the way to the initial step of the multi-step process.

The get access to the active continuation context and remove the associated continuation tree, you can use this simple call:

ContinuationContext.getActiveContext().removeContextTree();

Additional useful methods are available in the ContinuationContext class and allow you to introspect and manipulate the continuation hierarchy.



Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators