Interface IProcessCase

All Known Implementing Classes:
ProcessCase, ProcessCaseDelegate, ReadonlyProcessCase

public interface IProcessCase
This object represents a case from the process engine. A case can have multiple process steps available.
Since:
7.0
Author:
O. Kerpershoek
  • Method Details

    • getId

      long getId()
      This method returns the unique ID of the process case. The ID of the case is generated at the moment the case is created.
      Returns:
      The unique ID of the case.
    • getName

      String getName()
      This method returns the name of the of the case. As the name is optional, this method may return a null value.
      Returns:
      The name of the case.
    • getCreationDate

      DateTimeValue getCreationDate()
      This method returns the creation date of the case.
      Returns:
      The creation date of the case, never null
      Since:
      9.2
    • getStatus

      CaseStatusType getStatus()
      This method returns the status of the case, never null
      Returns:
      The status of the case
      Since:
      9.2
    • isLocked

      boolean isLocked()
      This method returns a boolean indicating if the case is locked. A case will be locked as soon as a task is started for the case, and the lock will be released again when the task has been completed or aborted. Cases that are locked will not return any available process steps.
      Returns:
      Boolean indicating if the case is locked.
    • unlock

      void unlock()
    • getCaseProfile

      IProfile getCaseProfile()
      This method returns a read-only object containing the case profile. The case profile is updated after each process step that has been executed.
      Returns:
      Object containing the case profile.
      Throws:
      UnknownEntityException - Is thrown when the case profile contains data for an unknown entity.
      UnknownAttributeException - Is thrown when the case profile contains data for an unknown attribute.
    • getCaseProfile

      IProfile getCaseProfile(CaseDataChangeListener caseDataChangeListener)
      This method returns a read-only object containing the case profile. The case profile is updated after each process step that has been executed.
      Parameters:
      caseDataChangeListener - profile changeListener for retrieving case-data set to the caseProfile
      Returns:
      Object containing the case profile.
      Throws:
      UnknownEntityException - Is thrown when the case profile contains data for an unknown entity.
      UnknownAttributeException - Is thrown when the case profile contains data for an unknown attribute.
    • mapCaseProfile

      void mapCaseProfile(IMapping mapping, IProfile sourceMappingProfile)
      This method maps a source profile to the case profile using the specified mapping.
      Parameters:
      mapping - A mapping to be applied after the profile has been recreated
      sourceMappingProfile - The profile to be used as source for the mapping update
      Throws:
      UnknownEntityException - Is thrown when the case profile contains data for an unknown entity.
      UnknownAttributeException - Is thrown when the case profile contains data for an unknown attribute.
    • getAvailableTasks

      IProcessTask[] getAvailableTasks(IUserData userData)
      This method will returns an array containing all the process tasks that may be executed for the current case. If the current case is locked, or no process steps are available, the method will return an empty array. The returned process steps are bound to the user they are requested for.
      Parameters:
      userData - Object containing information about the current user.
      Returns:
      Array containing the process steps that may be executed by the supplied user.
    • createTask

      @Deprecated(forRemoval=true) IProcessTask createTask(IUserData userData, String taskName, DateTimeValue startDate, String[] roles)
      Deprecated, for removal: This API element is subject to removal in a future version.
      With this method you can create tasks that are not defined anywhere. We rely on the task definition in many places, so this is bound to cause problems. Instead of using this method, properly model your application with the tasks you need.
      This method may be used to create a new task for this case. The newly created task will not be part of any existing process, but defined as a loose task similar to an ad-hoc task.
      Parameters:
      userData - Object containing information about the current user.
      taskName - The name or the description of the task.
      startDate - The time at which the task should become active.
      roles - The roles that are required to execute the task.
      Returns:
      Object representing the newly created task.
    • getInstanceModel

      ICaseDataInstance getInstanceModel(long instanceId)
    • addInstance

      void addInstance(ICaseDataInstance instanceModel)
    • removeInstance

      void removeInstance(ICaseDataInstance instanceModel)
    • getInternalCaseProfile

      IProfile getInternalCaseProfile(CaseDataChangeListener processCaseDataListener)
    • clearInternalCaseDataCache

      void clearInternalCaseDataCache()
    • getDisplayName

      IMultilingualText getDisplayName()
      Returns:
      the display name or null if there is none