public abstract class AbstractCheckAvailabilityActivity extends BaseActivity<ProcessContext<CartOperationRequest>>
| Modifier and Type | Field and Description |
|---|---|
protected ContextualInventoryService |
inventoryService |
automaticallyRegisterRollbackHandler, beanName, errorHandler, order, rollbackHandler, rollbackRegion, stateConfiguration| Constructor and Description |
|---|
AbstractCheckAvailabilityActivity() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkSkuAvailability(Order order,
Sku sku,
Integer requestedQuantity) |
boolean |
shouldExecute(ProcessContext<CartOperationRequest> context)
Determines if an activity should execute based on the current values in the
ProcessContext. |
getAutomaticallyRegisterRollbackHandler, getBeanName, getErrorHandler, getOrder, getRollbackHandler, getRollbackRegion, getStateConfiguration, setAutomaticallyRegisterRollbackHandler, setBeanName, setErrorHandler, setOrder, setRollbackHandler, setRollbackRegion, setStateConfigurationprotected ContextualInventoryService inventoryService
public boolean shouldExecute(ProcessContext<CartOperationRequest> context)
ActivityProcessContext. For example, a
context might have both an Order as well as a String 'status' of what the order should be changed to. It is
possible that an activity in a workflow could only deal with a particular status change, and thus could return false
from this method.shouldExecute in interface Activity<ProcessContext<CartOperationRequest>>shouldExecute in class BaseActivity<ProcessContext<CartOperationRequest>>protected void checkSkuAvailability(Order order, Sku sku, Integer requestedQuantity) throws InventoryUnavailableException
InventoryUnavailableExceptionCopyright © 2018. All rights reserved.