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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final FloatConstant indicating the default time instances of each model are expected to take to complete.static final intInteger representation of K environment for process execution (0).static final Stringstatic final intstatic final intConstant indicating that a model is invalid.static final intConstant indicating that the current user does not have permissions to publish the current model.static final intConstant indicating that an operation on a model was successful.static final intConstant indicating that a model is in draft state.static final intConstant indicating that a model is in published state.static final intConstant indicating that a model is in versioned state.static final Stringstatic final Stringstatic final intFields inherited from interface com.appiancorp.suiteapi.common.JSONable
hiddenAttributes$TRANSIENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfillInAppianTypes(AppianTypeCache appianCache_) Adds the primary keys of the Appian-typed objects maintained by the elements in the given array to the cache.protected voidfillInAppianTypes(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.intThe number of days after process completion to archive a process.intThe number of days after process completion to delete a process.intReturns 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.intReturns 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.booleanLane[]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, ornullif 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 modelintGets the version status of this model.booleanDetermines whether or not the process model is enabled.booleanDetermines whether this model has been modified.booleanDetermines whether the priority of this model can be changed.booleanbooleanDetermines whether or not this model is validated.voidsetAcSchemas(ActivityClassSchema[] acSchemas_) Deprecated.This is a legacy field; it will be removed in the next release.voidsetAnnotations(AnnotationArtifact[] annotations_) SeegetAnnotations().voidsetAttachments(Attachment[] attachments_) Sets the attachments that have been attached to this model.voidsetAutoArchiveDelay(int autoArchiveDelay_) Sets the number of days after process completion to archive a process.voidsetAutoDeleteDelay(int autoDeleteDelay_) Sets the number of days after process completion to delete a process.voidsetCleanupAction(int cleanupAction_) Sets the cleanup action.voidsetCreatorUsername(String creatorUsername_) Sets the user who created this model.voidsetDeadline(Deadline deadline_) voidsetDefaultProcessSecurity(Security defaultProcessSecurity_) Sets the default security mapping for processes that are instances of this model.voidsetDescription(LocaleString description_) Sets the localized name mappings of this process model.voidsetEmailAttachmentFolderId(Long emailAttachmentFolderId_) voidsetEnabled(boolean enabled_) Sets whether or not the process model is enabled.voidsetExecutionEnvironment(int executionEnvironment_) Set the execution environment in which the process will be run.voidsetFolderId(Long folderId_) Sets the folder in which this model is saved.voidsetFormConfigMap(FormConfigMap formConfigMap_) Sets the form config for this model, which is used when instances of the model are started.voidsetGroupOwnerId(Long groupOwnerId_) Deprecated.groups do not own processModels anymore.voidsetIsPublic(boolean isPublic_) voidSets the Lanes of the Process Model See {@link #getLanes());voidsetLastModifiedUsername(String lastModifiedUsername_) Sets the user who last modified this model.voidsetLatestVersion(String latestVersion_) Set the latest version of the process modelvoidsetLockedBy(String lockedBy_) Sets the user who has this model locked.voidsetLockedByTime(Timestamp lockedByTime_) Sets the time at which this model was most recently locked.voidsetModified(boolean modified_) Sets whether or not the process model has been modified.voidsetMutablePriority(boolean mutablePriority_) Sets whether the priority of this model can be changed.voidSets the notes that have been attached to this model.voidsetNtfSettings(ProcessModelNotificationSettings ntfSettings_) voidsetOwnerUsername(String ownerUsername_) Sets the owner of the process model.voidsetPermissions(ProcessModelPermissions permissions_) Sets the permissions that the currently logged-in user has on this model.voidsetPriority(Priority priority_) Sets the priority for this modelvoidsetProcessName(LocaleString processName_) Sets the localized name mappings of processes that are created from this model.voidsetSchedules(Schedule[] schedules_) sets the schedules for the process model.voidsetSecurity(Security security_) Sets the security mapping for this model.voidDeprecated.voidsetTargetCompletion(Float targetCompletion_) Sets the target duration in which the process should completevoidsetTimeStampCreated(Timestamp timeStampCreated_) Sets the time at which this model was created.voidsetTimeStampUpdated(Timestamp timeStampUpdated_) Sets the time at which this model was last updated.voidsetTimeZoneId(String timeZoneId) voidsetUseProcessInitiatorTimeZone(boolean useProcessInitiatorTimeZone) voidSets the univerally unique identifier (uuid) for this model.voidsetValidated(boolean validated_) Sets whether or not the process model is validatedvoidsetVersion(String version_) Sets the version of this model.voidsetVersionStatus(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:
-
-
Constructor Details
-
AbstractProcessModel
public AbstractProcessModel()
-
-
Method Details
-
getHiddenAttributes
Description copied from interface:JSONableReturns the set of attributes (properties) that should not be included in the JSON representation of the object.- Specified by:
getHiddenAttributesin 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
-
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:
trueif this model is validated,falseotherwise.
-
setValidated
public void setValidated(boolean validated_) Sets whether or not the process model is validated- Parameters:
validated_-trueif this model is validated,falseotherwise.
-
isEnabled
public boolean isEnabled()Determines whether or not the process model is enabled.- Returns:
trueif this model is enabled,falseotherwise.
-
setEnabled
public void setEnabled(boolean enabled_) Sets whether or not the process model is enabled.- Parameters:
enabled_-trueif this model is enabled,falseotherwise.
-
getLockedBy
Gets the user that has this model locked.- Returns:
- the username of the user who has this model locked, or
nullif this model is unlocked.
-
setLockedBy
Sets the user who has this model locked.- Parameters:
lockedBy_- username of the user who has this model locked, ornullif the model is unlocked.
-
getLockedByTime
Gets the time at which this model was most recently locked, ornullif 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, ornullif 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_XXXconstants.
-
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_XXXconstants.
-
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:
trueif this model has been modified,falseotherwise.
-
setModified
public void setModified(boolean modified_) Sets whether or not the process model has been modified.- Parameters:
modified_-trueif this model has been modified,falseotherwise.
-
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 anacSchemaIdproperty, 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:
fillInAppianTypesin 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:
trueif the priority of this model can be changed,falseotherwise.
-
setMutablePriority
public void setMutablePriority(boolean mutablePriority_) Sets whether the priority of this model can be changed.- Parameters:
mutablePriority_-trueif the priority of this model can be changed,falseotherwise.
-
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)
-