Toggle menu

deleteCase

Delete's a case and all associated case data.

If you only supply the caseId (business key) then a report will be returned of the items that will be deleted.

If you supply the parameter completeDeletion with a value of true then the End Point will delete the following:

  • The case process instance
  • All case task process instances
  • All case history records
  • All case task history records

Once the End Point has completed processing (which can take several seconds) a single audit history record is written recording the fact that the case was deleted.

Namespace

goss.CaseManagement.v1.api.deleteCase

Worker

serverlibrary

Parameters

Required PropertiesTypeDescription
caseIdString <businessKey>The business key of the case to delete
Optional PropertiesTypeDescription
completeDeletionBooleanDefault: false. If false, return a report of the data that will be delete. Set true to delete the case data

Example

See Case Management API for a full example call.

{
    "completeDeletion": true,
    "caseId": "2279-2531-5303-8944"
}

Responses

Success

{
    "id": 357,
    "result": {
        "success": true,
        "errors": [],
        "caseData": {
            "id": "31347187",
            "caseId": "6471-1747-5531-5060",
            "caseType": "timtest",
            "opened": "2022-08-23T10:16:03Z",
            "active": true,
            "processesToTerminate": ["31347187"],
            "processesToDelete": ["31347187"],
            "historiesToDelete": ["6471-1747-5531-5060"]
        }
    },
    "jsonrpc": "2.0"
}

Error

In this case the business key didn't exist.

{
    "id": 359,
    "result": {
        "success": false,
        "errors": [{
            "message": "Case does not exist on system",
            "timestamp": "2022-09-01T11:05:01.640Z",
            "data": {}
        }]
    },
    "jsonrpc": "2.0"
}

Audit

Once a case has been deleted, the following audit history is written where labelb is the business key of the case that was deleted.

{
    "labela": "Case Management",
    "labelb": "6471-1747-5531-5060",
    "labelc": "audit",
    "labeld": null,
    "labele": null,
    "created": 1662030270977,
    "lastupdated": 1662030270977,
    "id": "cd29c8ea-66d2-48c4-8eb8-ee472228a8a8",
    "sealed": false,
    "subject": null,
    "events": [{
        "pos": [1, 1],
        "event": {
            "delete": true
        },
        "fpos": [1, 1],
        "timestamp": 1662030270977
    }]
}

Last modified on September 01, 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon