The entire cloning process is facilitated by a pair of pipeline chains, which are defined in the /atg/commerce/commercepipeline.xml file:

These two chains are executed based on the state of the order. For example, different chains could be defined for handling orders in different states. Commerce provides one set of chains for handling all orders in a submitted state as defined by the submitted order states configured in CSRAgentTools. These two chains can be modified using standard configuration override techniques.

When clone editing orders, the orders are copied into a transient state for the edit process, and any changes applied by initial pricing operations on the order are not immediately saved to the repository. This maintains the integrity of the original order.

The CloneEditManager component contains the configuration for mapping order states to the chain names using the initializeEditChains and reconcileOrderChains properties. The following describes each link in the two chains.

Chain: initSubmittedOrderEdit – executed at the start of the edit process:

Link

Processor Component

Description

cloneOrderForEdit

/atg/commerce/custsvc/
order/edit/processor/
CloneOrderForEdit

Performs the cloning of the order at the repository level and creates the Commerce objects from the newly created order item by calling loadOrder.

validateCloneForEdit

/atg/commerce/custsvc/
order/edit/processor/
ValidateCloneForEdit

Validates the clone order after it has been created.

initializeCloneEdit
State

/atg/commerce/custsvc/
order/edit/processor/
InitializeCloneEdit
State

Initializes a state object based on the two orders, which is used to later reconcile the changes back to the original order.

setOriginalOrder
PromotionCounts

/atg/commerce/custsvc/
order/edit/processor/
SetOriginalOrder
PromotionCounts

Stores the original promotion counts in the clone edit state so that they can be compared to the promotion counts after applying updates. Changes in the promotion count are used to identify the promotions to consume.

saveCouponTracking

/atg/commerce/custsvc/
order/edit/processor/
SaveCouponTracking

Saves coupon tracking meta-data in the clone edit state so that it can be restored after applying updates in reconciliation.

Chain: reconcileSubmittedOrder – execute to reconcile the changes with the original order:

Link

Processor Component

Description

initialize
Reconcilitation

/atg/commerce/custsvc/
order/edit/processor/
Initialize
Reconciliation

Prepares the state object for reconciliation.

applyChanges

/atg/commerce/custsvc/
order/edit/processor/
ApplyChanges

Copies the changes to the original order based on the contents of the clone order and information stored in the clone edit state object created in the initialization pipeline.

executeValidate
OriginalOrder

/atg/commerce/order/
processor/Execute
ValidateForCheckout
Chain

Executes the core commerce process that validates the original order for checkout.

removeEmptyShipping
GroupsFromOriginal

/atg/commerce/order/
processor/RemoveEmpty
ShippingGroups

Executes the core commerce process that removes empty shipping groups from the original order.

removeEmptyPayment
GroupsFromOriginal

/atg/commerce/order/
processor/RemoveEmpty
PaymentGroups

Executes the core commerce process that removes empty payment groups from the original order.

createImplicit
RelationshipsFor
Original

/atg/commerce/order/
processor/
CreateImplicit
Relationships

Executes the core commerce process that creates implied relationships between commerce objects in the original order.

setPaymentGroup
AmountsOnOriginal

/atg/commerce/order/
processor/SetPayment
GroupAmount

Executes the core commerce process that sets the amount of the payment groups based on relationship in the original order.

authorizePayment
Groups

/atg/commerce/custsvc/
order/edit/processor/
AuthorizePaymentGroups

Executes a process that adjusts for the authorized amounts of the payment groups in the original. For example, new payment groups are authorized and changed payment groups have their authorized amounts adjusted.

restoreCoupon
References

/atg/commerce/custsv/
order/edit/processor/
RestoreCouponReferences

Restores the original coupon references on the pricing adjustments using the meta-data saved in the clone edit during initialization.

updateAdjustments
WithCouponOn
Original

/atg/commerce/order/
processor/Update
AdjustmentsWithCoupon

Updates the coupon references on the pricing adjustments for any new coupons that were claimed during the update.

updateOriginal
Order

/atg/commerce/order/
processor/UpdateOrder

Calls updateOrder on the original order.

reconcileGiftlist
Repository

/atg/commerce/custsvc/
order/edit/processor/
ReconcileGiftList
Repository

Reconciles gift list quantities for changes made to the original order.

consumePromotions

/atg/commerce/custsvc/
order/edit/processor/
ConsumePromotions

Consumes coupon promotions that may have been claimed and used during the edit process.

sendCouponPromotion
UsedMessages

/atg/commerce/custsvc/
order/edit/processor/
SendCouponPromotion
UsedMessages

Sends the core commerce PromotionUsed JMS event for each consumed promotion identified by the previous processor.

sendFulfillment
Notifications

/atg/commerce/custsvc/
order/edit/processor/
SendFulfillment
Notifications

Sends fulfillment JMS events for each change applied to the original order.

sendAgentEvents

/atg/commerce/custsvc/
order/edit/processor/
SendAgentEvents

Sends agent audit events for each change made to the original order.

Submitted Orders and Clone Editing

When an agent selects an order that is considered modifiable, Commerce Service Center makes a copy of that order when it is considered to be in a clone edit state.

Because the order is copied into a transient state for the edit process, the changes applied by initial pricing operations on the order are not immediately saved to the repository. They are only saved if the agent completes the post-submit checkout of the order.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices