Class OrderTransitionResult
dw.order
Class OrderTransitionResult
Object
dw.order.OrderTransitionResult
Read-only result of OrderMgr.attemptOrderTransition(Order).

getCompleted() and getRemaining() preserve lifecycle order and partition the applicable steps. getExecuted() contains only applicable steps invoked by the current request. Progress reflects the steps currently applicable for the installed Commerce Apps and the order's current state. A final result requires no further processing in this invocation. Final results include successful placement, a domain failure that transitions the order to FAILED, and no attempt when the order is not in CREATED status. For a FAILED order, getBasket() returns the reopened basket, or null when the underlying operation did not reopen a basket.

Constants
REASON_ORDER_NOT_CREATED  :  String = "order_not_created"
Stable reason indicating that no transition was attempted because the order is not in CREATED status.
STEP_FRAUD  :  String = "fraud"
Post-payment fraud lifecycle step identifier.
STEP_GIFT_CARD  :  String = "giftcard"
Gift-card capture lifecycle step identifier.
STEP_PAYMENT  :  String = "payment"
Payment-app processing lifecycle step identifier.
Properties
basket  :  Basket  (Read Only)
The reopened basket for a FAILED order, or null when the underlying operation did not reopen a basket (for example the basket was already removed or the open-basket limit was reached) or no domain failure occurred. BasketMgr.getCurrentBasket() returns this basket only when it remains the session's current basket; otherwise callers should use this return value.
completed  :  String[]  (Read Only)
error  :  boolean  (Read Only)
Whether this terminal result represents a domain failure that transitioned the order to FAILED. Unexpected provider or infrastructure exceptions are not represented as soft results; they propagate. When true, getStep() identifies the failed lifecycle step, or is null for placement failure.
executed  :  String[]  (Read Only)
final  :  boolean  (Read Only)
reason  :  String  (Read Only)
remaining  :  String[]  (Read Only)
step  :  String  (Read Only)
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getBasket() : Basket
The reopened basket for a FAILED order, or null when the underlying operation did not reopen a basket (for example the basket was already removed or the open-basket limit was reached) or no domain failure occurred.
isError() : boolean
Whether this terminal result represents a domain failure that transitioned the order to FAILED.
isFinal() : boolean
Method Detail
getBasket
getBasket() : Basket
The reopened basket for a FAILED order, or null when the underlying operation did not reopen a basket (for example the basket was already removed or the open-basket limit was reached) or no domain failure occurred. BasketMgr.getCurrentBasket() returns this basket only when it remains the session's current basket; otherwise callers should use this return value.
Returns:
the reopened basket, or null if none

getCompleted
getCompleted() : String[]
Returns:
applicable steps already completed, in lifecycle order

getExecuted
getExecuted() : String[]
Returns:
applicable steps invoked during this request, in lifecycle order

getReason
getReason() : String
Returns:
a stable non-error terminal reason, or null when not applicable

getRemaining
getRemaining() : String[]
Returns:
applicable steps not completed, including the stopped step, in lifecycle order

getStep
getStep() : String
Returns:
the pending or failed step, or null for terminal success, placement FAILED, or no applicable pending step

isError
isError() : boolean
Whether this terminal result represents a domain failure that transitioned the order to FAILED. Unexpected provider or infrastructure exceptions are not represented as soft results; they propagate. When true, getStep() identifies the failed lifecycle step, or is null for placement failure.
Returns:
true if this terminal result is a domain failure that transitioned the order to FAILED

isFinal
isFinal() : boolean
Returns:
whether no further processing is required in this invocation