use of org.kie.server.api.model.cases.CaseInstance in project droolsjbpm-integration by kiegroup.
the class CaseManagementRuntimeDataServiceBase method getCaseInstances.
public CaseInstanceList getCaseInstances(List<String> status, Integer page, Integer pageSize, String sort, boolean sortOrder, boolean withData) {
List<CaseStatus> caseStatus = safeCaseStatus(status);
sort = safeCaseInstanceSort(sort);
Collection<org.jbpm.casemgmt.api.model.instance.CaseInstance> caseInstanceDescs = caseRuntimeDataService.getCaseInstances(caseStatus, withData, ConvertUtils.buildQueryContext(page, pageSize, sort, sortOrder));
List<CaseInstance> caseInstances = ConvertUtils.transformCaseInstances(caseInstanceDescs);
CaseInstanceList caseInstancesList = new CaseInstanceList(caseInstances);
return caseInstancesList;
}
use of org.kie.server.api.model.cases.CaseInstance in project droolsjbpm-integration by kiegroup.
the class CaseManagementRuntimeDataServiceBase method getCaseInstancesOwnedBy.
public CaseInstanceList getCaseInstancesOwnedBy(String owner, List<String> status, Integer page, Integer pageSize, String sort, boolean sortOrder, boolean withData) {
List<CaseStatus> caseStatus = safeCaseStatus(status);
owner = getUser(owner);
sort = safeCaseInstanceSort(sort);
Collection<org.jbpm.casemgmt.api.model.instance.CaseInstance> caseInstanceDescs = caseRuntimeDataService.getCaseInstancesOwnedBy(owner, caseStatus, withData, ConvertUtils.buildQueryContext(page, pageSize, sort, sortOrder));
List<CaseInstance> caseInstances = ConvertUtils.transformCaseInstances(caseInstanceDescs);
CaseInstanceList caseInstancesList = new CaseInstanceList(caseInstances);
return caseInstancesList;
}
use of org.kie.server.api.model.cases.CaseInstance in project droolsjbpm-integration by kiegroup.
the class CaseManagementRuntimeDataServiceBase method getCaseInstancesByCaseFileData.
public CaseInstanceList getCaseInstancesByCaseFileData(String dataItemName, String dataItemValue, List<String> status, Integer page, Integer pageSize, String sort, boolean sortOrder, boolean withData) {
List<CaseStatus> caseStatus = safeCaseStatus(status);
sort = safeCaseInstanceSort(sort);
Collection<org.jbpm.casemgmt.api.model.instance.CaseInstance> caseInstanceDescs = null;
if (dataItemValue != null && !dataItemValue.isEmpty()) {
caseInstanceDescs = caseRuntimeDataService.getCaseInstancesByDataItemAndValue(dataItemName, dataItemValue, caseStatus, withData, ConvertUtils.buildQueryContext(page, pageSize, sort, sortOrder));
} else {
caseInstanceDescs = caseRuntimeDataService.getCaseInstancesByDataItem(dataItemName, caseStatus, withData, ConvertUtils.buildQueryContext(page, pageSize, sort, sortOrder));
}
List<CaseInstance> caseInstances = ConvertUtils.transformCaseInstances(caseInstanceDescs);
CaseInstanceList caseInstancesList = new CaseInstanceList(caseInstances);
return caseInstancesList;
}
use of org.kie.server.api.model.cases.CaseInstance in project droolsjbpm-integration by kiegroup.
the class CaseManagementRuntimeDataServiceBase method getCaseInstancesByDefinition.
public CaseInstanceList getCaseInstancesByDefinition(String containerId, String caseDefinitionId, List<String> status, Integer page, Integer pageSize, String sort, boolean sortOrder, boolean withData) {
List<CaseStatus> caseStatus = safeCaseStatus(status);
sort = safeCaseInstanceSort(sort);
Collection<org.jbpm.casemgmt.api.model.instance.CaseInstance> caseInstanceDescs = caseRuntimeDataService.getCaseInstancesByDefinition(caseDefinitionId, caseStatus, withData, ConvertUtils.buildQueryContext(page, pageSize, sort, sortOrder));
List<CaseInstance> caseInstances = ConvertUtils.transformCaseInstances(caseInstanceDescs);
CaseInstanceList caseInstancesList = new CaseInstanceList(caseInstances);
return caseInstancesList;
}
use of org.kie.server.api.model.cases.CaseInstance in project droolsjbpm-integration by kiegroup.
the class CaseManagementRuntimeDataServiceBase method getCaseInstancesByContainer.
public CaseInstanceList getCaseInstancesByContainer(String containerId, List<String> status, Integer page, Integer pageSize, String sort, boolean sortOrder, boolean withData) {
List<CaseStatus> caseStatus = safeCaseStatus(status);
sort = safeCaseInstanceSort(sort);
Collection<org.jbpm.casemgmt.api.model.instance.CaseInstance> caseInstanceDescs = caseRuntimeDataService.getCaseInstancesByDeployment(containerId, caseStatus, withData, ConvertUtils.buildQueryContext(page, pageSize, sort, sortOrder));
List<CaseInstance> caseInstances = ConvertUtils.transformCaseInstances(caseInstanceDescs);
CaseInstanceList caseInstancesList = new CaseInstanceList(caseInstances);
return caseInstancesList;
}
Aggregations