Class ReAllocateConsignmentAction
- java.lang.Object
-
- de.hybris.platform.processengine.action.AbstractAction<T>
-
- de.hybris.platform.processengine.action.AbstractProceduralAction<ConsignmentProcessModel>
-
- de.hybris.platform.yacceleratorordermanagement.actions.consignment.ReAllocateConsignmentAction
-
- All Implemented Interfaces:
Action<ConsignmentProcessModel>
public class ReAllocateConsignmentAction extends AbstractProceduralAction<ConsignmentProcessModel>
Declines the consignment.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.processengine.action.AbstractProceduralAction
AbstractProceduralAction.Transition
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDECLINE_ENTRIESprotected static java.lang.StringIS_CONSIGNMENT_AUTO_DECLINEDprotected static java.lang.StringRE_SOURCE_CHOICE-
Fields inherited from class de.hybris.platform.processengine.action.AbstractAction
modelService, processParameterHelper
-
Fields inherited from interface de.hybris.platform.processengine.spring.Action
ERROR_RETURN_CODE, RETRY_RETURN_CODE
-
-
Constructor Summary
Constructors Constructor Description ReAllocateConsignmentAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAction(ConsignmentProcessModel consignmentProcessModel)Executes thisAction's business logic working on the givenBusinessProcessModel.protected voidexecuteDeclineActions(DeclineEntries declinedEntries)Executes aDeclineActionStrategy, for each declined entry according to the specified reason.protected AllocationServicegetAllocationService()protected java.util.Map<DeclineReason,DeclineActionStrategy>getDeclineActionsMap()protected java.util.Map<DeclineReason,DeclineActionStrategy>getExternalWarehouseDeclineActionsMap()protected WarehousingBusinessProcessService<AbstractOrderModel>getOrderBusinessProcessService()protected WarehousingConsignmentWorkflowServicegetWarehousingConsignmentWorkflowService()protected voidperformAutoDecline(AbstractOrderModel order, DeclineEntries autoDeclineEntries)Performs the auto decline for the givenDeclineEntriesand trigger the sourcing for the associatedAbstractOrderModelprotected voidperformManualDecline(DeclineEntries manualDeclineEntries)Performs the manual reallocation for the givenDeclineEntries, Also, it starts theConsignmentProcessModelas well asWorkflowModelfor task assignment for the newly created consignmentsvoidsetAllocationService(AllocationService allocationService)voidsetDeclineActionsMap(java.util.Map<DeclineReason,DeclineActionStrategy> declineActionsMap)voidsetExternalWarehouseDeclineActionsMap(java.util.Map<DeclineReason,DeclineActionStrategy> externalWarehouseDeclineActionsMap)voidsetOrderBusinessProcessService(WarehousingBusinessProcessService<AbstractOrderModel> orderBusinessProcessService)voidsetWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService)protected voidupdateConsignmentContextParameters(ConsignmentProcessModel consignmentProcessModel, java.util.Collection<BusinessProcessParameterModel> contextParams, BusinessProcessParameterModel declineEntriesParam, java.lang.Boolean isAutoDecline)Removes the {#link DeclineEntries} from the consignment process context and add flag to indicate if autoDecline was done for the consignment-
Methods inherited from class de.hybris.platform.processengine.action.AbstractProceduralAction
execute, getTransitions
-
Methods inherited from class de.hybris.platform.processengine.action.AbstractAction
createTransitions, getModelService, getProcessParameterHelper, getProcessParameterValue, refresh, save, setModelService, setOrderStatus, setProcessParameterHelper
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.processengine.spring.Action
getCurrentActionDefinitionContext
-
-
-
-
Field Detail
-
DECLINE_ENTRIES
protected static final java.lang.String DECLINE_ENTRIES
- See Also:
- Constant Field Values
-
RE_SOURCE_CHOICE
protected static final java.lang.String RE_SOURCE_CHOICE
- See Also:
- Constant Field Values
-
IS_CONSIGNMENT_AUTO_DECLINED
protected static final java.lang.String IS_CONSIGNMENT_AUTO_DECLINED
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeAction
public void executeAction(ConsignmentProcessModel consignmentProcessModel)
Description copied from class:AbstractProceduralActionExecutes thisAction's business logic working on the givenBusinessProcessModel.- Specified by:
executeActionin classAbstractProceduralAction<ConsignmentProcessModel>- Parameters:
consignmentProcessModel- The process context to work on.
-
updateConsignmentContextParameters
protected void updateConsignmentContextParameters(ConsignmentProcessModel consignmentProcessModel, java.util.Collection<BusinessProcessParameterModel> contextParams, BusinessProcessParameterModel declineEntriesParam, java.lang.Boolean isAutoDecline)
Removes the {#link DeclineEntries} from the consignment process context and add flag to indicate if autoDecline was done for the consignment- Parameters:
consignmentProcessModel- - process for the consignment to be declinedcontextParams- - context parameters for the consignment to be declineddeclineEntriesParam- - declined entries param in the context parameters for the consignment to be declinedisAutoDecline- - flag to indicate if auto decline was performed on the consignment
-
performAutoDecline
protected void performAutoDecline(AbstractOrderModel order, DeclineEntries autoDeclineEntries)
Performs the auto decline for the givenDeclineEntriesand trigger the sourcing for the associatedAbstractOrderModel- Parameters:
autoDeclineEntries- - entries to be declinedorder- - associatedAbstractOrderModelwith theDeclineEntries,for which sourcing needs to be triggered
-
performManualDecline
protected void performManualDecline(DeclineEntries manualDeclineEntries)
Performs the manual reallocation for the givenDeclineEntries, Also, it starts theConsignmentProcessModelas well asWorkflowModelfor task assignment for the newly created consignments- Parameters:
manualDeclineEntries- - entries to be reallocated to the selected warehouse
-
executeDeclineActions
protected void executeDeclineActions(DeclineEntries declinedEntries)
Executes aDeclineActionStrategy, for each declined entry according to the specified reason.- Parameters:
declinedEntries- theDeclineEntriesto be declined
-
getAllocationService
protected AllocationService getAllocationService()
-
setAllocationService
public void setAllocationService(AllocationService allocationService)
-
getOrderBusinessProcessService
protected WarehousingBusinessProcessService<AbstractOrderModel> getOrderBusinessProcessService()
-
setOrderBusinessProcessService
public void setOrderBusinessProcessService(WarehousingBusinessProcessService<AbstractOrderModel> orderBusinessProcessService)
-
getDeclineActionsMap
protected java.util.Map<DeclineReason,DeclineActionStrategy> getDeclineActionsMap()
-
setDeclineActionsMap
public void setDeclineActionsMap(java.util.Map<DeclineReason,DeclineActionStrategy> declineActionsMap)
-
getExternalWarehouseDeclineActionsMap
protected java.util.Map<DeclineReason,DeclineActionStrategy> getExternalWarehouseDeclineActionsMap()
-
setExternalWarehouseDeclineActionsMap
public void setExternalWarehouseDeclineActionsMap(java.util.Map<DeclineReason,DeclineActionStrategy> externalWarehouseDeclineActionsMap)
-
getWarehousingConsignmentWorkflowService
protected WarehousingConsignmentWorkflowService getWarehousingConsignmentWorkflowService()
-
setWarehousingConsignmentWorkflowService
public void setWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService)
-
-