November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
Our workflow project is open source and you can download it here: http://world.episerver.com/download/Items/EPiServer-Commerce/episerver-commerce-8-tools-and-code-samples/
Include the Mediachase.Commerce.Workflow into your solution, replace the reference to existing dll by the new project, then
modify the workflow (CartCheckout?) to remove the AdjustInventory activity. Build it then you should be good to go.
Regards.
/Q
Hi Quan,
Using the code from the tools and samples worked, and I didn't have to modify any code, just build and replace the DLL. This does cause some concern though, if there are bug fixes or new features added to the workflow delivered by the nuget packages, will this project always be updated to include them?
Could the default workflow activities be written in such a way to utilize the structure map container, that way, I could swap a single activity without needing to worry with all the other activites?
Thanks,
Brad
Hi,
For the first question, no, the workflow source code project will be lag behind. If you only want to remove a specific activity, you can do this:
- Create new workflow project on your own. This should reference to our workflow project
- Create a new workflow, for example, CartCheckoutEx, copy xoml file from our project. Remove the activity you don't want.
- Register your workflow in Configs\ecf.workflow.config, both front-end and backend. You can simply replace "type" with your own type.
Unfortunatly, no. Workflow Foundation does not support dependency injection for activity. But you can use DI for another class.
Regards.
/Q
Hi,
I'm trying to implement the paypal payment provider from the commerce downloads section. I am able to get to the point where the PageTypes.PayPalPage template loads via redirect from paypal but it throws the following exception:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ApplicationException: Workflow generated an exception, please look at the previous error for more details. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: request
at Mediachase.Commerce.InventoryService.InventoryServiceProvider.Request(InventoryRequest request)
at Mediachase.Commerce.Workflow.Activities.Cart.AdjustInventoryActivity.RequestInventory(OrderForm orderForm, Shipment shipment, LineItem lineItem)
at Mediachase.Commerce.Workflow.Activities.Cart.AdjustInventoryActivity.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, Boolean throwException, Dictionary`2 param)
at Diagram.EPiServerCms.Commerce.Payment.PayPal.PayPalPaymentGateway.ProcessSuccessfulTransaction(String acceptUrl, String cancelUrl, PayPalPayment payPalPayment)
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.views_pages_paypal_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\5bca57a3\be31b220\App_Web_wftpkb2h.3.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The site doesn't use an inventory system, is it possible to disable this action in the workflow? Or perhaps some other workaround.
Thanks,
Brad