Terminate Workflow and Non-Workflow BP Records

PUT /ws/rest/service/v2/bp/record/terminate

Purpose

Terminate multiple workflow and non-workflow BP records (maximum 10,0000) in a single request, except Cost BPs. The Audit Log will display an entry for the terminated with the Event and Action fields indicating a termination through REST.

The REST service does not support:

Prerequisites

Ensure you have Update Access for Business Process Services to process the requests.

Request Format

Send an request as a JSON Map with the following structure:

{

"options":{

"bpname": "<value>",

"project_number": "<value>",

}

"data":[

{

"record_no":"[<value>","<Value>"],

"override_rule ": "<value>"

}

]

}

Request Parameters

Specify the following parameter in the Options JSON map:

Request Parameter

Required?

Data Type

Description

bpname

Yes

String

The business process name of the record to be terminated. For example, Contracts.

project_number

No

String

If the project_number is not provided, it defaults to the company-level.

record_no

Yes

String

The BP record number. For example, CON-99993.

override_rule

No

Boolean

Indicate whether BP rules should be applied for the record to be terminated. Valid values include:

  • Yes (default): Ignore the rules applicable for the BP.
  • No: Apply the rules applicable for the BP.

Response Format

A JSON object is returned in the following format.

{

"data": [],

"message": [<list of messages>],

"status": <REST status code value>,

"rest_audit_id": <id from the audit table>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Success Request to Terminate Cost BP Record

To terminate a Cost BP record number, CON-99993, send a request in the following format:

{

"options": {

"bpname": "Contracts",

"project_number" : "PRJ-004"

},

"data": [

{

"record_no": ["CON-99993"],

"override_rule" : "No"

}

]

}

Sample Success Response to Terminate Cost BP Record

A successful response with status code 200 displays in the following format:

{

"data": [],

"message": ["[CON-99993] terminated successfully."],

"status": 200,

"rest_audit_id": 2678

}

Sample Success Request to Terminate Line Item BP Records

To terminate line item BP records, send a request in the following format:

{

"options": {

"bpname": "Punchlist",

"project_number" : "PRJ-004"

},

"data": [

{

"record_no":["PL-0809","PL-0819","PL-0808","PL-2125","PL-0806"]

}

]

}

Sample Failed Response for Terminating Line Item BP Records

A failed response to the above request displays validation errors with the corresponding status code in the following format:

{

"data": [],

"message": [

"[PL-0800] Duplicate Record found.",

"[PL-0800666, PL-0800666] is not correct.",

"[PL-2125]in initiation step.",

"[PL-0796, PL-0799, PL-0800, PL-0801, PL-0802, PL-0806, PL-0808, PL-0809, PL-0819, PL-2125] already terminated.",

"[PL-0759] terminated successfully."

],

"status": 12755,

"rest_audit_id": 2680

}

Sample Request to Terminate Cost BP with Rules

To terminate a Cost BP with rules, a request is sent in the following format:

{

"options": {

"bpname": "Contracts",

"project_number" : "PRJ-004"

},

"data": [

{

"record_no": ["CON-4911"]

}

]

}

Sample Failed Response for Terminating Cost BP with Rules

A failed response displays for the above request in the following format:

{

"data": [],

"message": [],

"errors": "Rule failed",

"status": 3000,

"rest_audit_id": 2681

}

Supported Validation Messages and Status Codes

The following validation 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.

13001

Project/Shell number is mandatory and is missing in the input request

project_number

project_number is inactive.

602

Project/Shell Number is not correct.

project_number

Multiple project numbers are specified in the request.

1245

Project/Shell Number is not correct.

bpname

BP name is not specified

603

Business Process Name is required.

bpname

BP name does not exist

603

Business Process Name is required.

bpname

BP is inactive

3006

Business Process is not Active.

record_no

Record number is not specified in the request.

17004

Record number is required.

record_no

Record number does not exist.

12756

[Record Numbers] do not exist.

record_no

Record is in the Initiation step.

12757

[Record Numbers] is/are in the initiation step.

record_no

Record is in the terminal step or with terminal status.

12758

[ Record Numbers ] is/are in terminal status. This action can only be performed on records that are not terminated or are not in the terminal step.

record_no

Record is already terminated.

12759

[ Record Numbers ] is/are already terminated.

record_no

Partial list of records are successfully terminated.

12755

[List of record numbers ] terminated successfully.

Error messages display for those records that failed to terminate.

record_no

Duplicate record numbers are provided in the request.

12760

[List of record numbers ] are duplicate values in the request.

record_no

Request includes more than 10,000 records.

12753

You can terminate a maximum of 10,000 records at a time.

record_no

Multiple record numbers are specified in the request for Cost BPs.

12754

You cannot terminate multiple records simultaneously for Cost Type Business Process.

record_no

BPs do not support the termination of records in the UI, and the Reservation BP does not support termination of records through the UI.

12761

Selected Business Processes do not support termination of record.

Related Topics

Business Processes

Create BP Record

Update BP Record

Create BP Record with Attachment

Update BP Record with Attachment

Payment Application with Auto-populate from SOV and Commits

Get BP Record Permission

Update BP Record Permission

Add Assignees to Workflow BP Records

Task Reassignment of Workflow Records

Bulk Create Records

Bulk Create Workflow BPs

Bulk Update Records

Bulk Reverse Auto-populate Records

Get Schedule of Values (SOVs) For Base Commit Type BPs

Response Error Codes



Last Published Wednesday, April 9, 2025