getCaseStates

Retrieves the case states for one or more given case references.

Required System Actions

readGlobalData

Usage

CaseManagementService.getCaseStates(model, callback)

Parameters

Parameter Type Description
model CaseManagementModel The case model to be passed to the $scope object.

You must provide an array of case references (CaseManagementModel.caseRefArray) for which the case states are to be returned.

The response populates the CaseManagementModel.caseStates object with the current state of the case(s).

callback Function Callback function to handle success or failure results from the request.

Sample Usage

scope.caseRef = "BDS-1-com.example.claimbom.Policy-3-0";  //accept a case reference from user for which we need case states
scope.caseRefArray = [];
scope.caseRefArray.push(scope.caseRef);     //user can assign one or multiple case references to find their case states
 
//Actual Service call
CaseManagementService.getCaseStates(scope, {onSuccess: function()
    {
        console.log("Case States for the given case references"+scope.caseRefArray+" are "+scope.caseStates);  //Case states are returned and assigned to caseStates
    }
});