Most of the Oracle ATG Web Commerce form handlers extend atg.commerce.order.purchase.PurchaseProcessFormHandler. This form handler, which is a subclass of atg.droplet.GenericFormHander, is an abstract class which implements a transaction management pattern that should be followed by any custom form handlers. This transaction management pattern is implemented through the form handler’s beforeSet, afterSet, and handler methods provided as part of the Commerce form handlers.

beforeSet Method

This method is called once before any form handler property is set or handler method is called. It implements the following transactional steps:

Handler Methods

The handler methods implement the following transactions steps:

afterSet Method

This method is called once after all form handler processing is completed. It implements the following transactional steps:

If you’re extending an Oracle ATG Web Commerce form handler and your code makes its own decisions about errors, you can mark a transaction for rollback by calling the setTransactionToRollbackOnly method.

For more information on PurchaseProcessFormHandler and its subclasses, you can examine the source files at <ATG10dir>\DCS\src\Java\atg\commerce\order\purchase and refer to the ATG Platform API Reference.