Order Blocking Workflow
OMS v2.0 introduces the concept of an order blocking workflow that can "block" an order from moving a FulfillmentOrder into the PROCESSING
status. The workflow is structured just like any other broadleaf workflow (e.g. the checkout workflow) and can be extended with custom activities. For example, the overrides to the built in workflow would look something like:
<bean id="blOrderBlockActivities" class="org...ListFactoryBean">
<property name="sourceList">
<list>
<ref bean="customShippingVerificationBlockActivity"/>
<ref bean="customBillingVerificationBlockActivity"/>
<ref bean="customPOBoxVerificationBlockActivity"/>
<ref bean="customTaxVerificationBlockActivity"/>
<ref bean="customFraudVerificationBlockActivity"/>
<ref bean="blOrderTotalBlockActivity"/>
<ref bean="customPaymentAuthBlockActivity"/>
<ref bean="blCompleteOrderBlockActivity"/>
<ref bean="customNotifyOrderCompleteActivity"/>
</list>
</property>
</bean>
This workflow can be invoked in several different ways:
- Upon initial creation of the submitted Order and Fulfillment Order, you should invoke this configured workflow (i.e from your "Processing" node). To do this, you can inject the
blOrderBlockReasonService
and call:orderBlockService.performOrderBlockWorkflow(order)
- If you are working on an Order, the CSR can re-run the block reason rule workflow (from the blocking reasons tab) if they've manually updated some of the reasons to pass/fail.