Package com.appiancorp.suiteapi.process
Class HistoryRecord
java.lang.Object
com.appiancorp.suiteapi.process.HistoryRecord
- All Implemented Interfaces:
Serializable
An individual history record, representing an element of an audit trail in a
process.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Information about a process model, including id, version, name and uuid. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final Integer
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Represents an edit of a process from Edit Mode.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Represents an upgrade of a process to a new process model. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static Comparator
getComparator
(int sortKey) Comparator for HistoryRecordgetData()
Get the associated data for the history record; note, those history records that return multiple objects will return them as an Object[].Long[]
Set only by history types ADD_ATTACHMENT, REMOVE_ATTACHMENT, ADD_NOTE, REMOVE_NOTESet only by history type CHANGE_PRIORITYint
This is 0 for EXEC00, 1 for EXEC01, etc.Long[]
Set only by history types ESCALATION_NOTIFICATION, REASSIGNED, ASSIGNEDSet only by history type CHANGE_PRIORITYSet only by history type SCHEDULESet only by history type MODIFY_VARIABLE.Id of the object in the history record.Name of the object in the history record.int
Type of the object in the history record.Gets the resulting process model version that the edited process was saved as.Gets a ProcessModelInfo object representing the source process model that was in use before the process upgrade.Gets a ProcessModelInfo object representing the target process model to which the process was upgraded.Timestamp at which this modification occurred.int
getType()
Type of this history record (e.g., START is 6, MODIFY_VARIABLE is 17, etc.)getUser()
The user responsible for the history record.String[]
getUsers()
Set only by history types ESCALATION_NOTIFICATION, REASSIGNED, ASSIGNEDint
This advances by one every time a write to external (set, modify, or delete) occurs within an engine.int
Whenever the writeCounter advances beyond Integer.MAX_VALUE, it resets to 0, and the writeEpoch increases by one.long
The writeIndex encapsulates both writeCounter and writeEpoch into a single value.int
hashCode()
void
setDataIds
(Long[] dataIds_) void
setDirection
(Long direction_) void
setEngineId
(int engineId_) This is 0 for EXEC00, 1 for EXEC01, etc.void
void
setIndex
(int[] indices) void
void
setNewName
(String newName_) Set only by history types ADD_VARIABLE, MODIFY_NAMEvoid
setNewPriority
(Long newPriority_) void
setNewTimestamp
(Timestamp newTimestamp_) void
setNewValue
(TypedValue newValue_) void
setObjectId
(Long objectId_) void
setObjectName
(String objectName_) void
setObjectType
(int objectType_) void
setSavedAsVersion
(String savedAsVersion) Sets the process model version that the edited process was saved as.void
setSourceModel
(HistoryRecord.ProcessModelInfo sourceModel) Sets the ProcessModelInfo object representing the source process model that was in use before the process upgrade.void
setTargetModel
(HistoryRecord.ProcessModelInfo targetModel) Sets the ProcessModelInfo object representing the target process model to which the process was upgraded.void
setTimestamp
(Timestamp timestamp_) void
setType
(int historyType_) void
void
void
setWriteCounter
(int writeCounter_) void
setWriteEpoch
(int writeEpoch_) void
setWriteIndex
(long value) The writeIndex encapsulates both writeCounter and writeEpoch into a single value.toString()
Only intended to help debugging.
-
Field Details
-
TYPE_CHANGE_PRIORITY
public static final int TYPE_CHANGE_PRIORITY- See Also:
-
TYPE_SCHEDULE
public static final int TYPE_SCHEDULE- See Also:
-
TYPE_ASSIGNED
public static final int TYPE_ASSIGNED- See Also:
-
TYPE_REASSIGNED
public static final int TYPE_REASSIGNED- See Also:
-
TYPE_ESCALATED
public static final int TYPE_ESCALATED- See Also:
-
TYPE_ESCALATION_NOTIFICATION
public static final int TYPE_ESCALATION_NOTIFICATION- See Also:
-
TYPE_START
public static final int TYPE_START- See Also:
-
TYPE_CANCEL
public static final int TYPE_CANCEL- See Also:
-
TYPE_PAUSE
public static final int TYPE_PAUSE- See Also:
-
TYPE_RESUME
public static final int TYPE_RESUME- See Also:
-
TYPE_COMPLETE
public static final int TYPE_COMPLETE- See Also:
-
TYPE_ADD_ATTACHMENT
public static final int TYPE_ADD_ATTACHMENT- See Also:
-
TYPE_REMOVE_ATTACHMENT
public static final int TYPE_REMOVE_ATTACHMENT- See Also:
-
TYPE_ADD_NOTE
public static final int TYPE_ADD_NOTE- See Also:
-
TYPE_REMOVE_NOTE
public static final int TYPE_REMOVE_NOTE- See Also:
-
TYPE_MODIFY_NAME
public static final int TYPE_MODIFY_NAME- See Also:
-
TYPE_MODIFY_VARIABLE
public static final int TYPE_MODIFY_VARIABLE- See Also:
-
TYPE_ADD_VARIABLE
public static final int TYPE_ADD_VARIABLE- See Also:
-
TYPE_EVENT_ACTIVATE
public static final int TYPE_EVENT_ACTIVATE- See Also:
-
TYPE_EVENT_FIRE
public static final int TYPE_EVENT_FIRE- See Also:
-
TYPE_EVENT_CANCEL
public static final int TYPE_EVENT_CANCEL- See Also:
-
TYPE_EVENT_ABORT
public static final int TYPE_EVENT_ABORT- See Also:
-
TYPE_MODIFY_EXTERNAL_VARIABLE
public static final int TYPE_MODIFY_EXTERNAL_VARIABLE- See Also:
-
TYPE_EDIT_PROCESS
public static final int TYPE_EDIT_PROCESSRepresents an edit of a process from Edit Mode.- See Also:
-
TYPE_UPGRADE_PROCESS
public static final int TYPE_UPGRADE_PROCESSRepresents an upgrade of a process to a new process model.- See Also:
-
OBJECT_TYPE_PROCESS
public static final int OBJECT_TYPE_PROCESS- See Also:
-
OBJECT_TYPE_TASK
public static final int OBJECT_TYPE_TASK- See Also:
-
OBJECT_TYPE_VARIABLE
public static final int OBJECT_TYPE_VARIABLE- See Also:
-
SORT_BY_USER
-
SORT_BY_TIMESTAMP
-
SORT_BY_TYPE
-
SORT_BY_OBJECT_TYPE
-
SORT_BY_OBJECT_ID
-
SORT_BY_OBJECT_NAME
-
SORT_BY_NEW_VALUE
-
SORT_BY_NEW_NAME
-
SORT_BY_DATA_IDS
-
SORT_BY_USERS
-
SORT_BY_GROUPS
-
SORT_BY_NEW_TIMESTAMP
-
SORT_BY_DIRECTION
-
SORT_BY_NEW_PRIORITY
-
SORT_BY_SAVED_AS_VERSION
-
SORT_BY_SOURCE_MODEL_INFO
-
SORT_BY_TARGET_MODEL_INFO
-
-
Constructor Details
-
HistoryRecord
public HistoryRecord()
-
-
Method Details
-
getData
Get the associated data for the history record; note, those history records that return multiple objects will return them as an Object[]. Null will be returned for those history types without associated data.- Returns:
-
getType
public int getType()Type of this history record (e.g., START is 6, MODIFY_VARIABLE is 17, etc.) See HistoryRecordConstants.- Returns:
-
setType
public void setType(int historyType_) -
getTimestamp
Timestamp at which this modification occurred.- Returns:
-
setTimestamp
-
getObjectId
Id of the object in the history record.- Returns:
-
setObjectId
-
getObjectName
Name of the object in the history record.- Returns:
-
setObjectName
-
getObjectType
public int getObjectType()Type of the object in the history record.- Returns:
-
setObjectType
public void setObjectType(int objectType_) -
getUser
The user responsible for the history record.- Returns:
-
setUser
-
getNewValue
Set only by history type MODIFY_VARIABLE.- Returns:
-
setNewValue
-
getDataIds
Set only by history types ADD_ATTACHMENT, REMOVE_ATTACHMENT, ADD_NOTE, REMOVE_NOTE- Returns:
-
setDataIds
-
getDirection
Set only by history type CHANGE_PRIORITY- Returns:
-
setDirection
-
getGroups
Set only by history types ESCALATION_NOTIFICATION, REASSIGNED, ASSIGNED- Returns:
-
setGroups
-
getNewName
-
setNewName
Set only by history types ADD_VARIABLE, MODIFY_NAME- Parameters:
newName_
-
-
getNewPriority
Set only by history type CHANGE_PRIORITY- Returns:
-
setNewPriority
-
getNewTimestamp
Set only by history type SCHEDULE- Returns:
-
setNewTimestamp
-
getUsers
Set only by history types ESCALATION_NOTIFICATION, REASSIGNED, ASSIGNED- Returns:
-
setUsers
-
getSavedAsVersion
Gets the resulting process model version that the edited process was saved as. Set only by EDIT_PROCESS, if the edited process was saved as a new version.- Returns:
- the version that the edited process was saved as
-
setSavedAsVersion
Sets the process model version that the edited process was saved as. Only relevant for the EDIT_PROCESS history type.- Parameters:
savedAsVersion
- the process model version that the edited process was saved as
-
getSourceModel
Gets a ProcessModelInfo object representing the source process model that was in use before the process upgrade. Only set by the UPGRADE_PROCESS history type.- Returns:
- a ProcessModelInfo object representing the source process model
-
setSourceModel
Sets the ProcessModelInfo object representing the source process model that was in use before the process upgrade. Only relevant for the UPGRADE_PROCESS history type.- Parameters:
sourceModel
- a ProcessModelInfo object representing the source process model
-
getTargetModel
Gets a ProcessModelInfo object representing the target process model to which the process was upgraded. Only set by the UPGRADE_PROCESS history type.- Returns:
- a ProcessModelInfo object representing the target process model
-
setTargetModel
Sets the ProcessModelInfo object representing the target process model to which the process was upgraded. Only relevant for the UPGRADE_PROCESS history type.- Parameters:
targetModel
- a ProcessModelInfo object representing the target process model
-
getWriteIndex
public long getWriteIndex()The writeIndex encapsulates both writeCounter and writeEpoch into a single value. Aside from rolling back to previous revisions, the writeIndex always increases once per write within a given execution engine. No writeIndexes are shared (at least until the writeEpoch wraps). This should be combined with the engineId to form the basis of external storage process history keys.- Returns:
-
setWriteIndex
public void setWriteIndex(long value) The writeIndex encapsulates both writeCounter and writeEpoch into a single value. -
getWriteCounter
public int getWriteCounter()This advances by one every time a write to external (set, modify, or delete) occurs within an engine.- Returns:
- the writeCounter
-
setWriteCounter
public void setWriteCounter(int writeCounter_) - Parameters:
writeCounter_
- the writeCounter to set
-
getWriteEpoch
public int getWriteEpoch()Whenever the writeCounter advances beyond Integer.MAX_VALUE, it resets to 0, and the writeEpoch increases by one.- Returns:
- the writeEpoch
-
setWriteEpoch
public void setWriteEpoch(int writeEpoch_) - Parameters:
writeEpoch_
- the writeEpoch to set
-
getEngineId
public int getEngineId()This is 0 for EXEC00, 1 for EXEC01, etc.- Returns:
- the engineId
-
setEngineId
public void setEngineId(int engineId_) This is 0 for EXEC00, 1 for EXEC01, etc.- Parameters:
engineId_
- the engineId to set
-
setIndex
-
setIndex
public void setIndex(int[] indices) -
toString
Only intended to help debugging. The format of this String is not guaranteed and may change. -
hashCode
public int hashCode() -
equals
-
getComparator
Comparator for HistoryRecord- Parameters:
sortKey
-- Returns:
- Comparator based on given sortKey
-