Order creation has been reworked completely in ICM 7.9. New order creation functionality has been built side by side with the old one to allow customers a soft migration and to support customers that want to continue using the old functionality for any reason.
Legacy pipeline-based order creation functionality includes the pipelines and Java classes listed in the following sub-chapters.
Following Manager classes are called by pipelets.
Cartridge | Class | Note |
---|---|---|
bts |
com.intershop.beehive.bts.internal.orderprocess.basket.BasketMgrImpl |
|
bts |
|
|
bc_order_orm | com.intershop.beehive.bts.capi.orderprocess.fulfillment. |
|
Following application-dependent pipelines trigger the order creation for UI and REST storefront.
Note
These pipelines are only called partly by the new order creation functionality!
Cartridge | UI/REST | Submit Order Pipeline (Application-dependent) | Overloads | Calls Order Creation Pipeline (Application-independent) | Calls After Checkout Processing Pipeline (Application-independent) |
---|---|---|---|---|---|
app_sf_responsive | UI | ViewCheckoutReview-SubmitOrder | - | bc_orderprocess/ProcessOrderCreation | bc_orderprocess/ |
app_sf_responsive_b2b | UI | ViewCheckoutReview-SubmitOrder |
| bc_orderprocess/ProcessOrderCreation |
/ProcessOrders-AfterCheckoutProcessing |
app_sf_responsive_costcenter | UI | ViewCheckoutReview-SubmitOrder |
|
|
/ProcessOrders-AfterCheckoutProcessing |
app_sf_rest | REST | ProcessOrderREST-SubmitOrder | - | app_sf_rest/ | bc_orderprocess/ |
app_sf_rest_b2b | REST | ProcessOrderREST-SubmitOrder |
| app_sf_rest/ | bc_orderprocess/ |
Following process pipelines create the order.
Note
These pipelines are not called by the new order creation functionality any longer!
Cartridge | Order Creation Pipeline | Note |
---|---|---|
bc_requisition | ProcessOrder-CreateOrders |
|
bc_orderprocess | ProcessOrders-CreateOrder |
|
bc_orderprocess | ProcessOrderCreation-CreateOrder |
|
Following Process Pipelines process after-checkout tasks.
Note
These pipelines are not called by the new order creation functionality any longer!
Cartridge | After Checkout Processing Pipeline | Note |
---|---|---|
bc_orderprocess | ProcessOrders-AfterCheckoutHandling |
|
bc_orderprocess | ProcessOrders-AfterCheckoutProcessing |
|
bc_orderprocess | ProcessOrderCreation- |
|
bc_orderprocess | ProcessOrderCreation- |
|
bc_orderprocess | ProcessOrderCreation- |
|
app_sf_responsive_b2b | ProcessOrders-AfterCheckoutProcessing |
|
Legacy order creation functionality defines following pipeline extension points.
Note
These pipeline extension points are not called by the new order creation functionality any longer!
Cartridge | Pipeline | Name |
---|---|---|
app_sf_rest | ProcessOrderREST-CreateOrder | CreateOrder |
app_sf_rest | ProcessOrderREST-CreateOrder | OrderCreated |
bc_orderprocess | ProcessOrderCreation | CreateOrder |
bc_orderprocess | ProcessOrderCreation | OrderCreated |
The Handler Chain interfaces and implementation classes are located in the bc_handler_chain cartridge. However, Handler Chain is a common concept and implementation, that is not limited to order creation. The order creation is just one use case for this pattern.
Order creation functionality defines following derived interfaces and classes:
com.intershop.component.order.capi.handlerchain.OrderCreationContext com.intershop.component.order.capi.handlerchain.OrderCreationResult
An order creation handler that should be included in the order creation chain has to be implemented like following:
public class MyOrderCreationHandler implements Handler<OrderCreationContext> { @Override public HandlerResult invoke(OrderCreationContext context) { ... // Do your own things! } }
Order creation chains are defined by component files:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <components xmlns="http://www.intershop.de/component/2010"> <instance name="OrderCreationResultFactory" with="OrderCreationResultFactory" /> <instance name="OrderCreationResultMergeStrategy" with="OrderCreationResultMergeStrategy" /> <fulfill requirement="chainDefinition" of="ChainRegistry"> <instance name="OrderCreationChainDefinition" with="ChainDefinition" scope="app"> <fulfill requirement="name" value="OrderCreationChain" /> <fulfill requirement="contextType" value="com.intershop.component.order.capi.handlerchain.OrderCreationContext" /> <fulfill requirement="resultType" value="com.intershop.component.order.capi.handlerchain.OrderCreationResult" /> <fulfill requirement="resultMergeStrategy" with="OrderCreationResultMergeStrategy" /> <fulfill requirement="chain"> <!-- Sub-chain for preparing the order creation. That includes the validation of the basket, performing approval workflow (if needed) and handling of recurring orders. --> <instance name="PreOrderCreationChain" with="Chain" scope="app">> <fulfill requirement="name" value="PreOrderCreationChain" /> <fulfill requirement="behaviorOnFailure" value="ROLLBACK" /> <fulfill requirement="transactional" value="false" /> <fulfill requirement="resultFactory" with="OrderCreationResultFactory" /> </instance> <!-- Core order creation and enrichment functionality --> <instance name="OrderCreationChain" with="Chain" scope="app">> <fulfill requirement="name" value="OrderCreationChain" /> <fulfill requirement="behaviorOnFailure" value="ROLLBACK" /> <fulfill requirement="transactional" value="true" /> <fulfill requirement="resultFactory" with="OrderCreationResultFactory" /> </instance> <!-- Sub-chain for performing payment authorizations (incl. redirect after checkout). --> <instance name="PaymentAuthorizationOrderCreationChain" with="Chain" scope="app">> <fulfill requirement="name" value="PaymentAuthorizationOrderCreationChain" /> <fulfill requirement="behaviorOnFailure" value="ROLLBACK" /> <fulfill requirement="transactional" value="false" /> <fulfill requirement="resultFactory" with="OrderCreationResultFactory" /> </instance> <!-- Sub-chain for processing all actions that do not need to wait for a successful completion of the payment (e.g. send order confirmation mail). --> <instance name="PendingPaymentOrderCreationChain" with="Chain" scope="app">> <fulfill requirement="name" value="PendingPaymentOrderCreationChain" /> <fulfill requirement="behaviorOnFailure" value="CONTINUE" /> <fulfill requirement="transactional" value="false" /> <fulfill requirement="resultFactory" with="OrderCreationResultFactory" /> </instance> <!-- Sub-chain for processing asynchronous payment notifications. Waits for all pending payments and continues if all payments were authorized or rolls back if a payment failed. --> <instance name="PaymentSynchronizationOrderCreationChain" with="Chain" scope="app">> <fulfill requirement="name" value="PaymentSynchronizationOrderCreationChain" /> <fulfill requirement="behaviorOnFailure" value="ROLLBACK" /> <fulfill requirement="transactional" value="false" /> <fulfill requirement="resultFactory" with="OrderCreationResultFactory" /> </instance> <!-- All handlers to be processed after the payment was completed successful have to go in this sub-chain. (e.g. booking affiliate provisions) --> <instance name="PostPaymentOrderCreationChain" with="Chain" scope="app">> <fulfill requirement="name" value="PostPaymentOrderCreationChain" /> <fulfill requirement="behaviorOnFailure" value="CONTINUE" /> <fulfill requirement="transactional" value="false" /> <fulfill requirement="resultFactory" with="OrderCreationResultFactory" /> </instance> </fulfill> </instance> </fulfill> </components>
Order creation handlers are wired to the related chains by component framework:
<implementation name ="BasicOrderCreationHandler" class="com.intershop.component.order_orm.internal.handlerchain.BasicOrderCreationHandler" implements="Handler" /> ... <fulfill requirement="handler" of="OrderCreationChain"> <instance with="HandlerDefinition" name="BasicOrderCreationHandler"> <fulfill requirement="name" value="BasicOrderCreationHandler"/> <fulfill requirement="position" value="10"/> <fulfill requirement="handler"> <instance with="BasicOrderCreationHandler"/> </fulfill> </instance> </fulfill>
The Handler Chain that processes the order creation is triggered by the following method:
com.intershop.component.order.capi.OrderBORepository::createOrderBO(OrderCreationContext context) : OrderCreationResult
Following application-dependent pipelines contain the switch to trigger the order creation via Handler Chains.
Cartridge | UI/REST | Submit Order Pipeline (Application-dependent) | Overloads |
---|---|---|---|
app_sf_responsive | UI | ViewCheckoutReview-SubmitOrder | - |
app_sf_responsive_b2b | UI | ViewCheckoutReview-SubmitOrder |
|
app_sf_responsive_costcenter | UI | ViewCheckoutReview-SubmitOrder |
|
app_sf_rest | REST | ProcessOrderREST-SubmitOrder | - |
app_sf_rest_b2b | REST | ProcessOrderREST-SubmitOrder |
|
Use the HandlerChain-based order creation functionality (The new implementation is active by default in ICM 7.9):
intershop.order.creationchain.enable=true
Use the legacy order creation functionality:
intershop.order.creationchain.enable=false
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.