public abstract class AbstractMDMStateMachinePersistor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected CodDefinition |
codDefinition |
static java.lang.String |
DB_EVENT |
static java.lang.String |
DEFAULT_PERSISTER |
static java.lang.String |
DESTINATION_STATE_ID |
static java.lang.String |
HISTORY_ID |
static java.lang.String |
HISTORYPOINTERS_XML |
static java.lang.String |
SEBUSINESSOBJECTXML |
static java.lang.String |
SEINSTANCEID |
static java.lang.String |
SEMETADATA |
static java.lang.String |
SEMODIFIEDDATE |
static java.lang.String |
SEOPERATION |
static java.lang.String |
SEORGANIZATION |
static java.lang.String |
SESOURCE |
static java.lang.String |
SESTATENAME |
Constructor and Description |
---|
AbstractMDMStateMachinePersistor(CodDefinition codDefinition)
Constructs an
AbstractMDMStateMachinePersistor with the specified CodDefinition |
Modifier and Type | Method and Description |
---|---|
void |
audit(Instance instance,
java.lang.String eventName)
This method will be used to record/audit the changes happening on a state instance and is invoked in the following cases.
|
void |
audit(Instance instance,
java.lang.String eventName,
java.lang.Throwable executionException)
This method will be used to record/audit the changes happening on a state instance and is invoked in the following cases.
|
abstract Instance |
getInstance(BusinessObject bizzObject)
This method should return state instance for the given input from the underlying persistent store.
|
abstract Instance |
getInstance(java.lang.String instanceID)
This method should return state instance for the given input from the underlying persistent store.
|
abstract void |
removeInstance(java.lang.String instanceID)
This method is invoked when a state instance enters the final state.
|
abstract void |
saveInstance(Instance instance,
boolean insert)
This method is invoked when a state instance has successfully entered the state i.e.
|
public static final java.lang.String SEINSTANCEID
public static final java.lang.String SEBUSINESSOBJECTXML
public static final java.lang.String SEMETADATA
public static final java.lang.String SESTATENAME
public static final java.lang.String SEMODIFIEDDATE
public static final java.lang.String SEOPERATION
public static final java.lang.String SESOURCE
public static final java.lang.String SEORGANIZATION
public static final java.lang.String HISTORYPOINTERS_XML
public static final java.lang.String HISTORY_ID
public static final java.lang.String DESTINATION_STATE_ID
public static final java.lang.String DB_EVENT
public static final java.lang.String DEFAULT_PERSISTER
protected CodDefinition codDefinition
public AbstractMDMStateMachinePersistor(CodDefinition codDefinition) throws MDMStateMachinePersistorException
AbstractMDMStateMachinePersistor
with the specified CodDefinition
codDefinition
- MDMStateMachinePersistorException
public abstract void saveInstance(Instance instance, boolean insert) throws MDMStateMachinePersistorException
getInstance(BusinessObject)
or getInstance(String)
methods.instance
- state instance to be savedinsert
- true if state is initial stateMDMStateMachinePersistorException
public abstract void removeInstance(java.lang.String instanceID) throws MDMStateMachinePersistorException
instanceID
- unique id of the state instanceMDMStateMachinePersistorException
public abstract Instance getInstance(BusinessObject bizzObject) throws MDMStateMachinePersistorException
bizzObject
- BusinessObject
wrapper around the state machine instance payloadMDMStateMachinePersistorException
public abstract Instance getInstance(java.lang.String instanceID) throws MDMStateMachinePersistorException
instanceID
- unique id of the state instanceMDMStateMachinePersistorException
public final void audit(Instance instance, java.lang.String eventName)
instance
- state instance to be auditedeventName
- event name associated with the transition. null if no event is defined on the transition.public final void audit(Instance instance, java.lang.String eventName, java.lang.Throwable executionException)
instance
- state instance to be auditedeventName
- event name associated with the transition. null if no event is defined on the transition.executionException
- exception thrown during activity execution. null otherwise.