Adding a New Link to a Commerce Pipeline

To add new links to a commerce pipeline you need to override the default definition for the appropriate commerce pipeline.  Commerce pipelines are defined in XML so you use ATG’s XML combining feature to accomplish this.

For example if you want to add a new link to the ProcessOrder chain in the /atg/commerce/commercepipeline.xml you would create the following commercepipeline.xml in your local config.

[xml]<pipelinemanager>
<pipelinechain name="processOrder" xml-combine="append">
<pipelinelink transaction="TX_MANDATORY" name="authorizePayment" xml-combine="replace">
<processor jndi="/atg/commerce/order/processor/AuthorizePayment" />
<transition returnvalue="1" link="updateInventory" />
</pipelinelink>
<pipelinelink name="updateInventory" transaction="TX_MANDATORY">
<processor jndi="/betweengo/commerce/inventory/processor/ProcUpdateInventory" />
<transition returnvalue="1" link="updateGiftRepository" />
</pipelinelink>
</pipelinemanager>[/xml]

In this example we added the new updateInventory link which is inserted between the authorizePayment and updateGiftRepository links.

Leave a Reply

Your email address will not be published. Required fields are marked *