You can find paymentpipeline.xml in %DYNAMO_HOME%\..\DCS\src\config\atg\commerce\payment
To create a new process you need to implement PipelineProcessor.
import atg.nucleus.logging.ApplicationLoggingImpl;
import atg.service.pipeline.PipelineProcessor;
public class MyProcessor extends ApplicationLoggingImpl implements PipelineProcessor
{
public int[] getRetCodes()
{
return new int{1,2};
}
public int runProcess(final Object pParam, final PipelineResult pResult) throws Exception
{
// do what ever you wish to do here
//1 is transaction status
return 1;
}
}
This creates a class that will be called when the pipeline chain is called. Next thing required is you need to create a properties file to create a component. It may typically look like this.
$class=/demo/atg/order/processor/MyProcessor
$scope=global
Modify PipelinePayment.xml and add a new pipelinechain. To invoke an individual processor in chain call PipelineManager.runProcess and pass chained of the created processor.
<pipelinechain name=" lastExistingchain" transaction="TX_REQUIRED" headlink="sampleDemoLink">
<pipelinelink name="sampleDemoLink" transaction="TX_REQUIRED">
<processor jndi="demo/atg/order/processor/MyProcessor"/>
</pipelinelink>
</pipelinechain>
Depending on your requirement you may have to add this pipeline link in an existing pipelinechain insttead of creating a new chain.