findAllCases

Find all cases for a given case type.

Required System Actions

readGlobalData

Usage

CaseManagementService.findAllCases(model, callback)

Parameters

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

You must provide a case model that provides a case type and the major version of the case model to which it belongs, then assign it to an object named selectedCaseType on the scope and pass the scope to the service.

This service requires:

The response populates the CaseManagementModel.caseReferencesArray object with the references of the cases that were found.

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

Sample Usage

$scope.selectedCaseType={};        //accept selected case type from user / assign it from a selected casetype
$scope.selectedCaseType.name=$scope.obj.id;
$scope.selectedCaseModel={};   //accept casemodel information from user / assign it from a selected caseModel
$scope.selectedCaseModel.majorVersion=$scope.obj.version; //accept majorVersion from user / assign it from a selected caseModel
CaseManagementService.findAllCases($scope,{onSuccess: function()
 {
   console.log("Cases of "+$scope.selectedCaseType.name+" are : "+$scope.caseReferencesArray); //Service call assigns the list of case references to $scope.caseReferencesArray
 }
});