Tasks are prioritized teamspace activities that may be scheduled by any teamspace member. Tasks remain open until marked complete by either the assignee or another member of the teamspace with appropriate rights, and may be reopened at any point after completion.
The Collaboration API contains elements that developers can use to create, access, and manage tasks from within FileNet P8 applications. Key task elements are:
A task comprises the following basic information:
A task is opened when the above information is added to a TaskInfo object and passed to a FolderContainer object.
The following code describes how a Task object might be created in a known object store and teamspace. For information on teamspace objects, see Teamspaces; for information on creating and managing object stores, see the Content Java API topic, Working With Object Stores.
// pass basic task data to a new TaskInfo object
TaskInfo taskInfo = new TaskInfo(assigneeID, taskTitle, taskDescription);
ContainerManager containerManager = teamSpace.getContainerManager();
FolderContainer taskContainer = (FolderContainer)
containerManager.getContainerByDefinitionID (Collaboration.COLLABORATION_TASK_CONTAINER_DEFID);
Task taskObject = taskContainer.addSubContainer(taskInfo);
For information on how tasks are created and managed within the FileNet P8 TCM application, see Overview of Tasks.