AquaLogic User Interaction Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Editing Collaboration Task and Task List Properties Using IDK Remote APIs

To query and modify Collaboration task list and task properties from a remote application, use the ITaskList and ITask interfaces in the IDK.

The ITaskList interface allows you to query and update metadata and manipulate security settings for task lists. The ITask interface allows you to assign users and manipulate key settings for individual tasks, including start date, due date, status and risk.
These interfaces provide access to the following metadata:
Property Name Description API Access
ID The object ID for the current task list or task. Read Only
Name The name of the current task list or task. Read/Write
Description The description for the current task list. Read/Write
Details The URL to the details page for the current task list or task. Read Only
Start Date Tasks only. The assigned start date for the current task. Read/Write
End Date Tasks only. The assigned due date for the current task. Read/Write
Created Date The date the current task list or task was created (this information might not be available). Read Only
Last-Modified Date The date the current task list or task was last updated (this information might not be available). Read Only
Owner The user ID of the task list or task owner. Read Only
Assigned Users Tasks only. The IDs of the users assigned to the task. Read/Write
Status Tasks only. The status of the current task (pending, 25% complete, 50% complete, 75% complete, or completed). Read/Write
Risk Tasks only. The risk for the current task (high, low or medium). Read/Write
Access Level The permissions for defined roles on the current task list or task (edit, delete, edit security). You can only change permissions for the task list if the default project security is set to false. Read/Write
Project The ID of the project that contains the current task list. Read Only
Default Project Security Task lists only. Whether or not default project security should be applied to the task list. If default project security is enabled, you cannot change the security for the task list. Read/Write
Task List Tasks only. The ID of the task list that contains the current task. Read Only
Level Tasks only. The level of the task in the task hierarchy (0-3) Read Only
Parent Task Tasks only. The parent task for the current task (returns null if this is the root task). Read Only
Subtasks Tasks only. The subtasks of the current task. Read/Write
Dependent Tasks Tasks only. The tasks that are defined as dependent on the current task. Read Only
Task Dependencies Tasks only. The tasks for which the current task is defined as dependent. Read/Write
To edit task list or task properties, follow the steps below.
  1. Create a PRC session. For details, see Initiating a PRC Session to Use IDK Remote APIs.
  2. Get the task or task list ID and retrieve the associated object.
  3. Edit the task or task list properties as shown in the code samples below.
    Note: You must call store after making any changes or they will not be persisted.
The following examples modify the status and risk for a task and assign a user.

Java

...

//get the task
ITask task = tasklistManager.getTask(taskID);

//set properties
task.setStatus(TaskStatus.TWENTY_FIVE_PERCENT_COMPLETED);
task.setRisk(TaskRisk.MEDIUM);

//assign the task
task.addAssignedUser(userID);

//call store() to persist the task
task.store();

...

.NET (C#)

...

//get the task
ITask task = tasklistManager.GetTask(taskID);

//set properties
task.Status = TaskStatus.TwentyFivePercentCompleted;
task.Risk = TaskRisk.Medium;

//assign the task
task.AddAssignedUser(UserID);

//call Store() to persist the task
task.Store();

...

.NET (VB)

...

'get the task
dim task As ITask = tasklistManager.GetTask(taskID)

'set properties
task.Status = TaskStatus.TwentyFivePercentCompleted
task.Risk = TaskRisk.Medium

'assign the task
task.AddAssignedUser(UserID)

'call Store() to persist the task
task.Store()

...

  Back to Top      Previous Next