Quan Mai
Feb 9, 2015
  3867
(2 votes)

Building your custom Commerce workflow project

Recently we released EPiServer Commerce 8.7.1, with many updates, and the most important thing is to update our workflows to take advantages of new inventory system, and, to merge the two projects – Mediachase.Commerce.Workflow and Mediachase.Commerce.Workflow.Activities into one. The reason? To help simplifying the steps you need to build your customer workflow project. The project source code can be found here: http://world.episerver.com/download/Items/EPiServer-Commerce/episerver-commerce-8-tools-and-code-samples/

So if you have custom workflow project, you will need to rebuild it to apply new chances from our workflows. A few notes that might save you some headaches:

- You only need to install EPiServer.Commere.Core to your workflow project. Remove reference to old Mediachase.Commerce.Workflow.Actitivies.dll. If you are customizing by using our project (Build to Mediachase.Commerce.Workflow.dll), make sure to remove the reference to itself. This has been noted in our release notes.

- If you use activities from Mediachase.Commerce.Workflow.Activities in your own workflows, make sure to update namespaces to use Assembly=Mediachase.Commerce.Workflow (remove “.Activities” part).

- EPiServer Commerce 8.7.1 was built with EPiServer.CMS.Core 7.19.1. Build your workflow project before upgrading to later version of CMS/Framework (7.19.2, for example). The reason was to build workflows, Visual Studio will use msbuild and call to Microsoft’s WorkflowCompilation target, which does not care about the assembly binding redirects (defined in web.config or app.config). It cannot load EPiServer.Business.Commerce.dll 7.19.1 because it can’t load EPiServer.Framework.dll 7.19.1, and will throw a very cryptic message: "Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

Then you can build your custom project and experience interesting features of our new inventory service system.

Feb 09, 2015

Comments

Arve Systad
Arve Systad Feb 9, 2015 11:43 AM

I spent nearly a whole day struggling with this.

Future updates should be such that stuff released at the same time (typically the same "Update XX" patch) should be built all with the same, newest versions. If workflows can't be built with the newest CMS-version, it should be re-released with the same dependencies as the newest CMS-version. So in effect: "Update all" should be possible to do on the EPiServer nugets at any time without breaking the build (unless there are breaking changes to the APIs of course, which would be the exception).

K Khan
K Khan Feb 9, 2015 03:38 PM

+1 for Arve suggestion

Luc Gosso (MVP)
Luc Gosso (MVP) Feb 13, 2015 01:56 PM

I finaly got my workflow-project working in CMS 7.19.2. What i did was to download 7.19.1 separatly, and referenced my workflow project to these DLLs. Anyhow this is not desirable approach. I wonder what will happen on next update.

Luc Gosso (MVP)
Luc Gosso (MVP) Feb 13, 2015 02:05 PM

It seems that i have a similar error in commerce manager now. I did upgrade Mediachase.ConsoleManagerUpdate.sln thru PackageManagerConsole in VS2013 and when running Commerce manager i do get "Could not load file or assembly 'EpiServer.Implementatio, Version 7.19.1' or one of its dependencies". Even thought i have assembly bindings redirects to 7.19.2 in web.config in the commerce folder. How come? is it related?

Luc Gosso (MVP)
Luc Gosso (MVP) Feb 16, 2015 02:27 PM

Regarding Mediachase.ConsoleManagerUpdate. I did downgrad to 7.19.1 and it works. what does that mean --> never use Update-Package to the latest version? how should we know that "EPiServer Commerce 8.7.1 was built with EPiServer.CMS.Core 7.19.1."??

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024