Class CreateBulkTransactionServiceImpl
java.lang.Object
com.skava.inventory.service.impl.CommonDependencies
com.skava.inventory.service.impl.transaction.CreateBulkTransactionServiceImpl
- All Implemented Interfaces:
com.skava.core.EcommService<CreateBulkTransactionRequest,
,BulkTransactionResponse> CustomEcommService<CreateBulkTransactionRequest,
,BulkTransactionResponse> CreateBulkTransactionService
@Service
public class CreateBulkTransactionServiceImpl
extends CommonDependencies
implements CreateBulkTransactionService
This class implements the
The transaction types are as follows:
The response of this request is given through the BulkTransaction model.
Note: A user with the privilege to create a transaction can create a bulk transaction for one or more bin items.
CreateBulkTransactionService
interface
to handle create bulk transaction for multiple bin items.
Creates a bulk transaction for multiple bin items. Each bin can have a set of bin items. A bin item is a SKU
associated with a particular bin. A transaction helps to manage the quantity of a bin item.The transaction types are as follows:
- Type 1 - The ADD transaction enables the user to add the inventory of a bin item.
- Type 2 - The REMOVE transaction enables the user to remove the inventory of a bin item.
- Type 3 - The TRANSFER transaction enables the user to transfer the bin items from one bin to another. In the transfer inventory transaction, there is no intermediate state (in-transit). Once a transfer transaction is initiated, the inventory from the source bin would be reduced for the corresponding bin item and increased in the destination bin. The entire process is locked until completion. If there are any exceptions, then the entire process would be reversed and there would be no change in the bin status. However, if the destination bin does not have the relevant bin item, then a new transaction would be initiated to create the bin item first.
- Type 4 - The RECONCILE transaction enables the user to reconcile the system inventory against the actual physical inventory through periodic stock checks. As a result of the reconciliation, the system inventory would be updated to be in sync with the actual available physical inventory. This transaction always happens at the bin item level.
The response of this request is given through the BulkTransaction model.
Note: A user with the privilege to create a transaction can create a bulk transaction for one or more bin items.
- Since:
- Aug 31, 2018
- Author:
- Infosys Equinox
-
Field Summary
Fields inherited from class com.skava.inventory.service.impl.CommonDependencies
binItemRepository, binRepository, cacheUtil, collectionDependencies, collectionPropertyRepository, collectionRepository, context, createBinItemService, createBinService, inventoryEventService, messageSource, searchCountCache, transactionRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
getValidator
(CreateBulkTransactionRequest request) process
(CreateBulkTransactionRequest request) This method is used to create bulk Transaction based on given request.Methods inherited from class com.skava.inventory.service.impl.CommonDependencies
checkBinIsActive, checkBinItemIsActive, checkForDuplicateName, clearCollectionCache, clearCollectionPropertyCache
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.inventory.service.CustomEcommService
getValidateException
Methods inherited from interface com.skava.core.EcommService
getValidator
-
Constructor Details
-
CreateBulkTransactionServiceImpl
public CreateBulkTransactionServiceImpl()
-
-
Method Details
-
process
@Audit @Retryable(maxAttempts=10, backoff=@Backoff(delay=3L,maxDelay=10L,multiplier=4.0,random=true)) @Transactional(isolation=SERIALIZABLE) @HystrixCommand(commandKey="inventory-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) @SendEvent(eventType="inventoryservice/transactionbulk/create", identifier="response_bulkTransaction.binItems.binName") public BulkTransactionResponse process(@AuditField(field="CreateBulkTransactionRequest") CreateBulkTransactionRequest request) This method is used to create bulk Transaction based on given request. The given request will be audit for reference. Initially it will check collection and bin item is available. if any one of the transaction is to be failed, then the request will be revoked based on the flag 'allOrNone' as true- Specified by:
process
in interfacecom.skava.core.EcommService<CreateBulkTransactionRequest,
BulkTransactionResponse> - Parameters:
request
- It contains the attributes required for the creation of Transaction.- Returns:
- It returns the
BulkTransactionResponse
.
-
getValidator
public List<com.skava.core.validation.ValidatorComponent> getValidator(CreateBulkTransactionRequest request) - Specified by:
getValidator
in interfacecom.skava.core.EcommService<CreateBulkTransactionRequest,
BulkTransactionResponse>
-