Class BTWarehouseTransactionEvaluate
java.lang.Object
overit.geocall.bl.BusinessTask<WarehouseTransactionEvaluateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidExecutionBusinessTask<WarehouseTransactionEvaluateEvent>
overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask<WarehouseTransactionEvaluateEvent>
overit.geocallapp.wfm.inventory.bl.task.BTInventoryManagement<WarehouseTransactionEvaluateEvent>
overit.geocallapp.wfm.inventory.bl.warehouse.transaction.task.BTWarehouseTransactionEvaluate
- All Implemented Interfaces:
Serializable,Tool,ValidExecution
@Event(WarehouseTransactionEvaluateEvent.class)
public class BTWarehouseTransactionEvaluate
extends BTInventoryManagement<WarehouseTransactionEvaluateEvent>
Business task in order to evaluate a
When the
BOWarehouseTransaction. When the
WarehouseTransactionEvaluateEvent is launched the BT notices the call and evaluates the BOWarehouseTransaction basing on
the event's input. Permission:
Error Code:
Codes.Inventory.LOAD_OPERATION_NOT_VALID: Load operation not allowed.Codes.Inventory.MATERIAL_IN_WAREHOUSE_NOT_FOUND: The material {0} is not admitted in the warehouse.Codes.Inventory.SERIALIZED_MATERIAL_NOT_ASSOCIATED: Serialized material {0} is not associated to the stock.Codes.Inventory.SERIALIZED_MATERIAL_ALREADY_ASSOCIATED: Serialized material {0} is associated to another stock.
- Since:
- 13.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsFields inherited from class overit.geocallapp.utilities.core.bl.common.validexecution.ValidPermissionBusinessTask
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BOWarehouseMaterialactivateWarehouseMaterial(BOWarehouseMaterial boWarehouseMaterial, PoolKit poolKit) Activate theBOWarehouseMaterial.protected voidexecute(WarehouseTransactionEvaluateEvent event, PoolKit poolKit) Executes the actual business logic after validation has passed.protected BOWarehouseMaterialgetWarehouseMaterial(BOWarehouseTransaction transaction, PoolKit poolKit) Loads theBOWarehouseMaterialstarting from the givenBOWarehouseTransactiondata.protected LonginsertStock(BOWarehouseMaterial boWarehouseMaterial, BOWarehouseTransaction transaction, PoolKit poolKit) protected LonginsertWarehouseMaterial(BOWarehouseTransaction transaction, Boolean isActive, PoolKit poolKit) Inserts a newBOWarehouseMaterialstarting from the givenBOWarehouseTransaction.booleanChecks if the execution is valid.protected voidmanageStock(BOWarehouseMaterial boWarehouseMaterial, BOWarehouseTransaction transaction, PoolKit poolKit) Manages theBOStockrelated to the givenBOWarehouseMaterial.protected voidupdateStock(BOStock stock, BOWarehouseTransaction transaction, PoolKit poolKit) Updates theBOStockrelated to the currentBOWarehouseTransaction.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
-
Field Details
-
stockId
-
-
Constructor Details
-
BTWarehouseTransactionEvaluate
public BTWarehouseTransactionEvaluate()
-
-
Method Details
-
isValidExecution
public boolean isValidExecution()Checks if the execution is valid.- Returns:
- true, if successful
-
execute
protected void execute(WarehouseTransactionEvaluateEvent event, PoolKit poolKit) throws DAException, DAValidateException Description copied from class:ValidExecutionBusinessTaskExecutes the actual business logic after validation has passed.- Specified by:
executein classValidExecutionBusinessTask<WarehouseTransactionEvaluateEvent>- Parameters:
event- theWarehouseTransactionEvaluateEventpoolKit- thePoolKit- Throws:
DAException- the DA exceptionDAValidateException- the DA validate exception
-
getWarehouseMaterial
protected BOWarehouseMaterial getWarehouseMaterial(BOWarehouseTransaction transaction, PoolKit poolKit) throws DAValidateException, DAException Loads theBOWarehouseMaterialstarting from the givenBOWarehouseTransactiondata.- Parameters:
transaction- the currentBOWarehouseTransactionpoolKit- thePoolKit- Returns:
- the loaded warehouse material
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
insertWarehouseMaterial
protected Long insertWarehouseMaterial(BOWarehouseTransaction transaction, Boolean isActive, PoolKit poolKit) throws DAValidateException, DAException Inserts a newBOWarehouseMaterialstarting from the givenBOWarehouseTransaction.- Parameters:
transaction- the currentBOWarehouseTransactionisActive-poolKit- thePoolKit- Returns:
- the id of the inserted
BOWarehouseMaterial - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
activateWarehouseMaterial
protected BOWarehouseMaterial activateWarehouseMaterial(BOWarehouseMaterial boWarehouseMaterial, PoolKit poolKit) throws DAValidateException, DAException Activate theBOWarehouseMaterial.- Parameters:
boWarehouseMaterial- the currentBOWarehouseMaterialpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
manageStock
protected void manageStock(BOWarehouseMaterial boWarehouseMaterial, BOWarehouseTransaction transaction, PoolKit poolKit) throws DAValidateException, DAException Manages theBOStockrelated to the givenBOWarehouseMaterial.- Parameters:
boWarehouseMaterial- the given BOWarehouseMaterialtransaction- the currentBOWarehouseTransactionpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
insertStock
protected Long insertStock(BOWarehouseMaterial boWarehouseMaterial, BOWarehouseTransaction transaction, PoolKit poolKit) throws DAValidateException, DAException - Parameters:
boWarehouseMaterial- the givenBOWarehouseMaterialtransaction- the currentBOWarehouseTransactionpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
updateStock
protected void updateStock(BOStock stock, BOWarehouseTransaction transaction, PoolKit poolKit) throws DAValidateException, DAException Updates theBOStockrelated to the currentBOWarehouseTransaction.- Parameters:
stock- theBOStockto updatetransaction- the currentBOWarehouseTransactionpoolKit- thePoolKit- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-