Related Topics
Task Class
A Task object represents a task assigned to a user. It is distinct from a ProcessTask object, which represents a Process Timeline Activity or Workflow Step. A task object contains such information as the name, description, instruction, and start and due dates of a task.
Properties
PROPERTY NAME | DATA TYPE | DESCRIPTION |
---|---|---|
UID | String | The UID of the user to whom this task is assigned |
FORMINSTID | String | The ID of the form instance this task is related to |
FORMID | String | The ID of the form related to this task |
TLID | String | This task’s ID in the task list |
PID | String | ID of the partition this task is on. |
PROCINSTID | String | ID of the timeline or Workflow instance to which this task belongs |
TASKID | String | ID of the Workflow Step or Timeline Activity to which this task belongs |
TASKINSTID | String | ID of the Workflow Step or Timeline Activity instance to which this task belongs |
TASKUINSTID | String | ID of the Workflow user step or timeline user activity instance to which this task belongs |
tblTaskList | Integer | The database table row related to this task |
TaskType | Integer | The type of this task. Please see the table definition of tblTaskList for Task Type codes. |
Created | DateTime | The date and time this task was created |
Due | DateTime | The date and time this task is due |
URL | String | The URL of the Timeline Activity or Workflow task |
Methods


This function attempts to complete the task given the result, branch taken, or response for the task completion, as well as comments regarding its completion. It returns a Boolean reflecting whether the completion succeeded or not.
Parameters
Selection: The branch taken, response or result for the completion of the task.
Comments: Any comments regarding the completion of the task.
Returns
Boolean: True if the operation succeeds.
Example
// Approve the task and complete it
Task myTask = GetTaskByTLID(bp, "TLID");
myTask.CompleteTask("Approved", "Auto-approval via script");


This static function gets the tasks assigned to a user identified by email address. This is commonly used for unauthenticated users, who are identified solely by email address, and who have no identity in Process Director.
Parameters
BP: The bp environment.
PID or part (optional): The ID or partition object of the partition on which the tasks exist. Is set to null if not specified.
Email: The email address of the user whose tasks are being requested.
Returns
List<Task>: A list of the tasks assigned to this user.
Example
List<Task> taskList = new List<Task>();
taskList = GetTasksForEmail(bp, "email@domain.com");


This static function gets the tasks assigned to a specified user. This is an overloaded method with the following possible declarations:
public static List<Task> GetTasksForUser(bp BP, string PID, string UID)
public static List<Task> GetTasksForUser(bp BP, string UID)
public static List<Task> GetTasksForUser(bp BP, Partition part, User user)
Parameters
BP: The bp environment.
PID or part (optional): The ID or partition object of the partition on which the tasks exist. Is set to null if not specified.
UID or user: The UID or user object of the user whose tasks are being requested.
Returns
List<Task>: A list of the tasks assigned to this user.
Example
List<Task> taskList = new List<Task>();
taskList = GetTasksForUser(bp, "UID");
Documentation Feedback and Questions
If you notice some way that this document can be improved, we're happy to hear your suggestions. Similarly, if you can't find an answer you're looking for, ask it via feedback. Simply click on the button below to provide us with your feedback or ask a question. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical issue with Process Director, please open a support ticket.