pp108 : CloseCaseInstance

CloseCaseInstance

The CloseCaseInstance is used to complete the Case instance. When this operation is invoked on a Case instance, all the human task activities of the Case instance are retrieved from the Inbox and will be marked as Obsolete. The subprocess instances invoked from this Case instance will be terminated.This Web service operation is a part of the CaseInstanceAdministration Web service interface with the namespace 'http://schemas.cordys.com/casemanagement/instanceadministration/1.0'.

SOAP Request

 <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <CloseCaseInstance xmlns="http://schemas.cordys.com/casemanagement/instanceadministration/1.0">
             <caseinstanceid>005056C0-0008-11E0-EE49-60266BC9F3C8</caseinstanceid>
        </CloseCaseInstance>
    </SOAP:Body>
</SOAP:Envelope>

Request Parameters

Parameter

Description

Mandatory

Accepted Input Values

caseinstanceid

Refers to the unique identifier of the Case instance. The Case instance ID can be obtained from:

  • The ID returned in the response of CreateCase invocation
  • The Workflow.getCaseInstanceId Web API when invoked from a human task of the case instance

Yes

GUID

SOAP Response

<data>
    <CloseCaseInstanceResponse
        xmlns="http://schemas.cordys.com/casemanagement/instanceadministration/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
        <status activitytype="CASETASK"
            instanceid="005056C0-0008-11E0-EE49-60266BC9F3C8" success="true">
            <status activitytype="state"
                instanceid="005056C0-0008-11E0-EE49-60266BCA33C8" success="true"/>
            <status activitytype="HUMANTASK"
                instanceid="005056C0-0008-11E0-EE49-60266BCA53C8" success="true"/>
        </status>
    </CloseCaseInstanceResponse>
</data>
Response Parameters

Parameters

Description
activitytype

It will have one of the following values:

  • HUMANTASK (When the activity is an user interface)
  • BPMTASK (When the activity is a sub-bpm )
  • CASETASK (When the activity is a sub-case)

success

Refers to the closure of the Case. Returns

  • true, if the Case is closed
  • false, if the Case is not closed