Interface ITaskService

All Superinterfaces:
IComponent, IInitializable, ITaskComponent

public interface ITaskService extends ITaskComponent
Class ITaskManagementProvider
  • Method Details

    • createTask

      IURI createTask(IURI principalURI, IURI taskDefinitionURI, Serializable taskData) throws PortalException
      Creates new task from the given task data. Returns uri of created task
      Throws:
      PortalException
    • createTaskForMigration

      IURI createTaskForMigration(IURI principalURI, IURI taskDefinitionURI, Serializable taskData, Integer taskID) throws PortalException
      Creates new task from the given task data and taskID. This is used by side-by-side migration so that the old task ID can be preserved. Returns uri of created task
      Throws:
      PortalException
    • createTask

      IURI createTask(IURI principalURI, IURI taskDefinitionURI) throws PortalException
      Creates new task from the given task data. Returns uri of created task
      Throws:
      PortalException
    • updateTask

      void updateTask(ITaskUpdateContext updateContext, Map<String,?> properties, boolean hidden, boolean refreshRemoteCaches) throws PortalException
      Updates task properties
      Parameters:
      hidden - set to true if that task update should not be recorded in pending task updates counter
      Throws:
      PortalException
    • updateTask

      void updateTask(ITaskUpdateContext updateContext, Map<String,?> properties, boolean hidden) throws PortalException
      Updates task properties
      Parameters:
      hidden - set to true if that task update should not be recorded in pending task updates counter
      Throws:
      PortalException
    • updateTaskData

      void updateTaskData(ITaskUpdateContext updateContext, Object taskData) throws PortalException
      Updates task data for a given task
      Throws:
      PortalException
    • completeTaskPendingUpdate

      void completeTaskPendingUpdate(IURI taskURI) throws PortalException
      Decrement value of the task pending updates counter
      Throws:
      PortalException
    • createUpdateContext

      ITaskUpdateContext createUpdateContext(IURI sourceURI, IURI taskURI) throws PortalException
      Creates instance of task update context which should be used for all task update operations
      Throws:
      PortalException
    • getTaskURIByExternalID

      IURI getTaskURIByExternalID(String externalID) throws PortalException
      Returns the task uri by its external ID
      Throws:
      PortalException
    • getTask

      ITask getTask(IURI taskURI) throws PortalException
      Returns the task by its uri
      Throws:
      PortalException
    • getTaskData

      Object getTaskData(IURI taskURI, boolean copy, ClassLoader classLoader) throws PortalException
      Returns custom task data object by task URI
      Throws:
      PortalException
    • deleteTaskData

      void deleteTaskData(IURI taskURI) throws PortalException
      This would delete task data record from database
      Throws:
      PortalException
    • isTaskMutable

      boolean isTaskMutable(IURI taskURI) throws PortalException
      Detemines if task is mutable at the given moment of time. The "mutable" task is the one which data has changes triggering update event, but update event was not yet processed. The processing of the event may change distribution of this task as well as update the task state

      This function will be generally used to prevent end user updating mutable task
      Throws:
      PortalException
    • isTaskUptoDate

      boolean isTaskUptoDate(IURI taskURI, int taskVersionNumber) throws PortalException
      Determines if task version number is up to date
      Throws:
      PortalException
    • flushTaskCache

      void flushTaskCache(IURI taskURI)
      Flushes any task data from caches. This is required in case of the transaction failure so any cached task objects need to be reloaded from database
      Parameters:
      taskURI -
    • flushTaskDataCache

      void flushTaskDataCache(IURI taskURI)
      Flushes only the cache for "task data".