Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Girish Khadse 52 posts 132 karma points
    Mar 11, 2013 @ 11:00
    Girish Khadse
    0

    Need help in Understanding pipeline working

    I was trying to understand how pipeline framework is built in ucommerce by deassembling actual source code of ucommerce. I could understand the class hierarchy and flow of execution for pipeline. But I am still not entirely clear. Following are some points I did not understand.
    1.How  pipeline config files are read and pipeline objects are built?
    2. From one of the discussion , I also learnt that you need to have entry for the pipeline in table. For the post mentioned, it is ucommerce_orderStatus table. It is not clear how it works?
    3. And at last it would really help for new learners like me to get started if overall steps for creating custom pipeline is provided?

  • Rich Green 2246 posts 4008 karma points
    Mar 11, 2013 @ 11:03
    Rich Green
    0

    Hey Girish,

    Welcome to the forum!

    This blog post should have all you need http://blog.lasseeskildsen.net/post/uCommerce-Pipelines-Explained.aspx

    As far as I remember the config file is used instead of tables now.

    Rich 

  • Girish Khadse 52 posts 132 karma points
    Mar 11, 2013 @ 11:33
    Girish Khadse
    0

    Hi Rich,

    Thanks a lot for the help. I read the blog you suggested and it really helped a lot. But it still did not make clear,  which exact code in ucommerce actually reads the config files. I guess that, it is happening when pipeline factory is resolving pipeline object (please look UCommerce.Transactions.TransactionLibraryInternal.ExecuteOrderPipeline). But could you please tell me where exactly to  look for the code reading config. Or it is DI container that is doing all this internally?
    And it will also be great help if you just list down the steps necessary for creating new custom pipeline. Lassens post doesnot provide much information on that front, which mostly focuses on creating custom pipeline tasks. 

     

    Girish

  • Morten Skjoldager 440 posts 1499 karma points
    Mar 11, 2013 @ 14:14
    Morten Skjoldager
    0

    Hi Girish.

    uCommerce uses Castle Windsor as DI container. It reads all registered services from the config files. There's a custom.config where you can register your own services. 

    There's no hard tricks to register your own.

    1.: Just references uCommerce.pipelines and implement your task as IPipeLineTask. 

    2.: Then you need to add it to the custom.config whre the service is uCommerce.pipelines.IPipeLineTask and the type is your custom placed in your namespace dll. 

    3.: Now whenever you need to configure the framework to call your PipeLine task, register it in the array parameter in the configured pipelines. I don't have any source code at me that could provide the EXACT code on how to do it. But it should be pretty straight forward. Just take a look at how it's done in the allready existing config files. 

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 12, 2013 @ 10:39
    David Brendel
    1

    Also as a tipp, remember that uCommerce only reads the configs on app startup. So if you change something in the configs, restart your app!

  • Girish Khadse 52 posts 132 karma points
    Mar 13, 2013 @ 10:28
    Girish Khadse
    0

    Background :  I thought of creating my own custom pipeline. I created one class which is inheriting from Pipeline abstract class. Also added one class for custom task which is implementing IPipelineTask. Then I created config file under umbraco -> ucommerce-> pipelines folder for custom pipeline named "MyCustomPipeline.config". Added entry in the componet.config.

    Actually I have put breakpoints to mycustom tasks execute method as well pipelines execute method. And I expect that my custom pipelines execute method should be executed first and then myCustomeTasks execute method should be executed. But myCustomTasks execute method is executed while pipelines execute methods breakpoint is not hit. I find it strange. Could anyone explain this please?

  • Girish Khadse 52 posts 132 karma points
    Mar 13, 2013 @ 12:04
    Girish Khadse
    0

    Amm.. Got the reason. My custom pipeline is inheriting from abstract Pipeline class. And execute method is not virtual that means you cant override it. Thats why always default basic Pipeline class's execute method is hit and not my custom class's execute method.

Please Sign in or register to post replies

Write your reply to:

Draft