[I am using broadleaf commerce 3.0.0]
In "customizing add to cart" tutorial, there was a requirement to define our own blAddItemWorkflow bean to override the original bean definition. I did that in my own context xml file and hoped that it would override, however, it didn't. I turned on the debug, and here's the blAddItemWorkflow definition (note that it is merged, not override)
<bean class="org.broadleafcommerce.core.workflow.SequenceProcessor" id="blAddItemWorkflow">
<property name="processContextFactory">
<bean class="org.broadleafcommerce.core.order.service.workflow.CartOperationProcessContextFactory"/>
</property>
<property name="activities">
<list>
<ref bean="blValidateAddRequestActivity"/>
<ref bean="blAddOrderItemActivity"/>
<ref bean="blAddFulfillmentGroupItemActivity"/>
<ref bean="blAddWorkflowPriceOrderIfNecessaryActivity"/>
<ref bean="blAddWorkflowVerifyFulfillmentGroupItemsActivity"/>
<ref bean="ValidateHeatRangeRestrictionActivity"/> <!-- this is tutorial's activity, everything else is repeated -->
<ref bean="blValidateAddRequestActivity"/>
<ref bean="blAddOrderItemActivity"/>
<ref bean="blAddFulfillmentGroupItemActivity"/>
<ref bean="blAddWorkflowPriceOrderIfNecessaryActivity"/>
<ref bean="blAddWorkflowVerifyFulfillmentGroupItemsActivity"/>
</list>
</property>
<property name="defaultErrorHandler" ref="blDefaultErrorHandler"/>
</bean>
As a result of this merge, it is giving me this error, when I add to cart : "Not enough fulfillment group items found for DiscreteOrderItem id". I was able to get rid of this error by providing only the tutorial activity ValidateHeatRangeRestrictionActivity in my context xml, in which case a merged bean definition looked like this:
<bean class="org.broadleafcommerce.core.workflow.SequenceProcessor" id="blAddItemWorkflow">
<property name="processContextFactory">
<bean class="org.broadleafcommerce.core.order.service.workflow.CartOperationProcessContextFactory"/>
</property>
<property name="activities">
<list>
<ref bean="blValidateAddRequestActivity"/>
<ref bean="blAddOrderItemActivity"/>
<ref bean="blAddFulfillmentGroupItemActivity"/>
<ref bean="blAddWorkflowPriceOrderIfNecessaryActivity"/>
<ref bean="blAddWorkflowVerifyFulfillmentGroupItemsActivity"/>
<ref bean="ValidateHeatRangeRestrictionActivity"/> <!-- this is tutorial's activity, everything else is repeated -->
</list>
</property>
<property name="defaultErrorHandler" ref="blDefaultErrorHandler"/>
</bean>
Am I missing something here? Is there a way to truly override the original bean definition?
Many thanks!
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.