@Service(value="blActivityStateManager") public class ActivityStateManagerImpl extends Object implements ActivityStateManager
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Stack<org.broadleafcommerce.core.workflow.state.ActivityStateManagerImpl.StateContainer>> |
stateMap |
| Constructor and Description |
|---|
ActivityStateManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllState()
Remove all previously registered RollbackHandlers for the current workflow
|
void |
clearRegionState(String region)
Remove all previously registered Rollbackhandlers for the current workflow labelled with the specified region
|
protected RollbackStateLocal |
getRollbackStateLocal() |
static ActivityStateManager |
getStateManager() |
void |
init() |
void |
registerState(Activity<? extends ProcessContext> activity,
ProcessContext processContext,
RollbackHandler rollbackHandler,
Map<String,Object> stateItems)
Register a RollbackHandler instance and some arbitrary state items with the
StateManager.
|
void |
registerState(Activity<? extends ProcessContext> activity,
ProcessContext processContext,
String region,
RollbackHandler rollbackHandler,
Map<String,Object> stateItems)
Register a RollbackHandler instance and some arbitrary state items with the
StateManager.
|
void |
registerState(RollbackHandler rollbackHandler,
Map<String,Object> stateItems)
Register a RollbackHandler instance and some arbitrary state items with the
StateManager.
|
void |
rollbackAllState()
Cause the StateManager to call all registered RollbackHandlers
|
void |
rollbackRegionState(String region)
Cause the StateManager to call all registered RollbackHandlers in the specified region.
|
public static ActivityStateManager getStateManager()
@PostConstruct public void init()
public void clearAllState()
ActivityStateManagerclearAllState in interface ActivityStateManagerpublic void clearRegionState(String region)
ActivityStateManagerclearRegionState in interface ActivityStateManagerregion - The region to which the scope of removal is limitedpublic void registerState(RollbackHandler rollbackHandler, Map<String,Object> stateItems)
ActivityStateManagerregisterState in interface ActivityStateManagerrollbackHandler - A RollbackHandler instance that should be executed by the StateManagerstateItems - Configuration items for the RollbackHandler (can be null)public void registerState(Activity<? extends ProcessContext> activity, ProcessContext processContext, RollbackHandler rollbackHandler, Map<String,Object> stateItems)
ActivityStateManagerregisterState in interface ActivityStateManageractivity - the current activity associated with the RollbackHandler (can be null)processContext - the current ProcessContext associated with the activity (can be null)rollbackHandler - A RollbackHandler instance that should be executed by the StateManagerstateItems - Configuration items for the RollbackHandler (can be null)public void registerState(Activity<? extends ProcessContext> activity, ProcessContext processContext, String region, RollbackHandler rollbackHandler, Map<String,Object> stateItems)
ActivityStateManagerregisterState in interface ActivityStateManageractivity - the current activity associated with the RollbackHandler (can be null)processContext - the current ProcessContext associated with the activity (can be null)region - Label this rollback handler with a particular name.rollbackHandler - A RollbackHandler instance that should be executed by the StateManagerstateItems - Configuration items for the RollbackHandler (can be null)public void rollbackAllState()
throws RollbackFailureException
ActivityStateManagerrollbackAllState in interface ActivityStateManagerRollbackFailureException - if the rollback fails for some reasonpublic void rollbackRegionState(String region) throws RollbackFailureException
ActivityStateManagerrollbackRegionState in interface ActivityStateManagerRollbackFailureException - if the rollback fails for some reasonprotected RollbackStateLocal getRollbackStateLocal()
Copyright © 2015. All Rights Reserved.