Hi,
When you use namespace within an assembly, you don't have to specify the Assembly part, so you just want to remove that part. Your xoml should be
xmlns:ns0="clr-namespace:Mediachase.Commerce.Workflow.Activities"
But I'm quite sure we noticed about the merge. In the release notes here http://world.episerver.com/releases/episerver---update-51/ we pointed to
http://world.episerver.com/download/Items/EPiServer-Commerce/episerver-commerce-8-tools-and-code-samples/
"This code package includes the source code for the default workflows in EPiServer Commerce, combining both workflows and activities into one package. The workflows can be customized to suite specific implementation needs."
:) But that might be a little mild.
Regards,
/Q
Thanks but changing namespace did not change anything. Looked at the example and i didn´t see any that clarify my problem.
And did you remove the reference to Mediachase.Commerce.Workflow.Activities.dll and Mediachase.Commerce.Workflow.dll itself? The steps were to install EpiServer.Commerce.Core to the source code project but old references must be removed.
/Q
Yes, its all gone and changed. Still i believe it is a reference issue as the message tells me.
I also tried to update last night and am in the situation receiving the same error with my custom workflows project. I look forward to more information or a solution to this. Thanks.
Would you mind to send us your custom project? We will try to make things right. My mail is quma [at] episerver.com
Thanks.
/Q
I wrote a blogspot which might help future visitors: http://world.episerver.com/blogs/Quan-Mai/Dates/2015/2/building-your-customer-commerce-workflow-project/
Regards,
/Q
Have you tried to clean you solution, hit the refresh button to refresh your workflow project, and rebuild the solution?
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.
Oh, i didn't try it enough. Now i get this error on "OrderGroupWorkflowManager.RunWorkflow(cart, OrderGroupWorkflowManager.CartPrepareWorkflowName);"
System.MissingMethodException: Constructor on type 'Holmen.Commerce.CustomProviders.ShippingUps.AdaptorGateway' not found. at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Mediachase.Commerce.Workflow.Activities.ProcessShipmentsActivity.ProcessShipments() at Mediachase.Commerce.Workflow.Activities.ProcessShipmentsActivity.Execute(ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run() --- End of inner exception stack trace --- at Mediachase.Commerce.Orders.Managers.OrderGroupWorkflowManager.RunWorkflow(OrderGroup orderGroup, String name, Boolean async, Boolean throwException, Dictionary`2 param) at Mediachase.Commerce.Orders.Managers.OrderGroupWorkflowManager.RunWorkflow(OrderGroup orderGroup, String name) at Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutPaymentOptions.onEnter() in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutPaymentOptions.aspx.cs:line 60 at Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutStepBase`1.InitGeneral() in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutStepBase.cs:line 39 at Holmen.Externweb.Web.Templates.Public.Pages.Commerce.Checkout.CheckoutPaymentOptions.Page_Load(Object sender, EventArgs e) in c:\workspace\Holmen\Holmen.Externweb.Web\Templates\Public\Pages\Commerce\Checkout\CheckoutPaymentOptions.aspx.cs:line 36 at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.templates_public_pages_commerce_checkout_checkoutpaymentoptions_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\21f9142c\f8f72cc1\App_Web_checkoutpaymentoptions.aspx.c1d148f9.twvxtly2.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
What does it meen? please help.
Holmen.Commerce.CustomProviders.dll is in the bin-folder
Hi
"Constructor on type 'Holmen.Commerce.CustomProviders.ShippingUps.AdaptorGateway' not found." indicates that the class AdaptorGateway was missing a public, parameterless constructor. You'll need to add it to make it works.
Regards.
/Q
Hi Q,
Thats what i thought too. But we have never had one. And it doesnt make any change.
public class AdaptorGateway : IShippingGateway
{
public AdaptorGateway()
{
}
Ive also tried to compile the project with 7.19.1 as this answers anticipate http://stackoverflow.com/.../activator-createinstance-cant-find-the-constructor-missingmethodexception
Any other idea?
I just took another look at the code and it looks like you'll need to add a constructor with IMarket parameter as well
/Q
The Great Quan Mai, you did it again! Greatly appreciated. I was just about to look in ProcessShipment(), and there i see IMarket, yes!
Updated Commerce from 8.2.1.326 to 8.7.1.466 (and CMS 7.15 to 7.19.2)
After that my custom workflow project did not compile in VS2013. My workflows are deriving from Mediachase.Commerce.Workflow.Activities.CalculateTaxActivity (one example)
Error in VS2013: "Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
I’ve noticed that the dll “Mediachase.Commerce.Workflow.Activities.dll” is moved in to “Mediachase.Commerce.Workflow.dll” (not mentioned in release notes – why Episerver? ).
Therefor I changed the assembly namespace in myworkflow.xoml
In VS I also get the following when I try to open the workflow designer:
“The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: MyValidateLineItemsActivity. The base class MyValidateLineItemsActivity could not be loaded. Ensure the assembly has been referenced and that all projects have been built.”
The MyValidateLineItemsActivity assembly is in the project.
The Mediachase DLLs are referenced to the latest version.
What am I missing out? Thanks for any help.