Toggle menu

closeCase

Closes an open case. 

A case can only be closed if there are no active tasks, unless the active task is configured as "cancelable", in which case it will be cancelled before the case is closed.

If the closure reason is not supplied or it does not match any that are pre-configured in the case, then the case default is used, as specified in the case configuration.

Namespace

goss.CaseManagement.v1.api.closeCase

Worker

serverlibrary

Parameters

Required PropertiesTypeDescription
caseBusinessKeyString <businessKey>The business key of the case
Optional PropertiesTypeDescription
closureNotesStringA note that will be added to the case history and the close case email that gets sent to the person who raised the case
closureReasonStringThe close reason
debugBooleanDefault: false. Set true to return debug information ("notes") in the response message
forceCloseBooleanIf true the case will be closed even if there are outstanding tasks that cannot be cancelled

Example

See Case Management API for a full example call.

{
    "caseBusinessKey": "8895-4890-0231-7127",
    "closureReason": "default",
    "closureNotes": "The is a test from an End Point"
}

Responses

Success

{
    "jsonrpc": "2.0",
    "id": 207,
    "result": {
        "success": true,
        "notes": ["Closure request sent to case 8895-4890-0231-7127", "Case has received closure request"]
    }
}

Error

In this case the business key didn't exist.

{
    "jsonrpc": "2.0",
    "id": 206,
    "result": {
        "success": false,
        "errors": ["CM error: Couldn't find any active executions."]
    }
}

Last modified on 31 October 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon