Approval Engine

The approval engine uses the IApproval adapter to determine whether an ApprovalBatch requires (further) approval, given the batch and the user who submitted the batch, and if so, who should approve the batch next.

Approval Handlers

ApprovalHandler is a strategy object used to handle the approval process for different types of approval batches. There are concrete instances for batches of reserves and batches of payments. Adding a new ApprovalBatch subtype requires adding a new ApprovalHandler implementation and updating the factory method in ApprovalHandler.

Approval Sums

The other group of classes contained in this package are used by the standard ("internal") approval adapter, which uses the AuthorityLimit entity to check the batch against the limits assigned to the user. AuthoritySum is an interface that describes a function for comparing an approval batch against an authority limit by calculating a particular kind of sum, indicated by the authority limit type. (See the method in ApprovalEngine for obtaining the sum for a particular limit type.) Currently those sums include: To add a new sum type, add a new AuthorityLimitType typekey to tl_financial.xml, a new AuthoritySum implementation that calculates the sum, and update the StandardApprovalEngine to map the new limit type to the new authority sum.