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.

  • Soeren Sprogoe 575 posts 259 karma points
    Dec 14, 2010 @ 16:37
    Soeren Sprogoe
    0

    Execute individual pipeline tasks

    I know it is possible to execute a certain pipeline from your code, using UCommerce.Pipelines.PipelineFactory.

    But is is possible to execute individual tasks in a Pipeline? Both the buildin tasks, like Basket.CalculateOrderTotal, or my own pipeline tasks.

    Best regards,
    Soeren S.

  • Lasse Eskildsen 34 posts 57 karma points
    Dec 15, 2010 @ 08:59
    Lasse Eskildsen
    0

    Hi Søren,

    You can do that by creating a new instance of the task:

    var basket = SiteContext.Current.OrderContext.GetBasket();
    var task = new CalculateOrderTotalTask();
    task.Execute(basket.PurchaseOrder);

    Or, you can create a new pipeline with the task you want to execute as the only task.

    - Lasse

  • Soeren Sprogoe 575 posts 259 karma points
    Dec 15, 2010 @ 11:04
    Soeren Sprogoe
    0

    Hi Lasse,

    thanks!

    Where in the namespace is fx. CalculateOrderTotalTask() located? Can't seem to find it.

    I'm running uCommerce 1.0.4.2, maybe it's a feature of later versions?

    Best regards,
    Soeren Sprogoe

  • Lasse Eskildsen 34 posts 57 karma points
    Dec 15, 2010 @ 11:16
    Lasse Eskildsen
    0

    Hi Søren,

     It's in UCommerce.Pipelines.Basket, in the UCommerce.Pipelines dll - you might need to reference that.

    - Lasse

     

  • Soeren Sprogoe 575 posts 259 karma points
    Dec 15, 2010 @ 11:20
    Soeren Sprogoe
    0

    Ah, there it is. Thanks :-)

    I think I'm going to create a new pipeline for it though, as you suggest. As that is easier to configure in the future.

    Thanks for the help!

    /SoerenS

Please Sign in or register to post replies

Write your reply to:

Draft