Class BTTransferRequestSend
java.lang.Object
overit.geocall.bl.BusinessTask<TransferRequestSendEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<TransferRequestSendEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<TransferRequestSendEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<TransferRequestSendEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.transfer.request.task.BTTransferRequestSend
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(TransferRequestSendEvent.class)
public class BTTransferRequestSend
extends BTInventoryManagement<TransferRequestSendEvent>
Business task in order to submit a
When the
TransferRequest. When the
TransferRequestSendEvent is launched
the BT notices the call and changes the TransferRequest state to BOTransferRequestState.Values.SENT basing on the event's input. - Since:
- 14.0
- See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LongcreateWarehouseOperation(TransferRequest transferRequest, PoolKit poolKit) Creates the warehouse operation by calling theWarehouseOperationCreationFromTransferRequestEvent.protected voidexecute(TransferRequestSendEvent event, PoolKit poolKit) After performing all the necessary validations, it sends theWarehouseOperationcreated from the currentTransferRequest.Returns the log helper.protected LogMessageHelperbooleanChecks if the execution is valid.protected TransferRequestloadTransferRequest(TransferRequestSendInput input, PoolKit poolKit) Loads theTransferRequeststarting from its ids.protected voidnotifyStateChange(Long transferRequestId, PoolKit poolKit) Notifies the change of theTransferRequeststate.protected voidopenLog()Prepares the filter data.Prepares the update data.protected voidsendWarehouseOperation(Long operationId, PoolKit poolKit) Sends the givenWarehouseOperationby calling theWarehouseOperationSendEvent.protected voidupdate(TransferRequestSendInput input, PoolKit poolKit) Updates the state of the givenTransferRequest.protected voidvalidateData(TransferRequest transferRequest, PoolKit poolKit) Validates the data before the state change.Methods inherited from class overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement
checkValidExecutionMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
getException, throwExceptionIfInvalidMethods inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask
body, getEventMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTTransferRequestSend
public BTTransferRequestSend()
-
-
Method Details
-
getLogHelper
Returns the log helper.- Returns:
- the log helper
-
getLogMessage
-
execute
protected void execute(TransferRequestSendEvent event, PoolKit poolKit) throws DAException, DAValidateException After performing all the necessary validations, it sends theWarehouseOperationcreated from the currentTransferRequest. If the sending proceeds with no error, it also change the state of the transfer request toBOTransferRequestState.Values.SENT.- Specified by:
executein classValidExecutionBusinessTask<TransferRequestSendEvent>- Parameters:
event- theTransferRequestSendEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
openLog
- Throws:
DAValidateExceptionDAException
-
loadTransferRequest
protected TransferRequest loadTransferRequest(TransferRequestSendInput input, PoolKit poolKit) throws DAValidateException, DAException Loads theTransferRequeststarting from its ids.- Parameters:
input- theTransferRequestSendInputpoolKit- thePoolKit- Returns:
- the transfer request
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
validateData
protected void validateData(TransferRequest transferRequest, PoolKit poolKit) throws DAValidateException, DAException Validates the data before the state change.- Parameters:
transferRequest- the transfer requestpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
createWarehouseOperation
protected Long createWarehouseOperation(TransferRequest transferRequest, PoolKit poolKit) throws DAValidateException, DAException Creates the warehouse operation by calling theWarehouseOperationCreationFromTransferRequestEvent.- Parameters:
transferRequest- the currentTransferRequestpoolKit- thePoolKit- Returns:
- the id of the created
WarehouseOperation - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
sendWarehouseOperation
protected void sendWarehouseOperation(Long operationId, PoolKit poolKit) throws DAValidateException, DAException Sends the givenWarehouseOperationby calling theWarehouseOperationSendEvent.- Parameters:
operationId- theWarehouseOperationidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
update
protected void update(TransferRequestSendInput input, PoolKit poolKit) throws DAException, DAValidateException Updates the state of the givenTransferRequest.- Parameters:
input- theTransferRequestSendInputpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
prepareFilterData
Prepares the filter data.- Parameters:
input- theTransferRequestSendInput- Returns:
- the map containing the filter for the update
-
prepareUpdateData
Prepares the update data.- Parameters:
input- theTransferRequestSendInput- Returns:
- the map containing the values for the update
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-
notifyStateChange
protected void notifyStateChange(Long transferRequestId, PoolKit poolKit) throws DAValidateException, DAException Notifies the change of theTransferRequeststate.- Parameters:
transferRequestId- theTransferRequestidpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-