"Stock" tasks to change and advance order status
I’m adding a bit of workflow to the order statuses in a shop.
I was positive there was a few built-in tasks, but I can see I made my own the last time I did this.
Is there really no “ChangeOrderStatus(newId)” or “AdvanceStatus” tasks to just re-use in the castle config?
Would that be a nice addition to the built-in tasks to pick from?
The current process is:
“New order” to either “Processing” or “Changed”.
When “Changed”, the system sends n e-mails, and moves the order back to “Processing”.
This could’ve been set up easily with two bundled tasks, one which we have:
<!-- Need this one -->
service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
<!-- example -->
service="UCommerce.Pipelines.IPipeline`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
There's a very simple API to advance from one status to the next on IOrderService called ChangeOrderStatus. It will automatically call the configured pipeline. Your point that it should be wrapped in a task is a good one.