Most of the ATG 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 form handler that works with Order objects. This transaction management pattern is implemented through the form handler’s beforeSet, afterSet, and handler methods.

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 ATG 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 <ATG9dir>\DCS\src\Java\atg\commerce\order\purchase and refer to the ATG API Reference.

loading table of contents...