Hi Quan!
I mean the activity flow. It was working till 9.6 version. Here is what I have for my "CartValidate" activity flow.
[ActivityFlowConfiguration(Name = OrderGroupWorkflowManager.CartValidateWorkflowName, Priority = 1)]
public class CartValidateActivityFlow : ActivityFlow
{
public override ActivityFlowRunner Configure(ActivityFlowRunner activityFlow)
{
return activityFlow.Do<WOWCommerce.Workflow.Activities.OrderGroupActivities.ValidateLineItemsActivity>()
.Do<GetFulfillmentWarehouseActivity>()
.If(() => ShouldCheckInstoreInventory())
.Do<CheckInstoreInventoryActivity>()
.Else()
.Do<WOWCommerce.Workflow.Activities.OrderGroupActivities.CheckInventoryActivity>()
.EndIf()
.Do<CalculateTotalsActivity>()
.Do<RemoveDiscountsActivity>()
.Do<CalculateTotalsActivity>()
.Do<CalculateDiscountsActivity>()
.Do<CalculateTotalsActivity>()
.Do<WOWCommerce.Workflow.Activities.OrderGroupActivities.CalculateTaxActivity>()
.Do<RecordPromotionUsageActivity>();
}
}
Hi,
It looks like somehow your site has the VNextFeature flag activated - (it's default if you install a new site in Commerce 9.19). Therefore CartValidateVNextActivityFlow which has AvailableInBetaMode flag will be used.
You should change your registration to this
[ActivityFlowConfiguration(Name = OrderGroupWorkflowManager.CartValidateWorkflowName, Priority = 1, AvailableInBetaMode = true)]
Regards,
/Q
Awesome Awesome Awesome!!!!
That just worked. So do we need to remove that AvailableInBetaMode = true, at some point in future versions?
Hi,
No, if you still have VNextFeature enabled you'll still need that AvailableInBetaMode flag. If we ever change that, it'll be a breaking change and requires a major version - and the solution will not even compile (make it easier to fix)
/Q
Hi Quan,
So, after we upgraded to EPiServer Commerce v9.24, it looks like AvailableInBetaMode has not effect and our custom workflow is not being called.
To fix this, we had to remove this property at all and disable VNextFeature from ecf.app.config.
The issue resulted in stop sending some tax information after orders were placed.
Do you have any idea what changed between v9.19 and 9.24 that lead to this behavior? As per above comment, it was mentioned that flag AvailableInBetaMode should be set to true all the time if VNextFeature is enabled which was the case.
We owe our client an explanation for that and appreciate your valuable inputs.
Thanks!
Hi,
That's very strange. AvailableInBetaMode is still in effect. Note that if you want to override a default workflow (ActivityFlow), you'll have set the Priority value to be higher than the default one.
We had the priority as "1" all the time:
[ActivityFlowConfiguration(Name = OrderGroupWorkflowManager.CartCheckOutWorkflowName, Priority = 1)]
If you can turn on the Debug level for your log, and restart your site, you should be able to see the log entries like this:
Registering a activity flow model: Name={0}, AvailableInBetaMode={1}, ActivityFlowType.FullName={2}, Priority={3}
Overwriting {0} activity flow by {1} with priority {2}
Which might shed a light of which activityflows are registered and which overwrote which.
We have "CartValidate" workflow customized. And that does not work. When I debuged seems like the workflow instance created is always this:
ActivityFlowModel workflow = ServiceLocator.Current.GetInstance().GetActivityFlowModel(OrderGroupWorkflowManager.CartValidateWorkflowName);
{Mediachase.Commerce.Engine.ActivityFlowModel}
ActivityFlowType: {Name = "CartValidateVNextActivityFlow" FullName = "Mediachase.Commerce.Workflow.CartValidateVNextActivityFlow"}
AvailableInBetaMode: true
Description: null
DisplayName: null
Name: "CartValidate"
Priority: 0
Is there any information out there on these "CartValidateVNextActivityFlow" Activity flow added in version 9 at some point? Is there a way I can specify priority in my workflow so it always gets called first?