Interface ITaskService
- All Superinterfaces:
IComponent
,IInitializable
,ITaskComponent
Class ITaskManagementProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoid
completeTaskPendingUpdate
(IURI taskURI) Decrement value of the task pending updates countercreateTask
(IURI principalURI, IURI taskDefinitionURI) Creates new task from the given task data.createTask
(IURI principalURI, IURI taskDefinitionURI, Serializable taskData) Creates new task from the given task data.createTaskForMigration
(IURI principalURI, IURI taskDefinitionURI, Serializable taskData, Integer taskID) Creates new task from the given task data and taskID.createUpdateContext
(IURI sourceURI, IURI taskURI) Creates instance of task update context which should be used for all task update operationsvoid
deleteTaskData
(IURI taskURI) This would delete task data record from databasevoid
flushTaskCache
(IURI taskURI) Flushes any task data from caches.void
flushTaskDataCache
(IURI taskURI) Flushes only the cache for "task data".Returns the task by its urigetTaskData
(IURI taskURI, boolean copy, ClassLoader classLoader) Returns custom task data object by task URIgetTaskURIByExternalID
(String externalID) Returns the task uri by its external IDboolean
isTaskMutable
(IURI taskURI) Detemines if task is mutable at the given moment of time.boolean
isTaskUptoDate
(IURI taskURI, int taskVersionNumber) Determines if task version number is up to datevoid
updateTask
(ITaskUpdateContext updateContext, Map<String, ?> properties, boolean hidden) Updates task propertiesvoid
updateTask
(ITaskUpdateContext updateContext, Map<String, ?> properties, boolean hidden, boolean refreshRemoteCaches) Updates task propertiesvoid
updateTaskData
(ITaskUpdateContext updateContext, Object taskData) Updates task data for a given taskMethods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
-
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
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 PortalExceptionUpdates 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 PortalExceptionUpdates task properties- Parameters:
hidden
- set to true if that task update should not be recorded in pending task updates counter- Throws:
PortalException
-
updateTaskData
Updates task data for a given task- Throws:
PortalException
-
completeTaskPendingUpdate
Decrement value of the task pending updates counter- Throws:
PortalException
-
createUpdateContext
Creates instance of task update context which should be used for all task update operations- Throws:
PortalException
-
getTaskURIByExternalID
Returns the task uri by its external ID- Throws:
PortalException
-
getTask
Returns the task by its uri- Throws:
PortalException
-
getTaskData
Returns custom task data object by task URI- Throws:
PortalException
-
deleteTaskData
This would delete task data record from database- Throws:
PortalException
-
isTaskMutable
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
Determines if task version number is up to date- Throws:
PortalException
-
flushTaskCache
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
Flushes only the cache for "task data".
-