public abstract class BaseActivity<T extends ProcessContext<?>> extends Object implements Activity<T>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
automaticallyRegisterRollbackHandler |
protected String |
beanName |
protected ErrorHandler |
errorHandler |
protected int |
order |
protected RollbackHandler<T> |
rollbackHandler |
protected String |
rollbackRegion |
protected Map<String,Object> |
stateConfiguration |
| Constructor and Description |
|---|
BaseActivity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAutomaticallyRegisterRollbackHandler()
Whether or not this activity should automatically register a configured RollbackHandler with the ActivityStateManager.
|
String |
getBeanName() |
ErrorHandler |
getErrorHandler()
Get the fine-grained error handler wired up for this Activity
|
int |
getOrder() |
RollbackHandler<T> |
getRollbackHandler()
Retrieve the RollbackHandler instance that should be called by the ActivityStateManager in the
event of a workflow execution problem.
|
String |
getRollbackRegion()
Retrieve the optional region label for the RollbackHandler.
|
Map<String,Object> |
getStateConfiguration()
Retrieve any user-defined state that should accompany the RollbackHandler.
|
void |
setAutomaticallyRegisterRollbackHandler(boolean automaticallyRegisterRollbackHandler)
Whether or not this activity should automatically register a configured RollbackHandler with the ActivityStateManager.
|
void |
setBeanName(String beanName) |
void |
setErrorHandler(ErrorHandler errorHandler) |
void |
setOrder(int order) |
void |
setRollbackHandler(RollbackHandler<T> rollbackHandler)
Set the RollbackHandler instance that should be called by the ActivityStateManager in the
event of a workflow execution problem.
|
void |
setRollbackRegion(String rollbackRegion)
Set the optional region label for the RollbackHandler.
|
void |
setStateConfiguration(Map<String,Object> stateConfiguration)
Set any user-defined state that should accompany the RollbackHandler.
|
boolean |
shouldExecute(T context)
Determines if an activity should execute based on the current values in the
ProcessContext. |
protected ErrorHandler errorHandler
protected String beanName
protected RollbackHandler<T extends ProcessContext<?>> rollbackHandler
protected String rollbackRegion
protected boolean automaticallyRegisterRollbackHandler
protected int order
public boolean shouldExecute(T 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<T extends ProcessContext<?>>public ErrorHandler getErrorHandler()
ActivitygetErrorHandler in interface Activity<T extends ProcessContext<?>>public void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setErrorHandler(ErrorHandler errorHandler)
setErrorHandler in interface Activity<T extends ProcessContext<?>>public String getBeanName()
getBeanName in interface Activity<T extends ProcessContext<?>>public RollbackHandler<T> getRollbackHandler()
ActivitygetRollbackHandler in interface Activity<T extends ProcessContext<?>>public void setRollbackHandler(RollbackHandler<T> rollbackHandler)
ActivitysetRollbackHandler in interface Activity<T extends ProcessContext<?>>rollbackHandler - the handler responsible for reverting state for the activitypublic String getRollbackRegion()
ActivitygetRollbackRegion in interface Activity<T extends ProcessContext<?>>public void setRollbackRegion(String rollbackRegion)
ActivitysetRollbackRegion in interface Activity<T extends ProcessContext<?>>rollbackRegion - the rollback region label for the RollbackHandler instancepublic Map<String,Object> getStateConfiguration()
ActivitygetStateConfiguration in interface Activity<T extends ProcessContext<?>>public void setStateConfiguration(Map<String,Object> stateConfiguration)
ActivitysetStateConfiguration in interface Activity<T extends ProcessContext<?>>stateConfiguration - any user-defined state configuration necessary for the execution of the RollbackHandlerpublic boolean getAutomaticallyRegisterRollbackHandler()
ActivitygetAutomaticallyRegisterRollbackHandler in interface Activity<T extends ProcessContext<?>>public void setAutomaticallyRegisterRollbackHandler(boolean automaticallyRegisterRollbackHandler)
ActivitysetAutomaticallyRegisterRollbackHandler in interface Activity<T extends ProcessContext<?>>automaticallyRegisterRollbackHandler - Whether or not to automatically register a RollbackHandler with the ActivityStateManagerpublic int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void setOrder(int order)
Copyright © 2014. All rights reserved.