I suggest you ...

"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 -->
<component
id="ChangeStatusTo.Processing"
service="UCommerce.Pipelines.IPipelineTask`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
type="UCommerce.Pipelines.Orders.ChangeStatus, UCommerce.Pipelines">
<parameters>
<newStatusId>2</newStatusId>
</parameters>
</component>

<!-- example -->
<component id="ToChanged"
service="UCommerce.Pipelines.IPipeline`1[[UCommerce.EntitiesV2.PurchaseOrder, UCommerce]], UCommerce"
type="UCommerce.Pipelines.Transactions.Orders.OrderProcessingPipeline, UCommerce.Pipelines">
<parameters>
<tasks>
<array>
<value>{{SendEmail.Changed}}</value>
<value>{{ChangeStatusTo.Processing}}</value>
</array>
</tasks>
</parameters>
</component>

0 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Lars-Erik shared this idea  ·   ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • AdminSøren Spelling Lund (Admin, uCommerce) commented  · 

        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.

      Feedback and Knowledge Base