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.String
DECLINE_ENTRIES
protected static java.lang.String
IS_CONSIGNMENT_AUTO_DECLINED
protected static java.lang.String
RE_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 void
executeAction(ConsignmentProcessModel consignmentProcessModel)
Executes thisAction
's business logic working on the givenBusinessProcessModel
.protected void
executeDeclineActions(DeclineEntries declinedEntries)
Executes aDeclineActionStrategy
, for each declined entry according to the specified reason.protected AllocationService
getAllocationService()
protected java.util.Map<DeclineReason,DeclineActionStrategy>
getDeclineActionsMap()
protected java.util.Map<DeclineReason,DeclineActionStrategy>
getExternalWarehouseDeclineActionsMap()
protected WarehousingBusinessProcessService<AbstractOrderModel>
getOrderBusinessProcessService()
protected WarehousingConsignmentWorkflowService
getWarehousingConsignmentWorkflowService()
protected void
performAutoDecline(AbstractOrderModel order, DeclineEntries autoDeclineEntries)
Performs the auto decline for the givenDeclineEntries
and trigger the sourcing for the associatedAbstractOrderModel
protected void
performManualDecline(DeclineEntries manualDeclineEntries)
Performs the manual reallocation for the givenDeclineEntries
, Also, it starts theConsignmentProcessModel
as well asWorkflowModel
for task assignment for the newly created consignmentsvoid
setAllocationService(AllocationService allocationService)
void
setDeclineActionsMap(java.util.Map<DeclineReason,DeclineActionStrategy> declineActionsMap)
void
setExternalWarehouseDeclineActionsMap(java.util.Map<DeclineReason,DeclineActionStrategy> externalWarehouseDeclineActionsMap)
void
setOrderBusinessProcessService(WarehousingBusinessProcessService<AbstractOrderModel> orderBusinessProcessService)
void
setWarehousingConsignmentWorkflowService(WarehousingConsignmentWorkflowService warehousingConsignmentWorkflowService)
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-
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:AbstractProceduralAction
Executes thisAction
's business logic working on the givenBusinessProcessModel
.- Specified by:
executeAction
in 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 givenDeclineEntries
and trigger the sourcing for the associatedAbstractOrderModel
- Parameters:
autoDeclineEntries
- - entries to be declinedorder
- - associatedAbstractOrderModel
with theDeclineEntries
,for which sourcing needs to be triggered
-
performManualDecline
protected void performManualDecline(DeclineEntries manualDeclineEntries)
Performs the manual reallocation for the givenDeclineEntries
, Also, it starts theConsignmentProcessModel
as well asWorkflowModel
for 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
- theDeclineEntries
to 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)
-
-