The following servlet beans and form handlers are used for approving orders.
Find Pending Approvals Droplet Servlet Bean
Returns all approval items for the given approvalType
with a state of PENDING. If no approvalType
is provided, all approvalTypes
are returned.
Class |
|
---|---|
Components |
|
The FindPendingApprovalsDroplet
contains the following:
Input Parameters:
approvalType
– Looks for items that are pendingelementName
– The name of the return element
Oparams:
output
– if an order has any appeasementsempty
– if there are no appeasements
Output Parameters
element
– the total appeasements for the order
Get Total Approvals For State Droplet Servlet Bean
This servlet bean queries the approvals repository and returns the total number of results for a given type of approval.
Class |
|
---|---|
Components |
|
The GetTotalPendingOrderApprovalsDroplet
contains the following:
Input Parameters
elementName
– The name of the return element
Oparams
output
– if an order has any appeasementsempty
– if there are no appeasements
Output Parameters
element
– the total appeasements for the order
Is Order Pending Approval Droplet Servlet Bean
This servlet bean determines if an order is currently pending approval and returns the approval ID that is associated with the order.
The servlet bean is used on confirmation pages to determine if an order emerged from the submission process in a PENDING approval state. It is also used on the Order View page to determine if “Approve” or “Reject” elements should appear.
Class |
|
---|---|
Components |
|
The IsOrderPendingApprovalDroplet
contains the following:
Input Parameters
orderId
elementName
– The name of the return element
Oparams
true
– if an approval is found for the orderfalse
– If no approval is found for the ordererror
– If an error occurred while looking up the approval
Output Parameters
element
– If found, the approval item for the order.
The following is an example of the droplet:
<dsp:droplet name="/atg/commerce/custsvc/approvals/order/IsOrderPendingApproval"> <dsp:param name="orderId" value="orderId"> <dsp:oparam name="output"> <dsp:valueof param="element"/> </dsp:oparam> </dsp:droplet>
Get Total Order Appeasements Droplet Servlet Bean
This servlet bean determines if an order has any appeasements applied to it, and returns the total number of appeasements if any are found.
Class |
|
---|---|
Components |
|
The GetTotalOrderAppeasementDroplet
contains the following:
Input Parameters
order
– The ID of the orderelementName
– The name of the return element
Oparams
output
– if an order has any appeasementsempty
– if there are no appeasements
Output Parameters
element
– the total appeasements for the order
For example:
<dsp:droplet name="/atg/commerce/custsvc/approvals/order/ GetTotalOrderAppeasements"> <dsp:param name="order" value="order"> <dsp:oparam name="output"> <dsp:valueof param="element"/> </dsp:oparam> </dsp:droplet>
Order Approval Form Handler
The OrderApprovalFormHandler
generates the order approval within the UI and extends the EnvironmentChangeFormHandler
. This form handler provides handlers for both approving and rejecting an approval request. It also contains e-mail templates for approvals and rejections.
Form Handler |
|
---|---|
Components |
|
Approval Repository Query Form Handler
The ApprovalRepositoryQueryFormHandler
finds approvals of a specified state and type. It handles the search request from the UI and returns a list of search results, as well as handles paging of the search results. This form handler extends the RepositoryQueryTableFormHandler
.
Form Handler |
|
---|---|
Components |
|
Update Order Approval Customer Email Form Handler
The UpdateOrderApprovalCustomerEmailFormHandler
updates the customer e-mail address on an order approval object.
Form Handler |
|
---|---|
Components |
|
For more information on Commerce Service Center specific Gift List form handlers, refer to the ATG API Reference for Commerce Service Center.