Sets the approval decision on a workflow task. This is used for tasks that have an Approval requirement, where the assignee must record their approval decision (Approve or Reject) before completing the task.
/srv.asmx/SetTaskApprovalStatus
/srv.asmx/SetTaskApprovalStatus?authenticationTicket=...&taskId=...&approvalDecision=.../srv.asmx/SetTaskApprovalStatus (form data)http://tempuri.org/SetTaskApprovalStatus| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
taskId |
integer | Yes | Unique numeric ID of the task. |
approvalDecision |
integer | Yes | Approval decision code. See table below. |
| Value | Name | Description |
|---|---|---|
0 |
NoStatus |
Clears any previously set approval decision. |
5 |
Reject |
Marks the task as Rejected. |
6 |
Approve |
Marks the task as Approved. |
Any other value returns an error.
<root success="true" />
<root success="false" error="Access Denied" />
The calling user must be the current task assignee.
Anonymous access is not permitted.
The task must be in one of the following states:
| Status | Allowed |
|---|---|
InProgress |
Yes |
DueDateChanged |
Yes |
NotStarted |
No |
Completed |
No |
Dropped |
No |
Reassigned |
No |
GET /srv.asmx/SetTaskApprovalStatus
?authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
&taskId=4812
&approvalDecision=6
HTTP/1.1
Host: yourserver
POST /srv.asmx/SetTaskApprovalStatus HTTP/1.1
Host: yourserver
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c&taskId=4812&approvalDecision=6
approvalDecision=0.ApprovalStatus field.| Error | Description |
|---|---|
[900] |
Authentication failed -“ invalid credentials. |
[901] |
Session expired or invalid authentication ticket. |
| Task not found | No task with the specified taskId exists. |
| Access Denied | Calling user is not the task assignee. |
| Invalid decision | approvalDecision is not 0, 5, or 6. |
| Task dropped | The task has been dropped and cannot be updated. |
| Task reassigned | The task has been reassigned and cannot be updated. |
| Task completed | The task has already been completed. |
| Task not started | The task is in NotStarted state and cannot be updated. |