November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
In Commerce 9.0 we switch to non Workflow Foundation solution. The registration of "workflows" (now ActivityFlow) is done in the constructor of ExecutionManager. So you can either call ServiceLocator.Current.GetInstance<ExecutionManager>(); or OrderContext.Current.<Something> during the site initialization to get the workflows registered.
Regards,
/Q
Ok, thanks!
So we have to register the ActivityFlows at startup event though we only use the built in ones? This doesn't happen automatically anymore?
Lars
Yeah, the mechanism of new engine is a bit different. We'll discuss to see if the default behavior needs to be changed.
Regards,
/Q
Do I have to register each ActivityFlow somehow?
I added the line
ServiceLocator.Current.GetInstance<ExecutionManager>();
to our initialization module to make sure the ExecutionManager is newed up, but I still get the exception No activity flow model named CartValidate has been registered when I run the CartValidate ActivityFlow. When I inspect the ExectionManager object I see that it has a property called BetaMode which throws an ArgumentNullException.
Lars
Hi,
The betamode is a flag to use the Flows which work with new promotion system.
Just to make sure, can you use some reflectors (ILSpy, dotPeek) to see if the CartValidateActivityFlow class is in your Mediachase.Commerce.Workflow.dll?
/Q
Hi,
It's finally working! Turns out I misunderstood something in the article Commerce 9 - upgrading and migration:
After upgrading to version 9, you need to update and migrate existing workflows and activity projects to remove obsolete workflows and use the new engine.
Do the following:
I thougth I was supposed to remove the referenced assemblies mentioned from my Commerce project. Adding Mediachase.Commerce.Workflow back fixed it :)
Thanks Quan!
Lars
Hi,
After upgrading from Commerce 8.16 to 9.4 we're not able to run the built-in worlflows anymore.
When we do:
CartHelper.Cart.RunWorkflow(OrderGroupWorkflowManager.CartValidateWorkflowName)
we get an error telling us that No activity flow model named CartValidate has been registered.
We do not have any custom worflows in our project. Is there something I've missed regarding breaking changes in Commerce 9? I didn't think we had to register any workflows if we only use the built-in ones?
Lars