Class ProcessUtil
- java.lang.Object
-
- de.hybris.platform.yacceleratorordermanagement.integration.util.BaseUtil
-
- de.hybris.platform.yacceleratorordermanagement.integration.util.ProcessUtil
-
- Direct Known Subclasses:
CancellationUtil
,DeclineUtil
,ReturnUtil
,WorkflowUtil
public class ProcessUtil extends BaseUtil
this class is mainly to create and modify processes
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CONSIGNMENT_ACTION_EVENT_NAME
protected static java.lang.String
ORDER_ACTION_EVENT_NAME
protected static java.lang.String
ORDER_PROCESS_DEFINITION_NAME
protected static java.lang.String
ORDER_TEST_PROCESS
protected static java.lang.String
RETURN_PROCESS_DEFINITION_NAME
protected static int
timeOut
-
Fields inherited from class de.hybris.platform.yacceleratorordermanagement.integration.util.BaseUtil
allocationService, atpFormulas, automatedWorkflowActionTemplates, baseStores, baseStoreService, businessProcessService, calculationService, CAMERA_CODE, CAMERA_QTY, cartService, catalogVersionService, checkOrderAction, commentTypes, commerceStockService, commonI18NService, components, consignmentBusinessProcessService, consignmentCancellationService, csAgentGroups, deliveryMode, deliveryModes, deliveryModeService, domains, emailAddresses, LENS_CODE, MEMORY_CARD_CODE, MEMORY_CARD_QTY, modelService, newestWorkflowService, order, order2, orderBusinessProcessService, orderCancelService, orders, paymentInfos, pointOfServiceService, pointsOfService, processDefinitionFactory, products, productService, refundService, restockConfigModel, restockConfigs, returnBusinessProcessService, returnRequests, returnService, sourceOrderAction, sourcingBanService, sourcingConfigs, sourcingService, stockLevels, stockService, users, userService, warehouses, warehouseStockService, warehousingWorkflowDao, workflowActionTemplates, workflowDecisionTemplates, workflowTemplates, workflowTemplateService
-
-
Constructor Summary
Constructors Constructor Description ProcessUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BusinessProcessService
getBusinessProcessService()
WarehousingBusinessProcessService<ReturnRequestModel>
getReturnBusinessProcessService()
void
moveOrderProcess(OrderModel order, OrderProcessModel orderProcessModel, java.lang.String choice)
Moves theOrderProcessModel
according to the given choice and waits for the consignment and order process to finish or until timeout occursvoid
setBusinessProcessService(BusinessProcessService businessProcessService)
void
setReturnBusinessProcessService(WarehousingBusinessProcessService<ReturnRequestModel> returnBusinessProcessService)
void
waitUntilConsignmentProcessIsNotRunning(OrderProcessModel orderProcessModel, ConsignmentModel consignment, int timeOut)
wait for consignment process is not runningvoid
waitUntilProcessIsNotRunning(BusinessProcessModel process, int timeOut)
wait until process is not runningvoid
waitUntilReturnProcessExist(ReturnRequestModel returnRequest, java.lang.String processName, int timeOut)
void
waitUntilReturnProcessIsNotRunning(ReturnRequestModel returnRequestModel, int timeOut)
wait for return process is not running-
Methods inherited from class de.hybris.platform.yacceleratorordermanagement.integration.util.BaseUtil
assertProcessState, createCameraAndMemoryCardShippingOrder, createCameraPickUpOrder, createCameraShippedOrder, createOrder, getAllocationService, getAtpFormulas, getAutomatedWorkflowActionTemplates, getBaseStores, getBaseStoreService, getCalculationService, getCartService, getCatalogVersionService, getCheckOrderAction, getCommentTypes, getCommerceStockService, getCommonI18NService, getComponents, getConsignmentBusinessProcessService, getConsignmentCancellationService, getCsAgentGroups, getDeliveryMode, getDeliveryModes, getDeliveryModeService, getDomains, getEmailAddresses, getModelService, getNewestWorkflowService, getOrder, getOrderBusinessProcessService, getOrderCancelService, getOrderEntryModel_Camera, getOrderEntryModel_MemoryCard, getOrders, getPaymentInfos, getPointOfServiceService, getPointsOfService, getProcessDefinitionFactory, getProducts, getProductService, getRefundService, getRestockConfigModel, getRestockConfigs, getReturnRequests, getReturnService, getSourceOrderAction, getSourcingBanService, getSourcingConfigs, getSourcingService, getStockLevels, getStockService, getUsers, getUserService, getWarehouses, getWarehouseStockService, getWarehousingWorkflowDao, getWorkflowActionTemplates, getWorkflowDecisionTemplates, getWorkflowTemplates, getWorkflowTemplateService, refreshOrder, saveAll, setAllocationService, setAtpFormulas, setAutomatedWorkflowActionTemplates, setBaseStores, setBaseStoreService, setCalculatedStatus, setCalculationService, setCartService, setCatalogVersionService, setCheckOrderAction, setCommentTypes, setCommerceStockService, setCommonI18NService, setComponents, setConsignmentBusinessProcessService, setConsignmentCancellationService, setCsAgentGroups, setDeliveryMode, setDeliveryModes, setDeliveryModeService, setDomains, setDummyOrderTransaction, setDummyPriceRowModel, setEmailAddresses, setModelService, setNewestWorkflowService, setOrder, setOrderBusinessProcessService, setOrderCancelService, setOrders, setPaymentInfos, setPointOfServiceService, setPointsOfService, setProcessDefinitionFactory, setProducts, setProductService, setRefundService, setRestockConfigModel, setRestockConfigs, setReturnRequests, setReturnService, setSourceOrderAction, setSourcingBanService, setSourcingConfigs, setSourcingFactors, setSourcingService, setStockLevels, setStockService, setUsers, setUserService, setWarehouses, setWarehouseStockService, setWarehousingWorkflowDao, setWorkflowActionTemplates, setWorkflowDecisionTemplates, setWorkflowTemplates, setWorkflowTemplateService
-
-
-
-
Field Detail
-
ORDER_TEST_PROCESS
protected static final java.lang.String ORDER_TEST_PROCESS
- See Also:
- Constant Field Values
-
ORDER_PROCESS_DEFINITION_NAME
protected static final java.lang.String ORDER_PROCESS_DEFINITION_NAME
- See Also:
- Constant Field Values
-
RETURN_PROCESS_DEFINITION_NAME
protected static final java.lang.String RETURN_PROCESS_DEFINITION_NAME
- See Also:
- Constant Field Values
-
CONSIGNMENT_ACTION_EVENT_NAME
protected static final java.lang.String CONSIGNMENT_ACTION_EVENT_NAME
- See Also:
- Constant Field Values
-
ORDER_ACTION_EVENT_NAME
protected static final java.lang.String ORDER_ACTION_EVENT_NAME
- See Also:
- Constant Field Values
-
timeOut
protected static final int timeOut
- See Also:
- Constant Field Values
-
-
Method Detail
-
waitUntilProcessIsNotRunning
public void waitUntilProcessIsNotRunning(BusinessProcessModel process, int timeOut) throws java.lang.InterruptedException
wait until process is not running- Parameters:
process
-timeOut
-- Throws:
java.lang.InterruptedException
-
waitUntilReturnProcessExist
public void waitUntilReturnProcessExist(ReturnRequestModel returnRequest, java.lang.String processName, int timeOut) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
waitUntilConsignmentProcessIsNotRunning
public void waitUntilConsignmentProcessIsNotRunning(OrderProcessModel orderProcessModel, ConsignmentModel consignment, int timeOut) throws java.lang.InterruptedException
wait for consignment process is not running- Parameters:
orderProcessModel
-consignment
-timeOut
-- Throws:
java.lang.InterruptedException
-
waitUntilReturnProcessIsNotRunning
public void waitUntilReturnProcessIsNotRunning(ReturnRequestModel returnRequestModel, int timeOut) throws java.lang.InterruptedException
wait for return process is not running- Parameters:
returnRequestModel
-timeOut
-- Throws:
java.lang.InterruptedException
-
moveOrderProcess
public void moveOrderProcess(OrderModel order, OrderProcessModel orderProcessModel, java.lang.String choice) throws java.lang.InterruptedException
Moves theOrderProcessModel
according to the given choice and waits for the consignment and order process to finish or until timeout occurs- Parameters:
order
- the givenOrderModel
orderProcessModel
- the associatedOrderProcessModel
with the givenOrderModel
choice
- the choice with which to move the givenOrderProcessModel
- Throws:
java.lang.InterruptedException
-
getReturnBusinessProcessService
public WarehousingBusinessProcessService<ReturnRequestModel> getReturnBusinessProcessService()
- Overrides:
getReturnBusinessProcessService
in classBaseUtil
-
setReturnBusinessProcessService
public void setReturnBusinessProcessService(WarehousingBusinessProcessService<ReturnRequestModel> returnBusinessProcessService)
- Overrides:
setReturnBusinessProcessService
in classBaseUtil
-
getBusinessProcessService
public BusinessProcessService getBusinessProcessService()
- Overrides:
getBusinessProcessService
in classBaseUtil
-
setBusinessProcessService
public void setBusinessProcessService(BusinessProcessService businessProcessService)
- Overrides:
setBusinessProcessService
in classBaseUtil
-
-