Task Reassignment of Workflow Records

PUT /ws/rest/service/v2/bp/record/wf/reassign

Available: Version 25.4 and later

Purpose

Process task reassignment of workflow records (maximum 1000) of same BP type in a project/shell or company workspace.

Prerequisites

Ensure you have Update or Full permissions for Business Process Services to reassign tasks.

Request Format

Send a request in the following format:

{

"options":{"project_number": "<value>", "bpname": "<value>"},

"data": [

{"record_no": "<value>",

"current_assignee": "<value>",

"new_assignee": "<value>"},

{"record_no": "<value>",

"current_assignee": "<value>",

"new_assignee": "<value>"}

]

}

Request Parameters - Options Map

Specify the following parameter in the Options JSON map:

Request Parameter Required? Data Type Description
project_number Yes String A valid 'Active' project/shell number or an empty value at the company level.
bpname Yes String Name of the workflow business process.

Request Parameters - Data Map

Specify the following parameters in the Data []:

Request Parameter Required? Data Type Description
record_no Yes String Record number of a workflow business process in the project/shell if the "project_number" parameter is specified. Otherwise, it is in the Company Workspace.
current_assignee Yes String

The current assignee for the task.

If the project_number parameter is specified, the user should be a member of specified project/shell. Otherwise, be a valid user in the Company Workspace.

new_assignee Yes String

The new user to whom the task is reassigned.

If the project_number parameter is specified, the user should be a member of specified project/shell. Otherwise, the user should be a valid user in the Company Workspace.

Response Format

A JSON object is returned in the following format.

{

"data": [],

"message": [],

"status": <REST status code value>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Success Request

This is an example of a successful request:

{

"options": {

"project_number":"AP",

"bpname":"MG Test3 WF"

},

"data": [

{

"record_no": "uxmgt3wf-0002",

"current_assignee": "user1",

"new_assignee": "ppmuser"

},

{

"record_no": "uxmgt3wf-0002",

"current_assignee": "user1",

"new_assignee": "cfnuser"

},

{

"record_no": "uxmgt3wf-0012",

"current_assignee": "user2",

"new_assignee": "costuser"

},

{

"record_no": "uxmgt3wf-0031",

"current_assignee": "coadmin",

"new_assignee": "abcUser"

}

]

}

Sample Partial Success Response

This is an example of a response to the payload request.

{

"status": 3000,

"data": [],

"messages": [

{

"record_no": "uxmgt3wf-0002",

"record_status": 200,

"errors": []

},

{

"record_no": "uxmgt3wf-0002",

"record_status": 17008,

"errors": [{"Identical record number and current assignee found."}]

},

{

"record_no": "uxmgt3wf-0012",

"record_status": 17006,

"errors": [{"Record number is not correct."}]

},

{

"record_no": "uxmgt3wf-0031",

"record_status": 17009,

"errors": [{"abcUser is not an active member of AP"}]

}

],

"rest_audit_id": "1810"

}

Supported Validation Messages and Status Codes

The following error messages and status codes display in the response when incorrect values are provided in the request.

Field Name Use-case Scenario Status Code Error Message
project_number project_number is not specified for a project/shell-level BP. 1361 Business Process is not company level.
project_number project_number is invalid (applicable for shell-level BP only). 602 Project/Shell Number is not correct.
project_number project_number is not active (applicable for shell-level BP only). 17030 Task reassignment cannot be performed when project/shell status is Inactive or View-Only or On-Hold.
bpname bpname is not specified. 603 Business Process Name is required.
bpname bpname is invalid. 17002 Business Process Name is not correct.
bpname Business process is at the company-level and the project_number is specified in the request. 631 Business Process is not project level.
bpname Business process is at the project/shell-level and the project_number is not specified. 631 Business Process is not company level.
bpname bpname specified is not active. 3006 Business Process is not Active.
bpname bpname is not a Workflow BP. 17003 Business Process is not a workflow BP.
record_no record_no not specified. 17004 Record number is required.
record_no more than 1000 records are provided. 17023 You can reassign a maximum of 1000 records at a time.
record_no record_no specified is invalid. 17006 Record number is not correct.
record_no record_no specified is in Initiation step. 17007 Record is in Initiation step.
current_assignee current_assignee is not specified. 17024 Current assignee is required
current_assignee record_no and current_user duplicated in another object 17025 Duplicate record: identical record number and current assignee already exist.
current_assignee current_assignee is same as new_assignee. 17031 Current assignee is same as new assignee.
current_assignee new_assignee is not active within the specified project/shell or company. 17009 <username> is not an active member of <project_number/the company>
current_assignee current_assignee does not have performing task of a record. 17028 Current assignee does not have performing tasks for the specified record.
current_assignee current_assignee/new_assignee does not exist in project/shell or company. 17027 <username> does not exist in <project_number/the company>
new_assignee new_assignee is not specified. 17026 New assignee is required
new_assignee new_assignee is already an assignee for the task. 17029 Task cannot be reassigned, <username> has a task for <record_number>
not applicable if task is not in Open or Execution status. 17032 Task is not in Open or Execution status.
not applicable exception during transaction of a task reassignment. 17033 Task reassignment cannot be completed.
not applicable All record numbers are null. 3004 Record numbers are not provided.
not applicable All current and new assignees are null. 17035 Current assignees and new assignees are not provided.
not applicable A task is already terminated. 17036 <record number> is already terminated
not applicable A task is already closed. 17037 <record number> is already closed