Try our conversational search powered by Generative AI!

My experiences and thoughts on the workflows in EPiServer Commerce

Vote:
 

Because of limitations and bugs found in the workflows delivered with Commerce we had to develop our own modified workflows. We identified the workflow activities that we needed to modify and then created our own versions of them, based on the original (copied from reflector). We then recreated the workflows and added the original activities but swapped some of them for the workflow activities that we had modified.

You can read some details about how to do this here and also see which activities and workflows are present: http://docs.mediachase.com/display/ecf52devguide/Customizing+Order+Processing+Workflow

The issues we encountered were the following:

  • The CalculateTaxActivity did not use the ShippingTax that is created in Commerce Manager to calculate the tax for the shipping price. We modified this activity and swapped it for its original in the following workflows: CartPrepare, POCalculateTotalsWorkflow, PurchaseOrderRecalculateWorkflow, SaveChangesWorkflow.

 

  • The CalculateTotalsAcitivity did not add form.HandingTotal to form.Total. As we use HandingTotal to keep our invoice fee we would like this amout to be added to the Total for the OrderForm. We then swapped our custom activity in the following workflows: CartCheckout, CartPrepare, CartValidate, CalucateTotalsWorkflow, POCompleteShipmentWorkflow, PurchaseOrderRecalculateWorkflow, SaveChangesWorkflow.

 

  • The ValidateLineItemsActivity did not update the LineItem.InStockQuantity from the CatalogEntryDto’s InStockQuantity which caused the customers to order LineItems who’s CatalogEntries actually had ran out of stock while they were in the cart. We added this update in the PopulateInventryInfo method and updated the following workflows: CartPrepare, CartValidate.

Note that all of these issues have been confirmed with EPiServer support.

Note that several of the modified workflows are executed only by commerce manager, at first we missed to swap the activities in these workflows. Because it’s only when you try to modify an order (or create a new one) in commerce manager you will notice that these workflows also has to be updated.

 

One disadvantage with creating our custom workflows and workflow activities was of course when we wanted to upgrade from Commerce R2 to R2 SP1 and then to R2SP2. We then had to examine the new versions of the workflows and activities that we had modified and merge our changes with the updated versions. But still there was the risk that a fix for some of our issues had been created elsewhere in the EPiServer’s dlls. So in the end we had to do a lot of regression testing to confirm that our modifications still were valid after the upgrade.

If someone is experiencing the same issues as us, please feel free to contact me and I’ll try to assist.

#62438
Oct 24, 2012 15:05
Vote:
 

Thanks for the excellent post Andreas.  I have only a couple of things to add.

The code for the workflow activities and payment providers is available via download from world so there is no need to use reflector to see what they are doing.  They are meant to be extensible parts of the commerce framework.  In the case of shipping taxes and handling fees the main reason these are not fully functional is that many of our customers get this information from whichever shipment company they are using (FedEx, UPS etc.) and have interfaces to those services in the activities.  We see similar solutions for all types of tax calculations.

I've not heard of the InStockQuantity issue but will follow up with support to make sure that item is opened as an issue if stock is being tracked using the system.  Again, in many cases it is not.

Regarding upgrade, we have attempted to make the activites as isolated as possible so that it is easy to replace the ones we provide with your own implementations. For instance, if your own CalculateTaxActivity is working you should be able to replace the out of the box version on any upgrade within a workflow.  This is not always the case and should be documented in breaking changes if it is not.

#62515
Oct 26, 2012 16:24
Vote:
 

Thank you for your comment!

It's really good to know that the code for this is available from world.episerver.com, I guess I didn't even look before I started modifying.

It's also great to hear that you plan to isolate the activites and that you will inform us when you make changes in them, a big relieve for future upgrades.

I also agree with you other comments, at some level everyone will probably need to do thier own adjustments of the workflows.

 

#63557
Nov 22, 2012 9:58
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.