Class: TaskAPI

TaskAPI

A TaskAPI control provides the following configuration properties in Process Designer:
Behavior
Data Retrieval Mode: {All Details | Data Only | Available Actions | None} string
Events
On Load:
Description: This event when the control is loaded.
Example:
On Request Complete:
Description: This event fires whenever a request is completed successfully.
Example:
${TaskUIFrame}.loadTask(me.getTaskId());
On Request Error:
Description: This event is fired when a request error is detected.
Example:
console.log(me.getResult());
This constructor is never used explicitly.

Extends

  • com.ibm.bpm.coach.CoachView

Methods

Assigns the task back to the original owner.

assignToGroup(group)

Assign the task to a group
Name Type Description
group string the name of the group to which the task should be assigned.
Assigns the task to the individual that is running the instance.

assignToUser(user)

Assign the task to a user
Name Type Description
user string the name of the user
Programmatically cancels the task
Name Type Description
date string due date is formatted in ISO-8601 format (e.g. 2011-01-05T03:15:30.000-00:00)
Mark the task as finished
Name Type Description
data string the passed in data

getBusinessData(asList){object}

Gets the business data for the control
Name Type Description
asList boolean whether to return as a list or not
Returns:
Type Description
object

getLastAction(){string}

Gets the last type of request made
Returns:
Type Description
string

getResult(){object}

Gets the data of task(s)
Returns:
Type Description
object

getTaskId(){integer}

Gets the task ID
Returns:
Type Description
integer

getType(){string}

Gets the type of the control
Returns:
Type Description
string
Refreshes the task to view changes and updates made

setBusinessData(data)

Sets the business data for the control
Name Type Description
data string the data for the business data, note: data is a string which must be in JSON format

setTaskId(taskId, refresh)

Sets the task ID
Name Type Description
taskId integer the assigned task ID
refresh boolean whether or not to refresh
Programmatically start the control

updateDueDate(date)

Updates the due date of the task
Name Type Description
date string due date is formatted in ISO-8601 format (e.g. 2011-01-05T03:15:30.000-00:00)

updatePriority(priority)

Updates the priority of the task.
Name Type Description
priority string Highest/10 | High/20 | Normal/30 | Low/40 | Lowest/50
Example
${TaskAPI}.updatePriority("10"); //sets the current tasks priority to "Highest"