Custom Pipeline Component Question

This should be pretty basic, but I am thinking of writing a custom checkout component that will do the following task:

When a basket is made into an order, each line item's status will be calculated based on some custom properties that exist in the Catalog for the product associated with the line item. We are also creating a status history table which is custom and contains the LineItemID (Guid) that will be a foreign key to the LineItems table in the Transactions database. Here's my question. Is this something that the custom pipeline component should do I would like my custom component to be added to the Checkout pipeline and do the following: here's some pseudo

Foreach(LineItem)

{

Get Product info

Calculate Product fields to determine Status for Line Item

Set Status of Line Item

Write Line Item Status info to status history table

}

Is this what the custom components are designed for or are they SPECIFICALLY to modify and read order dictionary objects, and I should write my status history record outside the pipeline on success of the checkout pipeline in a separate loop

Any thoughts

Thanks,

Dave




Answer this question

Custom Pipeline Component Question

  • Sarah71

    Max,

    I realize that the modification of the Dictionary objects is handled by the components. my question is more geared towards finding out if I can perform other operations on local tables/classes in there too, like writing to a history table, as well as modifying the dictionary.. or should I do these steps after the successful completion of the pipeline

    thanks,

    Dave



  • Anmol Ranka

    Yep, that'll do it.. it was mostly a best practices question, but I think I get the general idea now.

    Thanks.

    Dave



  • pu132

    Having custom pipeline are based on your requirements and not knowing what they are it’s hard to give guidance. So an example should clarify things. Adding line items or credit cards are done outside of the pipeline execution but validating line items or processing credit cards is done in one of the Pipeline stages. You can also have post processing outside of the pipeline like a customer canceling his\her order.

    I hope that this clarifies your question.

    -Max



  • aimeeoco

    If your requirements are to modify the OrderForm during Basket\Order creation then yes this is why you would use custom pipelines.

    -Max



  • Custom Pipeline Component Question