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 Details

    • LATEST_PUBLISHED_VERSION

      public static final String LATEST_PUBLISHED_VERSION
      See Also:
    • STATUS_DRAFT

      public static final int STATUS_DRAFT
      Constant indicating that a model is in draft state.
      See Also:
    • STATUS_VERSION

      public static final int STATUS_VERSION
      Constant indicating that a model is in versioned state.
      See Also:
    • STATUS_PUBLISHED

      public static final int STATUS_PUBLISHED
      Constant indicating that a model is in published state.
      See Also:
    • RESULT_CODE_INVALID

      public static final int RESULT_CODE_INVALID
      Constant indicating that a model is invalid.
      See Also:
    • RESULT_CODE_NO_PERM_PUBLISH

      public static final int RESULT_CODE_NO_PERM_PUBLISH
      Constant 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_SUCCESS
      Constant indicating that an operation on a model was successful.
      See Also:
    • DEFAULT_COMPLETION

      public static final Float 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

      public static final String SYS_AUTOARCHIVE_DELAY
      See Also:
    • SYS_AUTOARCHIVE

      public static final String SYS_AUTOARCHIVE
      See Also:
    • K_EXEC_ENVIRONMENT

      public static final int K_EXEC_ENVIRONMENT
      Integer representation of K environment for process execution (0).
      See Also:
    • AUTOSCALE_EXEC_ENVIRONMENT

      public static final int AUTOSCALE_EXEC_ENVIRONMENT
      Integer representation of autoscale environment for process execution (1).
      See Also:
  • Constructor Details

    • AbstractProcessModel

      public AbstractProcessModel()
  • Method Details

    • getHiddenAttributes

      public HashSet 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 interface JSONable
      Returns:
      the set of hidden attributes
    • getLatestVersion

      public String 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

      public void setLatestVersion(String latestVersion_)
      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

      public Long getFolderId()
      Gets the id of the folder in which this model is saved.
      Returns:
      the folder in which this model is saved.
    • setFolderId

      public void setFolderId(Long folderId_)
      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, false otherwise.
    • setValidated

      public void setValidated(boolean validated_)
      Sets whether or not the process model is validated
      Parameters:
      validated_ - trueif 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

      public String 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

      public void setLockedBy(String lockedBy_)
      Sets the user who has this model locked.
      Parameters:
      lockedBy_ - username of the user who has this model locked, or null if the model is unlocked.
    • getLockedByTime

      public Timestamp getLockedByTime()
      Gets the time at which this model was most recently locked, or null if the model is not currently locked.
      Returns:
      the time this model was locked.
    • setLockedByTime

      public void setLockedByTime(Timestamp lockedByTime_)
      Sets the time at which this model was most recently locked.
      Parameters:
      lockedByTime_ - the time this model was locked, or null if the model is not currently locked.
    • getVersion

      public String 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

      public void setVersion(String version_)
      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 the STATUS_XXX constants.
    • getPriority

      public Priority getPriority()
      Gets the priority of this model.
      Returns:
      the priority of this model.
    • setPriority

      public void setPriority(Priority priority_)
      Sets the priority for this model
      Parameters:
      priority_ - the priority of this model.
    • getDescription

      public LocaleString getDescription()
      Gets the localized name mappings of this model.
      Returns:
      the description of this model.
    • setDescription

      public void setDescription(LocaleString description_)
      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

      public Timestamp getTimeStampCreated()
      Gets the time at which this model was created.
      Returns:
      the time at which this model was created.
    • setTimeStampCreated

      public void setTimeStampCreated(Timestamp timeStampCreated_)
      Sets the time at which this model was created.
      Parameters:
      timeStampCreated_ - the time at which this model was created.
    • getTimeStampUpdated

      public Timestamp getTimeStampUpdated()
      Gets the time at which this model was last updated.
      Returns:
      the time this model was last updated.
    • setTimeStampUpdated

      public void setTimeStampUpdated(Timestamp timeStampUpdated_)
      Sets the time at which this model was last updated.
      Parameters:
      timeStampUpdated_ - the time at which this model was last updated.
    • getCreatorUsername

      public String getCreatorUsername()
      Gets the user who created this model.
      Returns:
      the username of the user that created this model.
    • setCreatorUsername

      public void setCreatorUsername(String creatorUsername_)
      Sets the user who created this model.
      Parameters:
      creatorUsername_ - the username of the user who created this model.
    • getGroupOwnerId

      @Deprecated public Long 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 public void setGroupOwnerId(Long groupOwnerId_)
      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

      public String getOwnerUsername()
      Gets the user who owns (created) this model.
      Returns:
      the username of the owner of the process model.
    • setOwnerUsername

      public void setOwnerUsername(String ownerUsername_)
      Sets the owner of the process model.
      Parameters:
      ownerUsername_ - the username of the user who created this model.
    • getState

      @Deprecated public Long getState()
      Deprecated.
      Retrieves the state of the process model.
    • setState

      @Deprecated public void setState(Long state_)
      Deprecated.
      Sets the state of the process model.
    • getAcSchemas

      @Deprecated public ActivityClassSchema[] 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 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.
      Returns:
      the activity class schemas referenced within this model
    • setAcSchemas

      @Deprecated public void setAcSchemas(ActivityClassSchema[] acSchemas_)
      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

      public LocaleString 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

      public void setProcessName(LocaleString processName_)
      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

      public Schedule[] 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

      public void setSchedules(Schedule[] schedules_)
      sets the schedules for the process model. So far, this functionality is not supported.
    • fillInAppianTypes

      protected void fillInAppianTypes(AppianTypeCache appianCache_, AppianTypeHolder[] holders_)
    • fillInAppianTypes

      public void fillInAppianTypes(AppianTypeCache appianCache_)
      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 interface AppianTypeHolder
      Parameters:
      ath_ - something that has objects that are of Appian types.
    • getNotes

      public Note[] getNotes()
      Gets the notes that have been attached to this model. These notes are really only metadata; for the content, call getNotesWithContent.
      Returns:
      the notes that have been attached to this model.
    • setNotes

      public void setNotes(Note[] notes_)
      Sets the notes that have been attached to this model.
      Parameters:
      notes_ - the notes that have been attached to this model.
    • getNotesWithContent

      public Note[] getNotesWithContent(Note[] notes_)
      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

      public String getLastModifiedUsername()
      Gets the user who last modified this model.
      Returns:
      the username of the user who last modified this model.
    • setLastModifiedUsername

      public void setLastModifiedUsername(String lastModifiedUsername_)
      Sets the user who last modified this model.
      Parameters:
      lastModifiedUsername_ - the username of the user who last modified this model.
    • getDefaultProcessSecurity

      public Security 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

      public void setDefaultProcessSecurity(Security defaultProcessSecurity_)
      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

      public Security getSecurity()
      Gets the security mapping for this model.
      Returns:
      the security mapping for this model.
    • setSecurity

      public void setSecurity(Security security_)
      Sets the security mapping for this model.
      Parameters:
      security_ - the security mapping for this model.
    • getPermissions

      public ProcessModelPermissions 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

      public void setPermissions(ProcessModelPermissions permissions_)
      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

      public Attachment[] getAttachments()
      Gets the attachments that have been attached to this model.
      Returns:
      the attachments that have been attached to this model.
    • setAttachments

      public void setAttachments(Attachment[] attachments_)
      Sets the attachments that have been attached to this model.
      Parameters:
      attachments_ - the attachments that have been attached to this model.
    • getTargetCompletion

      public Float getTargetCompletion()
      Gets the target duration in which the process should complete
      Returns:
      a value representing the number of days
    • setTargetCompletion

      public void setTargetCompletion(Float targetCompletion_)
      Sets the target duration in which the process should complete
      Parameters:
      targetCompletion_ - the target duration in days in which the process should complete
    • getFormConfigMap

      public FormConfigMap getFormConfigMap()
      Gets the form config for this model, which is used when instances of the model are started.
      Returns:
      the form config
    • getFormConfig

      public FormConfig getFormConfig(Locale locale_)
      Gets the form config corresponding to the given locale, or null if no such config exists.
      Parameters:
      locale_ -
      Returns:
    • setFormConfigMap

      public void setFormConfigMap(FormConfigMap formConfigMap_)
      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

      public void setUuid(String uuid_)
      Sets the univerally unique identifier (uuid) for this model. UUIDs are used to compare versions of imported and exported models.
    • getAnnotations

      public AnnotationArtifact[] getAnnotations()
      Returns the annotations that this model contains.
    • setAnnotations

      public void setAnnotations(AnnotationArtifact[] annotations_)
    • getEmailAttachmentFolderId

      public Long getEmailAttachmentFolderId()
    • setEmailAttachmentFolderId

      public void setEmailAttachmentFolderId(Long emailAttachmentFolderId_)
    • getIsPublic

      public boolean getIsPublic()
    • setIsPublic

      public void setIsPublic(boolean isPublic_)
    • getLanes

      public Lane[] 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

      public void setLanes(Lane[] lanes_)
      Sets the Lanes of the Process Model See {@link #getLanes());
      Parameters:
      lanes_ - The lanes to set.
    • getDeadline

      public Deadline getDeadline()
    • setDeadline

      public void setDeadline(Deadline deadline_)
    • getNtfSettings

      public ProcessModelNotificationSettings getNtfSettings()
      Returns:
      Returns the notification settings.
    • setNtfSettings

      public void setNtfSettings(ProcessModelNotificationSettings ntfSettings_)
      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

      public String getTimeZoneId()
    • setTimeZoneId

      public void setTimeZoneId(String timeZoneId)
    • isUseProcessInitiatorTimeZone

      public boolean isUseProcessInitiatorTimeZone()
    • setUseProcessInitiatorTimeZone

      public void setUseProcessInitiatorTimeZone(boolean useProcessInitiatorTimeZone)