To create new Oracle WebCenter Collaboration task lists, tasks and subtasks from a remote application, use the ITask* interfaces in the Oracle WebCenter Interaction Development Kit (IDK).
Once a task list is created, you can create tasks and subtasks. The ITaskList.createTask method takes in a name, description, start date and end date, and returns an ITask object with a corresponding object ID and associated properties. The ITask.createSubTask method allows you to create subtasks using the same parameters. Subtasks are represented by an instance of ITask. For more information on subtasks, see Managing Oracle WebCenter Collaboration Task Workflow Using Oracle WebCenter Interaction Development Kit (IDK) Remote APIs.
To create a new task list, follow the steps below.Java
... ICollaborationFactory collabFactory = portalSession.getCollaborationFactory(); ITaskListManager tasklistManager = collabFactory.getTaskListManager(); //create the task list ITaskList tasklist = tasklistManager.createTaskList(project, name, description); //call store() to persist the task list tasklist.store(); //get the details URL and ID for the new task list string url = tasklist.getDetailsURL(); int id = tasklist.getID(); //create the task ITask task = tasklist.createTask(taskname, taskdescription, startTime, endTime); //call store to persist the task task.store(); ......
.NET (C#)
... //get the project ID out of session- this should never be null as it is added in the page load event Plumtree.Remote.PRC.Collaboration.Project.IProject project = (Plumtree.Remote.PRC.Collaboration.Project.IProject) Session[SESSION_PROJECT_KEY]; //create the task list ITaskList tasklist = tasklistManager.CreateTaskList(project, name, description); //call Store() to persist the task list tasklist.Store(); //create the task ITask task = tasklist.CreateTask(taskname, taskdescription, startTime, endTime); //call Store() to persist the task task.Store(); ...
.NET (VB)
... name = "ExampleTaskList" description = "ExampleTaskListDescription" 'get the project ID out of session- this should never be Nothing as it is added in the page load event dim project as Plumtree.Remote.PRC.Collaboration.Project.IProject = CType(Session.Item(SESSION_PROJECT_KEY),Plumtree.Remote.PRC.Collaboration.Project.IProject) 'create the task list Dim tasklist As ITaskList = tasklistManager.CreateTaskList(project, name, description) 'call Store() to persist the task list tasklist.Store() 'create the task Dim tasklist As ITaskList = tasklistManager.CreateTaskList(project, name, description) 'call Store() to persist the task task.Store() ...