Class SendOmsReturnOrderToDataHubAction
- java.lang.Object
-
- de.hybris.platform.processengine.action.AbstractAction<T>
-
- de.hybris.platform.processengine.action.AbstractSimpleDecisionAction<ReturnProcessModel>
-
- com.sap.hybris.sapomsreturnprocess.actions.SendOmsReturnOrderToDataHubAction
-
- All Implemented Interfaces:
Action<ReturnProcessModel>
- Direct Known Subclasses:
CancelReturnRequestToSAPAction,SapOrderexchangeDefaultOmsSendReturnOrderToSCPIAction
public class SendOmsReturnOrderToDataHubAction extends AbstractSimpleDecisionAction<ReturnProcessModel>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.processengine.action.AbstractSimpleDecisionAction
AbstractSimpleDecisionAction.Transition
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringERROR_END_MESSAGE-
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 SendOmsReturnOrderToDataHubAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractSimpleDecisionAction.TransitionexecuteAction(ReturnProcessModel process)Executes thisAction's business logic working on the givenBusinessProcessModel.protected RefundReasonfindRefundReason(ReturnRequestModel returnRequest, AbstractOrderEntryModel orderEntry)This method will find refund reason for each order entry.OrderServicegetOrderService()protected java.lang.StringgetSapLogSysName(OrderModel order, ConsignmentEntryModel consignmentEntry)This method fetch the logical system name to which the consignment has to return.SapPlantLogSysOrgServicegetSapPlantLogSysOrgService()protected java.lang.StringgetSapSalesOrgName(OrderModel order, ConsignmentEntryModel consignmentEntry)This method is used to append sales organization, distribution channel and division which fetch this information from consignment Entry.SendToDataHubHelper<ReturnRequestModel>getSendReturnOrderToDataHubHelper()protected voidresetEndMessage(ReturnProcessModel process)voidsetKeyGeneratorLookup(KeyGeneratorLookup keyGeneratorLookup)voidsetOrderService(OrderService orderService)voidsetReturnSourcingContext(ReturnSourcingContext returnSourcingContext)voidsetSapPlantLogSysOrgService(SapPlantLogSysOrgService sapPlantLogSysOrgService)voidsetSendReturnOrderToDataHubHelper(SendToDataHubHelper<ReturnRequestModel> sendOrderAsCSVHelper)protected voidupdateLogicalSystem(OrderModel order, java.util.Set<ConsignmentEntryModel> consignments, ReturnRequestModel cloneReturnModel)This method will set logical system and sales organization details in cloned order model.-
Methods inherited from class de.hybris.platform.processengine.action.AbstractSimpleDecisionAction
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
-
ERROR_END_MESSAGE
public static final java.lang.String ERROR_END_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setReturnSourcingContext
public void setReturnSourcingContext(ReturnSourcingContext returnSourcingContext)
-
setKeyGeneratorLookup
public void setKeyGeneratorLookup(KeyGeneratorLookup keyGeneratorLookup)
-
getOrderService
public OrderService getOrderService()
-
setOrderService
public void setOrderService(OrderService orderService)
-
getSapPlantLogSysOrgService
public SapPlantLogSysOrgService getSapPlantLogSysOrgService()
-
setSapPlantLogSysOrgService
public void setSapPlantLogSysOrgService(SapPlantLogSysOrgService sapPlantLogSysOrgService)
-
getSendReturnOrderToDataHubHelper
public SendToDataHubHelper<ReturnRequestModel> getSendReturnOrderToDataHubHelper()
-
setSendReturnOrderToDataHubHelper
public void setSendReturnOrderToDataHubHelper(SendToDataHubHelper<ReturnRequestModel> sendOrderAsCSVHelper)
-
executeAction
public AbstractSimpleDecisionAction.Transition executeAction(ReturnProcessModel process) throws RetryLaterException
Description copied from class:AbstractSimpleDecisionActionExecutes thisAction's business logic working on the givenBusinessProcessModel.- Specified by:
executeActionin classAbstractSimpleDecisionAction<ReturnProcessModel>- Parameters:
process- The process context to work on.- Returns:
- OK; NOK
- Throws:
RetryLaterException
-
findRefundReason
protected RefundReason findRefundReason(ReturnRequestModel returnRequest, AbstractOrderEntryModel orderEntry)
This method will find refund reason for each order entry.
-
updateLogicalSystem
protected void updateLogicalSystem(OrderModel order, java.util.Set<ConsignmentEntryModel> consignments, ReturnRequestModel cloneReturnModel)
This method will set logical system and sales organization details in cloned order model.- Parameters:
order- - original orderconsignments- - set of consignmentcloneReturnModel- - cloned Return request Model
-
getSapSalesOrgName
protected java.lang.String getSapSalesOrgName(OrderModel order, ConsignmentEntryModel consignmentEntry)
This method is used to append sales organization, distribution channel and division which fetch this information from consignment Entry.- Parameters:
order- -original orderconsignmentEntry- - consignmentEntry will be used to get warehouse details- Returns:
- combination of sales organization, distribution channel and division {1000_10_00}
-
getSapLogSysName
protected java.lang.String getSapLogSysName(OrderModel order, ConsignmentEntryModel consignmentEntry)
This method fetch the logical system name to which the consignment has to return.- Parameters:
order- -original orderconsignmentEntry- - consignmentEntry will be used to get warehouse details- Returns:
- logical system name
-
resetEndMessage
protected void resetEndMessage(ReturnProcessModel process)
-
-