Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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.
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
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
It's in UCommerce.Pipelines.Basket, in the UCommerce.Pipelines dll - you might need to reference that.
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
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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.
Hi Søren,
You can do that by creating a new instance of the task:
Or, you can create a new pipeline with the task you want to execute as the only task.
- Lasse
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
Hi Søren,
It's in UCommerce.Pipelines.Basket, in the UCommerce.Pipelines dll - you might need to reference that.
- Lasse
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
is working on a reply...