Package com.appiancorp.suiteapi.process
Class AbstractProcessModel
java.lang.Object
com.appiancorp.suiteapi.common.LocalizedIdentity
com.appiancorp.suiteapi.process.AbstractProcessModel
- All Implemented Interfaces:
JSONable
,JSONCacheable
,AppianTypeHolder
,Serializable
- Direct Known Subclasses:
ProcessDiagram
,ProcessModel
public abstract class AbstractProcessModel
extends LocalizedIdentity
implements AppianTypeHolder, JSONCacheable
The template from which processes are created. A process model contains
nodes that are connected to each other through flows (aka connections).
Each node represents an activity to be performed by either the system or
a user. Nodes have one primary activity, but can have an arbitrary number
of pre- and post-activities, as long as such activities are unattended (i.e.
do not require user interaction). The process model also holds such meta
data as who created it, when, and what group the model is associated with.
Process models are generally created through the UI designer.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
Integer representation of autoscale environment for process execution (1).static final Float
Constant indicating the default time instances of each model are expected to take to complete.static final int
Integer representation of K environment for process execution (0).static final String
static final int
static final int
Constant indicating that a model is invalid.static final int
Constant indicating that the current user does not have permissions to publish the current model.static final int
Constant indicating that an operation on a model was successful.static final int
Constant indicating that a model is in draft state.static final int
Constant indicating that a model is in published state.static final int
Constant indicating that a model is in versioned state.static final String
static final String
static final int
Fields inherited from interface com.appiancorp.suiteapi.common.JSONable
hiddenAttributes$TRANSIENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fillInAppianTypes
(AppianTypeCache appianCache_) Adds the primary keys of the Appian-typed objects maintained by the elements in the given array to the cache.protected void
fillInAppianTypes
(AppianTypeCache appianCache_, AppianTypeHolder[] holders_) Deprecated.This is a legacy field; it will be removed in the next release.Returns the annotations that this model contains.Gets the attachments that have been attached to this model.int
The number of days after process completion to archive a process.int
The number of days after process completion to delete a process.boolean
Returns whether Autoscale validation has run.int
Returns the cleanup action defined by one of the constants AUTO_ARCHIVE, AUTO_DELETE, NO_CLEANUPGets the user who created this model.Gets the default security mapping for processes that are instances of this model.Gets the localized name mappings of this model.int
Returns int representation of the Process Execution Environment.Gets the id of the folder in which this model is saved.getFormConfig
(Locale locale_) Gets the form config corresponding to the given locale, or null if no such config exists.Gets the form config for this model, which is used when instances of the model are started.Deprecated.groups do not own processModels anymore.Returns the set of attributes (properties) that should not be included in the JSON representation of the object.boolean
Lane[]
getLanes()
Gets the Lanes of the Process Model.Gets the user who last modified this model.Gets the latest version of this model as a dot-separated version number (such as 1.3.0).Gets the user that has this model locked.Gets the time at which this model was most recently locked, ornull
if the model is not currently locked.Note[]
getNotes()
Gets the notes that have been attached to this model.Note[]
getNotesWithContent
(Note[] notes_) Gets the notes that have been attached to this model, including the content of the notes.Gets the user who owns (created) this model.Gets the permissions that the currently logged-in user has on this model.Gets the priority of this model.Gets the localized name mappings of processes that are started from this model.Schedule[]
Retrieves the schedules on which instances of this model are started.Gets the security mapping for this model.getState()
Deprecated.Gets the target duration in which the process should completeGets the time at which this model was created.Gets the time at which this model was last updated.getUuid()
Gets the univerally unique identifier (uuid) for this model.Gets the version of this modelint
Gets the version status of this model.boolean
Determines whether or not the process model is enabled.boolean
Determines whether this model has been modified.boolean
Determines whether the priority of this model can be changed.boolean
boolean
Determines whether or not this model is validated.void
setAcSchemas
(ActivityClassSchema[] acSchemas_) Deprecated.This is a legacy field; it will be removed in the next release.void
setAnnotations
(AnnotationArtifact[] annotations_) SeegetAnnotations()
.void
setAttachments
(Attachment[] attachments_) Sets the attachments that have been attached to this model.void
setAutoArchiveDelay
(int autoArchiveDelay_) Sets the number of days after process completion to archive a process.void
setAutoDeleteDelay
(int autoDeleteDelay_) Sets the number of days after process completion to delete a process.void
setAutoscaleValidated
(boolean autoscaleValidated_) Set the Autoscale validation status.void
setCleanupAction
(int cleanupAction_) Sets the cleanup action.void
setCreatorUsername
(String creatorUsername_) Sets the user who created this model.void
setDeadline
(Deadline deadline_) void
setDefaultProcessSecurity
(Security defaultProcessSecurity_) Sets the default security mapping for processes that are instances of this model.void
setDescription
(LocaleString description_) Sets the localized name mappings of this process model.void
setEmailAttachmentFolderId
(Long emailAttachmentFolderId_) void
setEnabled
(boolean enabled_) Sets whether or not the process model is enabled.void
setExecutionEnvironment
(int executionEnvironment_) Set the execution environment in which the process will be run.void
setFolderId
(Long folderId_) Sets the folder in which this model is saved.void
setFormConfigMap
(FormConfigMap formConfigMap_) Sets the form config for this model, which is used when instances of the model are started.void
setGroupOwnerId
(Long groupOwnerId_) Deprecated.groups do not own processModels anymore.void
setIsPublic
(boolean isPublic_) void
Sets the Lanes of the Process Model See {@link #getLanes());void
setLastModifiedUsername
(String lastModifiedUsername_) Sets the user who last modified this model.void
setLatestVersion
(String latestVersion_) Set the latest version of the process modelvoid
setLockedBy
(String lockedBy_) Sets the user who has this model locked.void
setLockedByTime
(Timestamp lockedByTime_) Sets the time at which this model was most recently locked.void
setModified
(boolean modified_) Sets whether or not the process model has been modified.void
setMutablePriority
(boolean mutablePriority_) Sets whether the priority of this model can be changed.void
Sets the notes that have been attached to this model.void
setNtfSettings
(ProcessModelNotificationSettings ntfSettings_) void
setOwnerUsername
(String ownerUsername_) Sets the owner of the process model.void
setPermissions
(ProcessModelPermissions permissions_) Sets the permissions that the currently logged-in user has on this model.void
setPriority
(Priority priority_) Sets the priority for this modelvoid
setProcessName
(LocaleString processName_) Sets the localized name mappings of processes that are created from this model.void
setSchedules
(Schedule[] schedules_) sets the schedules for the process model.void
setSecurity
(Security security_) Sets the security mapping for this model.void
Deprecated.void
setTargetCompletion
(Float targetCompletion_) Sets the target duration in which the process should completevoid
setTimeStampCreated
(Timestamp timeStampCreated_) Sets the time at which this model was created.void
setTimeStampUpdated
(Timestamp timeStampUpdated_) Sets the time at which this model was last updated.void
setTimeZoneId
(String timeZoneId) void
setUseProcessInitiatorTimeZone
(boolean useProcessInitiatorTimeZone) void
Sets the univerally unique identifier (uuid) for this model.void
setValidated
(boolean validated_) Sets whether or not the process model is validatedvoid
setVersion
(String version_) Sets the version of this model.void
setVersionStatus
(int versionStatus_) Sets the version status of the process model
-
Field Details
-
LATEST_PUBLISHED_VERSION
- See Also:
-
STATUS_DRAFT
public static final int STATUS_DRAFTConstant indicating that a model is in draft state.- See Also:
-
STATUS_VERSION
public static final int STATUS_VERSIONConstant indicating that a model is in versioned state.- See Also:
-
STATUS_PUBLISHED
public static final int STATUS_PUBLISHEDConstant indicating that a model is in published state.- See Also:
-
RESULT_CODE_INVALID
public static final int RESULT_CODE_INVALIDConstant indicating that a model is invalid.- See Also:
-
RESULT_CODE_NO_PERM_PUBLISH
public static final int RESULT_CODE_NO_PERM_PUBLISHConstant indicating that the current user does not have permissions to publish the current model.- See Also:
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESSConstant indicating that an operation on a model was successful.- See Also:
-
DEFAULT_COMPLETION
Constant indicating the default time instances of each model are expected to take to complete. -
NO_CLEANUP
public static final int NO_CLEANUP- See Also:
-
AUTO_ARCHIVE
public static final int AUTO_ARCHIVE- See Also:
-
AUTO_DELETE
public static final int AUTO_DELETE- See Also:
-
SYSTEM_DEFAULT
public static final int SYSTEM_DEFAULT- See Also:
-
SYS_AUTOARCHIVE_DELAY
- See Also:
-
SYS_AUTOARCHIVE
- See Also:
-
K_EXEC_ENVIRONMENT
public static final int K_EXEC_ENVIRONMENTInteger representation of K environment for process execution (0).- See Also:
-
AUTOSCALE_EXEC_ENVIRONMENT
public static final int AUTOSCALE_EXEC_ENVIRONMENTInteger representation of autoscale environment for process execution (1).- See Also:
-
-
Constructor Details
-
AbstractProcessModel
public AbstractProcessModel()
-
-
Method Details
-
getHiddenAttributes
Description copied from interface:JSONable
Returns the set of attributes (properties) that should not be included in the JSON representation of the object.- Specified by:
getHiddenAttributes
in interfaceJSONable
- Returns:
- the set of hidden attributes
-
getLatestVersion
Gets the latest version of this model as a dot-separated version number (such as 1.3.0).- Returns:
- the latest version of the process model
-
setLatestVersion
Set the latest version of the process model- Parameters:
latestVersion_
- latest version of the process model, as a dot-separated version number (such as 1.3.0).
-
getExecutionEnvironment
public int getExecutionEnvironment()Returns int representation of the Process Execution Environment. K Execution Environment: 0 Autoscale Execution environment: 1- Returns:
- int corresponding to the process execution environment
-
setExecutionEnvironment
public void setExecutionEnvironment(int executionEnvironment_) Set the execution environment in which the process will be run. Return Illegal Argument Exception if int does not correspond with a defined execution environment- Parameters:
executionEnvironment_
- - int 0 for K; 1 for Autoscale
-
getAutoscaleValidated
public boolean getAutoscaleValidated()Returns whether Autoscale validation has run.- Returns:
- bool representing if Autoscale validation has run
-
setAutoscaleValidated
public void setAutoscaleValidated(boolean autoscaleValidated_) Set the Autoscale validation status.- Parameters:
autoscaleValidated_
- - bool for whether Autoscale has been validated
-
getFolderId
Gets the id of the folder in which this model is saved.- Returns:
- the folder in which this model is saved.
-
setFolderId
Sets the folder in which this model is saved.- Parameters:
folderId_
- the folder in which this model is saved.
-
isValidated
public boolean isValidated()Determines whether or not this model is validated.- Returns:
true
if this model is validated,false
otherwise.
-
setValidated
public void setValidated(boolean validated_) Sets whether or not the process model is validated- Parameters:
validated_
-true
if this model is validated,false
otherwise.
-
isEnabled
public boolean isEnabled()Determines whether or not the process model is enabled.- Returns:
true
if this model is enabled,false
otherwise.
-
setEnabled
public void setEnabled(boolean enabled_) Sets whether or not the process model is enabled.- Parameters:
enabled_
-true
if this model is enabled,false
otherwise.
-
getLockedBy
Gets the user that has this model locked.- Returns:
- the username of the user who has this model locked, or
null
if this model is unlocked.
-
setLockedBy
Sets the user who has this model locked.- Parameters:
lockedBy_
- username of the user who has this model locked, ornull
if the model is unlocked.
-
getLockedByTime
Gets the time at which this model was most recently locked, ornull
if the model is not currently locked.- Returns:
- the time this model was locked.
-
setLockedByTime
Sets the time at which this model was most recently locked.- Parameters:
lockedByTime_
- the time this model was locked, ornull
if the model is not currently locked.
-
getVersion
Gets the version of this model- Returns:
- the version of this model, as a string holding a dot-separated number (such as 1.3.0).
-
setVersion
Sets the version of this model.- Parameters:
version_
- the version of this model, as a string holding a dot-separated number (such as 1.3.0).
-
getVersionStatus
public int getVersionStatus()Gets the version status of this model.- Returns:
- the status of this version, as one of the
STATUS_XXX
constants.
-
setVersionStatus
public void setVersionStatus(int versionStatus_) Sets the version status of the process model- Parameters:
versionStatus_
- the version status to set, as one of theSTATUS_XXX
constants.
-
getPriority
Gets the priority of this model.- Returns:
- the priority of this model.
-
setPriority
Sets the priority for this model- Parameters:
priority_
- the priority of this model.
-
getDescription
Gets the localized name mappings of this model.- Returns:
- the description of this model.
-
setDescription
Sets the localized name mappings of this process model.- Parameters:
description_
- the description of this model.
-
isModified
public boolean isModified()Determines whether this model has been modified.- Returns:
true
if this model has been modified,false
otherwise.
-
setModified
public void setModified(boolean modified_) Sets whether or not the process model has been modified.- Parameters:
modified_
-true
if this model has been modified,false
otherwise.
-
getTimeStampCreated
Gets the time at which this model was created.- Returns:
- the time at which this model was created.
-
setTimeStampCreated
Sets the time at which this model was created.- Parameters:
timeStampCreated_
- the time at which this model was created.
-
getTimeStampUpdated
Gets the time at which this model was last updated.- Returns:
- the time this model was last updated.
-
setTimeStampUpdated
Sets the time at which this model was last updated.- Parameters:
timeStampUpdated_
- the time at which this model was last updated.
-
getCreatorUsername
Gets the user who created this model.- Returns:
- the username of the user that created this model.
-
setCreatorUsername
Sets the user who created this model.- Parameters:
creatorUsername_
- the username of the user who created this model.
-
getGroupOwnerId
Deprecated.groups do not own processModels anymore.Gets the group for which this model was created.- Returns:
- the id of the group owner of this model.
-
setGroupOwnerId
Deprecated.groups do not own processModels anymore.Sets the group for which this model was created.- Parameters:
groupOwnerId_
- the id of the group that created this model.
-
getOwnerUsername
Gets the user who owns (created) this model.- Returns:
- the username of the owner of the process model.
-
setOwnerUsername
Sets the owner of the process model.- Parameters:
ownerUsername_
- the username of the user who created this model.
-
getState
Deprecated.Retrieves the state of the process model. -
setState
Deprecated.Sets the state of the process model. -
getAcSchemas
Deprecated.This is a legacy field; it will be removed in the next release.Retrieves the activity class schemas that are used in this model. Any schemas that are used by the primary activities of nodes, pre- and post-activities, assignment functions, or for any other reason will be contained in this array. The refererences to the activity classes in all of those places contain anacSchemaId
property, and tools relate the activities to their schemas by doing a lookup in this array. This array is not explicitly stored in the database, but is generated whenever a process model is retrieved from the database.- Returns:
- the activity class schemas referenced within this model
-
setAcSchemas
Deprecated.This is a legacy field; it will be removed in the next release.Sets the activity class schemas that are used in this model. Any schemas that are used by the primary activities of nodes, pre- and post-activities, assignment functions, or for any other reason MUST be contained in this array. The refererences to the activity classes in all of those places contain an acSchemaId property, and tools relate the activities to their schemas by doing a lookup in this array. This array is not explicitly stored in the database, but is generated whenever a process model is retrieved from the database.- Parameters:
acSchemas_
- the schemas used in this model.
-
getProcessName
Gets the localized name mappings of processes that are started from this model.- Returns:
- the localized name mappings of the process, which may contain an expression.
-
setProcessName
Sets the localized name mappings of processes that are created from this model.- Parameters:
processName_
- the localized name mappings of the process, which may contain an expression.
-
getSchedules
Retrieves the schedules on which instances of this model are started. So far, this functionality is not supported.- Returns:
- an array of schedules.
-
setSchedules
sets the schedules for the process model. So far, this functionality is not supported. -
fillInAppianTypes
-
fillInAppianTypes
Adds the primary keys of the Appian-typed objects maintained by the elements in the given array to the cache. This method is cheap.- Specified by:
fillInAppianTypes
in interfaceAppianTypeHolder
- Parameters:
ath_
- something that has objects that are of Appian types.
-
getNotes
Gets the notes that have been attached to this model. These notes are really only metadata; for the content, callgetNotesWithContent
.- Returns:
- the notes that have been attached to this model.
-
setNotes
Sets the notes that have been attached to this model.- Parameters:
notes_
- the notes that have been attached to this model.
-
getNotesWithContent
Gets the notes that have been attached to this model, including the content of the notes.- Returns:
- the notes that have been attached to this model.
-
getLastModifiedUsername
Gets the user who last modified this model.- Returns:
- the username of the user who last modified this model.
-
setLastModifiedUsername
Sets the user who last modified this model.- Parameters:
lastModifiedUsername_
- the username of the user who last modified this model.
-
getDefaultProcessSecurity
Gets the default security mapping for processes that are instances of this model.- Returns:
- the default process security mapping for processes that are instances of this model.
-
setDefaultProcessSecurity
Sets the default security mapping for processes that are instances of this model.- Parameters:
defaultProcessSecurity_
- the default process security mapping for processes that are instances of this model.
-
getSecurity
Gets the security mapping for this model.- Returns:
- the security mapping for this model.
-
setSecurity
Sets the security mapping for this model.- Parameters:
security_
- the security mapping for this model.
-
getPermissions
Gets the permissions that the currently logged-in user has on this model.- Returns:
- the permissions that the current user has on this model.
-
setPermissions
Sets the permissions that the currently logged-in user has on this model.- Parameters:
permissions_
- the permissions that the current user has on this model.
-
isMutablePriority
public boolean isMutablePriority()Determines whether the priority of this model can be changed.- Returns:
true
if the priority of this model can be changed,false
otherwise.
-
setMutablePriority
public void setMutablePriority(boolean mutablePriority_) Sets whether the priority of this model can be changed.- Parameters:
mutablePriority_
-true
if the priority of this model can be changed,false
otherwise.
-
getAttachments
Gets the attachments that have been attached to this model.- Returns:
- the attachments that have been attached to this model.
-
setAttachments
Sets the attachments that have been attached to this model.- Parameters:
attachments_
- the attachments that have been attached to this model.
-
getTargetCompletion
Gets the target duration in which the process should complete- Returns:
- a value representing the number of days
-
setTargetCompletion
Sets the target duration in which the process should complete- Parameters:
targetCompletion_
- the target duration in days in which the process should complete
-
getFormConfigMap
Gets the form config for this model, which is used when instances of the model are started.- Returns:
- the form config
-
getFormConfig
Gets the form config corresponding to the given locale, or null if no such config exists.- Parameters:
locale_
-- Returns:
-
setFormConfigMap
Sets the form config for this model, which is used when instances of the model are started. -
getUuid
@ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) public String getUuid()Gets the univerally unique identifier (uuid) for this model. UUIDs are used to compare versions of imported and exported models.- Returns:
- the uuid of this model.
-
setUuid
Sets the univerally unique identifier (uuid) for this model. UUIDs are used to compare versions of imported and exported models. -
getAnnotations
Returns the annotations that this model contains. -
setAnnotations
SeegetAnnotations()
. -
getEmailAttachmentFolderId
-
setEmailAttachmentFolderId
-
getIsPublic
public boolean getIsPublic() -
setIsPublic
public void setIsPublic(boolean isPublic_) -
getLanes
Gets the Lanes of the Process Model. The order in the array determines the order in which the Lanes display in the Process Modeler.- Returns:
- Returns the lanes.
-
setLanes
Sets the Lanes of the Process Model See {@link #getLanes());- Parameters:
lanes_
- The lanes to set.
-
getDeadline
-
setDeadline
-
getNtfSettings
- Returns:
- Returns the notification settings.
-
setNtfSettings
- Parameters:
ntfSettings_
- The notification settings to set.
-
getCleanupAction
public int getCleanupAction()Returns the cleanup action defined by one of the constants AUTO_ARCHIVE, AUTO_DELETE, NO_CLEANUP- Returns:
-
setCleanupAction
public void setCleanupAction(int cleanupAction_) Sets the cleanup action. Must be one of the constants AUTO_ARCHIVE, AUTO_DELETE, NO_CLEANUP- Parameters:
cleanupAction_
-
-
getAutoArchiveDelay
public int getAutoArchiveDelay()The number of days after process completion to archive a process.- Returns:
-
setAutoArchiveDelay
public void setAutoArchiveDelay(int autoArchiveDelay_) Sets the number of days after process completion to archive a process.- Parameters:
autoArchiveDelay_
-
-
getAutoDeleteDelay
public int getAutoDeleteDelay()The number of days after process completion to delete a process.- Returns:
-
setAutoDeleteDelay
public void setAutoDeleteDelay(int autoDeleteDelay_) Sets the number of days after process completion to delete a process.- Parameters:
autoDeleteDelay_
-
-
getTimeZoneId
-
setTimeZoneId
-
isUseProcessInitiatorTimeZone
public boolean isUseProcessInitiatorTimeZone() -
setUseProcessInitiatorTimeZone
public void setUseProcessInitiatorTimeZone(boolean useProcessInitiatorTimeZone)
-