@Test public void testGetCaseInstances(){ List<String> status = null; Integer page = 0; Integer pageSize= 10; String sort = "CorrelationKey"; boolean sortOrder = true; when(runtimeDataService.getCaseInstances(status, page, pageSize, sort, sortOrder)).thenReturn(new CaseInstanceList()); caseQueryResource.getCaseInstances(httpHeaders, null, null, null, status, page, pageSize, sort, sortOrder, false); verify(kieServerRegistry).getContainer(""); verify(runtimeDataService).getCaseInstancesAnyRole(status, page, pageSize, sort, sortOrder, false); caseQueryResource.getCaseInstances(httpHeaders, null, null, "pepe", status, page, pageSize, sort, sortOrder, true); verify(runtimeDataService).getCaseInstancesOwnedBy("pepe", status, page, pageSize, sort, sortOrder, true); caseQueryResource.getCaseInstances(httpHeaders, "key", "value", null , status, page, pageSize, sort, sortOrder, true); verify(runtimeDataService).getCaseInstancesByCaseFileData("key", "value", status, page, pageSize, sort, sortOrder, true); }
@ApiOperation(value="Returns cases instances with authentication checks.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_ALL_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response getCaseInstances(@javax.ws.rs.core.Context HttpHeaders headers, @ApiParam(value = "data item name that case instances will be filtered by", required = false) @QueryParam("dataItemName") String dataItemName, @ApiParam(value = "data item value that case instances will be filtered by", required = false) @QueryParam("dataItemValue") String dataItemValue, @ApiParam(value = "case instance owner that case instances will be filtered by", required = false) @QueryParam("owner") String owner, @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status, @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder, @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData) { return invokeCaseOperation(headers, "", null, (Variant v, String type, Header... customHeaders) -> { CaseInstanceList responseObject = null; if (dataItemName != null && !dataItemName.isEmpty() && dataItemValue != null && !dataItemValue.isEmpty()) { logger.debug("About to look for case instances by data item name {} and value {} with status {}", dataItemName, dataItemValue, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, dataItemValue, status, page, pageSize, sort, sortOrder, withData); } else if (dataItemName != null && !dataItemName.isEmpty()) { logger.debug("About to look for case instances by data item name {} with status {}", dataItemName, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, null, status, page, pageSize, sort, sortOrder, withData); } else if (owner != null && !owner.isEmpty()) { logger.debug("About to look for case instances owned by {} with status {}", owner, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesOwnedBy(owner, status, page, pageSize, sort, sortOrder, withData); } else { logger.debug("About to look for case instances with status {}", status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesAnyRole(status, page, pageSize, sort, sortOrder, withData); } logger.debug("Returning OK response with content '{}'", responseObject); return createCorrectVariant(responseObject, headers, Response.Status.OK, customHeaders); }); }
CaseQueryResource extends AbstractCaseResource { @ApiOperation(value="Returns cases instances with authentication checks.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_ALL_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response getCaseInstances(@javax.ws.rs.core.Context HttpHeaders headers, @ApiParam(value = "data item name that case instances will be filtered by", required = false) @QueryParam("dataItemName") String dataItemName, @ApiParam(value = "data item value that case instances will be filtered by", required = false) @QueryParam("dataItemValue") String dataItemValue, @ApiParam(value = "case instance owner that case instances will be filtered by", required = false) @QueryParam("owner") String owner, @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status, @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder, @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData) { return invokeCaseOperation(headers, "", null, (Variant v, String type, Header... customHeaders) -> { CaseInstanceList responseObject = null; if (dataItemName != null && !dataItemName.isEmpty() && dataItemValue != null && !dataItemValue.isEmpty()) { logger.debug("About to look for case instances by data item name {} and value {} with status {}", dataItemName, dataItemValue, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, dataItemValue, status, page, pageSize, sort, sortOrder, withData); } else if (dataItemName != null && !dataItemName.isEmpty()) { logger.debug("About to look for case instances by data item name {} with status {}", dataItemName, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, null, status, page, pageSize, sort, sortOrder, withData); } else if (owner != null && !owner.isEmpty()) { logger.debug("About to look for case instances owned by {} with status {}", owner, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesOwnedBy(owner, status, page, pageSize, sort, sortOrder, withData); } else { logger.debug("About to look for case instances with status {}", status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesAnyRole(status, page, pageSize, sort, sortOrder, withData); } logger.debug("Returning OK response with content '{}'", responseObject); return createCorrectVariant(responseObject, headers, Response.Status.OK, customHeaders); }); } }
CaseQueryResource extends AbstractCaseResource { @ApiOperation(value="Returns cases instances with authentication checks.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_ALL_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response getCaseInstances(@javax.ws.rs.core.Context HttpHeaders headers, @ApiParam(value = "data item name that case instances will be filtered by", required = false) @QueryParam("dataItemName") String dataItemName, @ApiParam(value = "data item value that case instances will be filtered by", required = false) @QueryParam("dataItemValue") String dataItemValue, @ApiParam(value = "case instance owner that case instances will be filtered by", required = false) @QueryParam("owner") String owner, @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status, @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder, @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData) { return invokeCaseOperation(headers, "", null, (Variant v, String type, Header... customHeaders) -> { CaseInstanceList responseObject = null; if (dataItemName != null && !dataItemName.isEmpty() && dataItemValue != null && !dataItemValue.isEmpty()) { logger.debug("About to look for case instances by data item name {} and value {} with status {}", dataItemName, dataItemValue, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, dataItemValue, status, page, pageSize, sort, sortOrder, withData); } else if (dataItemName != null && !dataItemName.isEmpty()) { logger.debug("About to look for case instances by data item name {} with status {}", dataItemName, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, null, status, page, pageSize, sort, sortOrder, withData); } else if (owner != null && !owner.isEmpty()) { logger.debug("About to look for case instances owned by {} with status {}", owner, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesOwnedBy(owner, status, page, pageSize, sort, sortOrder, withData); } else { logger.debug("About to look for case instances with status {}", status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesAnyRole(status, page, pageSize, sort, sortOrder, withData); } logger.debug("Returning OK response with content '{}'", responseObject); return createCorrectVariant(responseObject, headers, Response.Status.OK, customHeaders); }); } CaseQueryResource();  CaseQueryResource(
            final CaseManagementRuntimeDataServiceBase caseManagementRuntimeDataServiceBase,
            final KieServerRegistry context); }
CaseQueryResource extends AbstractCaseResource { @ApiOperation(value="Returns cases instances with authentication checks.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_ALL_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response getCaseInstances(@javax.ws.rs.core.Context HttpHeaders headers, @ApiParam(value = "data item name that case instances will be filtered by", required = false) @QueryParam("dataItemName") String dataItemName, @ApiParam(value = "data item value that case instances will be filtered by", required = false) @QueryParam("dataItemValue") String dataItemValue, @ApiParam(value = "case instance owner that case instances will be filtered by", required = false) @QueryParam("owner") String owner, @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status, @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder, @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData) { return invokeCaseOperation(headers, "", null, (Variant v, String type, Header... customHeaders) -> { CaseInstanceList responseObject = null; if (dataItemName != null && !dataItemName.isEmpty() && dataItemValue != null && !dataItemValue.isEmpty()) { logger.debug("About to look for case instances by data item name {} and value {} with status {}", dataItemName, dataItemValue, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, dataItemValue, status, page, pageSize, sort, sortOrder, withData); } else if (dataItemName != null && !dataItemName.isEmpty()) { logger.debug("About to look for case instances by data item name {} with status {}", dataItemName, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, null, status, page, pageSize, sort, sortOrder, withData); } else if (owner != null && !owner.isEmpty()) { logger.debug("About to look for case instances owned by {} with status {}", owner, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesOwnedBy(owner, status, page, pageSize, sort, sortOrder, withData); } else { logger.debug("About to look for case instances with status {}", status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesAnyRole(status, page, pageSize, sort, sortOrder, withData); } logger.debug("Returning OK response with content '{}'", responseObject); return createCorrectVariant(responseObject, headers, Response.Status.OK, customHeaders); }); } CaseQueryResource();  CaseQueryResource(
            final CaseManagementRuntimeDataServiceBase caseManagementRuntimeDataServiceBase,
            final KieServerRegistry context); @ApiOperation(value="Returns cases instances with authentication checks.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_ALL_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstances(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "data item name that case instances will be filtered by", required = false) @QueryParam("dataItemName") String dataItemName, 
            @ApiParam(value = "data item value that case instances will be filtered by", required = false) @QueryParam("dataItemValue") String dataItemValue,
            @ApiParam(value = "case instance owner that case instances will be filtered by", required = false) @QueryParam("owner") String owner,
            @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder,
            @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData); @ApiOperation(value="Returns cases instances that involve the querying user in a specified role.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_INSTANCES_BY_ROLE_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstancesByRole(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case role that instances should be found for", required = true, example = "owner") @PathParam(CASE_ROLE_NAME) String roleName, 
            @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder,
            @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData); @ApiOperation(value="Returns a specified case definition from all KIE containers.", response=CaseDefinitionList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_DEFINITIONS_JSON)}))}) @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseDefinitions(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case definition id or name that case definitions will be filtered by", required = true) @QueryParam("filter") String filter,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns a specified process associated with case definitions from all KIE containers.", response=ProcessDefinitionList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_PROCESS_DEFS_RESPONSE_JSON)}))}) @GET @Path(CASE_ALL_PROCESSES_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getProcessDefinitions(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "process definition id or name that process definitions will be filtered by", required = true) @QueryParam("filter") String filter,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns processes associated with case definitions in a specified KIE container.", response=ProcessDefinitionList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_PROCESS_DEFS_RESPONSE_JSON)}))}) @GET @Path(CASE_PROCESSES_BY_CONTAINER_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getProcessDefinitionsByContainer(@javax.ws.rs.core.Context HttpHeaders headers, 
            @ApiParam(value = "container id that process definitions should be filtered by", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String containerId,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns tasks for potential owners in a specified case instance.", response=TaskSummaryList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_TASK_SUMMARY_RESPONSE_JSON)}))}) @GET @Path(CASE_TASKS_AS_POT_OWNER_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceTasksAsPotentialOwner(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case instance identifier that tasks should belong to", required = true, example = "CASE-00000000011") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optional user id to be used instead of authenticated user - only when bypass authenticated user is enabled", required = false) @QueryParam("user") String user, 
            @ApiParam(value = "optional task status (Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete)", required = false, allowableValues="Created, Ready, Reserved,InProgress,Suspended,Completed,Failed,Error,Exited,Obsolete") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns tasks for business administrators in a specified case instance.", response=TaskSummaryList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_TASK_SUMMARY_RESPONSE_JSON)}))}) @GET @Path(CASE_TASKS_AS_ADMIN_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceTasksAsAdmin(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case instance identifier that tasks should belong to", required = true, example = "CASE-00000000001") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optional user id to be used instead of authenticated user - only when bypass authenticated user is enabled", required = false) @QueryParam("user") String user, 
            @ApiParam(value = "optional task status (Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete)", required = false, allowableValues="Created, Ready, Reserved,InProgress,Suspended,Completed,Failed,Error,Exited,Obsolete") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns tasks for stakeholders in a specified case instance.", response=TaskSummaryList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_TASK_SUMMARY_RESPONSE_JSON)}))}) @GET @Path(CASE_TASKS_AS_STAKEHOLDER_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceTasksAsStakeholder(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case instance identifier that tasks should belong to", required = true, example = "CASE-0000000001") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optional user id to be used instead of authenticated user - only when bypass authenticated user is enabled", required = false) @QueryParam("user") String user, 
            @ApiParam(value = "optional task status (Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete)", required = false, allowableValues="Created, Ready, Reserved,InProgress,Suspended,Completed,Failed,Error,Exited,Obsolete") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns case file data items for a specified case instance.", response=CaseFileDataItemList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_CASE_FILE_DATA_RESPONSE_JSON)}))}) @GET @Path(CASE_FILE_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceDataItems(@javax.ws.rs.core.Context HttpHeaders headers, 
            @ApiParam(value = "case instance identifier that data items should belong to", required = true, example = "CASE-0000000001") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optionally filter by data item names", required = false) @QueryParam("name") List<String> names, 
            @ApiParam(value = "optionally filter by data item types", required = false) @QueryParam("type") List<String> types,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize); @ApiOperation(value = "Queries cases by variables and tasks") @POST @Path(RestURI.VARIABLES_CASES_URI) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @KieServerEndpoint(categories = {EndpointType.DEFAULT, EndpointType.HISTORY}) Response queryCaseByVariables(@Context HttpHeaders headers, String payload,
                                         @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
                                         @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize); @ApiOperation(value = "Queries cases tasks by variables") @POST @Path(RestURI.VARIABLES_TASKS_CASES_URI) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @KieServerEndpoint(categories = {EndpointType.DEFAULT, EndpointType.HISTORY}) Response queryCaseUserTasksByVariables(@Context HttpHeaders headers,
                                                  String payload,
                                                  @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
                                                  @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize); }
CaseQueryResource extends AbstractCaseResource { @ApiOperation(value="Returns cases instances with authentication checks.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_ALL_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Response getCaseInstances(@javax.ws.rs.core.Context HttpHeaders headers, @ApiParam(value = "data item name that case instances will be filtered by", required = false) @QueryParam("dataItemName") String dataItemName, @ApiParam(value = "data item value that case instances will be filtered by", required = false) @QueryParam("dataItemValue") String dataItemValue, @ApiParam(value = "case instance owner that case instances will be filtered by", required = false) @QueryParam("owner") String owner, @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status, @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize, @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder, @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData) { return invokeCaseOperation(headers, "", null, (Variant v, String type, Header... customHeaders) -> { CaseInstanceList responseObject = null; if (dataItemName != null && !dataItemName.isEmpty() && dataItemValue != null && !dataItemValue.isEmpty()) { logger.debug("About to look for case instances by data item name {} and value {} with status {}", dataItemName, dataItemValue, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, dataItemValue, status, page, pageSize, sort, sortOrder, withData); } else if (dataItemName != null && !dataItemName.isEmpty()) { logger.debug("About to look for case instances by data item name {} with status {}", dataItemName, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesByCaseFileData(dataItemName, null, status, page, pageSize, sort, sortOrder, withData); } else if (owner != null && !owner.isEmpty()) { logger.debug("About to look for case instances owned by {} with status {}", owner, status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesOwnedBy(owner, status, page, pageSize, sort, sortOrder, withData); } else { logger.debug("About to look for case instances with status {}", status); responseObject = this.caseManagementRuntimeDataServiceBase.getCaseInstancesAnyRole(status, page, pageSize, sort, sortOrder, withData); } logger.debug("Returning OK response with content '{}'", responseObject); return createCorrectVariant(responseObject, headers, Response.Status.OK, customHeaders); }); } CaseQueryResource();  CaseQueryResource(
            final CaseManagementRuntimeDataServiceBase caseManagementRuntimeDataServiceBase,
            final KieServerRegistry context); @ApiOperation(value="Returns cases instances with authentication checks.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_ALL_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstances(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "data item name that case instances will be filtered by", required = false) @QueryParam("dataItemName") String dataItemName, 
            @ApiParam(value = "data item value that case instances will be filtered by", required = false) @QueryParam("dataItemValue") String dataItemValue,
            @ApiParam(value = "case instance owner that case instances will be filtered by", required = false) @QueryParam("owner") String owner,
            @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder,
            @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData); @ApiOperation(value="Returns cases instances that involve the querying user in a specified role.", response=CaseInstanceList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_INSTANCES_JSON)}))}) @GET @Path(CASE_INSTANCES_BY_ROLE_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstancesByRole(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case role that instances should be found for", required = true, example = "owner") @PathParam(CASE_ROLE_NAME) String roleName, 
            @ApiParam(value = "optional case instance status (open, closed, canceled) - defaults ot open (1) only", required = false, allowableValues="open,closed,cancelled") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder,
            @ApiParam(value = "optional flag to load data when loading case instance", required = false) @QueryParam("withData") @DefaultValue("false") boolean withData); @ApiOperation(value="Returns a specified case definition from all KIE containers.", response=CaseDefinitionList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=CASE_DEFINITIONS_JSON)}))}) @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseDefinitions(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case definition id or name that case definitions will be filtered by", required = true) @QueryParam("filter") String filter,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns a specified process associated with case definitions from all KIE containers.", response=ProcessDefinitionList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_PROCESS_DEFS_RESPONSE_JSON)}))}) @GET @Path(CASE_ALL_PROCESSES_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getProcessDefinitions(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "process definition id or name that process definitions will be filtered by", required = true) @QueryParam("filter") String filter,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns processes associated with case definitions in a specified KIE container.", response=ProcessDefinitionList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_PROCESS_DEFS_RESPONSE_JSON)}))}) @GET @Path(CASE_PROCESSES_BY_CONTAINER_INSTANCES_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getProcessDefinitionsByContainer(@javax.ws.rs.core.Context HttpHeaders headers, 
            @ApiParam(value = "container id that process definitions should be filtered by", required = true, example = "evaluation_1.0.0-SNAPSHOT") @PathParam(CONTAINER_ID) String containerId,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns tasks for potential owners in a specified case instance.", response=TaskSummaryList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_TASK_SUMMARY_RESPONSE_JSON)}))}) @GET @Path(CASE_TASKS_AS_POT_OWNER_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceTasksAsPotentialOwner(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case instance identifier that tasks should belong to", required = true, example = "CASE-00000000011") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optional user id to be used instead of authenticated user - only when bypass authenticated user is enabled", required = false) @QueryParam("user") String user, 
            @ApiParam(value = "optional task status (Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete)", required = false, allowableValues="Created, Ready, Reserved,InProgress,Suspended,Completed,Failed,Error,Exited,Obsolete") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns tasks for business administrators in a specified case instance.", response=TaskSummaryList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_TASK_SUMMARY_RESPONSE_JSON)}))}) @GET @Path(CASE_TASKS_AS_ADMIN_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceTasksAsAdmin(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case instance identifier that tasks should belong to", required = true, example = "CASE-00000000001") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optional user id to be used instead of authenticated user - only when bypass authenticated user is enabled", required = false) @QueryParam("user") String user, 
            @ApiParam(value = "optional task status (Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete)", required = false, allowableValues="Created, Ready, Reserved,InProgress,Suspended,Completed,Failed,Error,Exited,Obsolete") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns tasks for stakeholders in a specified case instance.", response=TaskSummaryList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_TASK_SUMMARY_RESPONSE_JSON)}))}) @GET @Path(CASE_TASKS_AS_STAKEHOLDER_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceTasksAsStakeholder(@javax.ws.rs.core.Context HttpHeaders headers,
            @ApiParam(value = "case instance identifier that tasks should belong to", required = true, example = "CASE-0000000001") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optional user id to be used instead of authenticated user - only when bypass authenticated user is enabled", required = false) @QueryParam("user") String user, 
            @ApiParam(value = "optional task status (Created, Ready, Reserved, InProgress, Suspended, Completed, Failed, Error, Exited, Obsolete)", required = false, allowableValues="Created, Ready, Reserved,InProgress,Suspended,Completed,Failed,Error,Exited,Obsolete") @QueryParam("status") List<String> status,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize,
            @ApiParam(value = "optional sort column, no default", required = false) @QueryParam("sort") String sort, 
            @ApiParam(value = "optional sort direction (asc, desc) - defaults to asc", required = false) @QueryParam("sortOrder") @DefaultValue("true") boolean sortOrder); @ApiOperation(value="Returns case file data items for a specified case instance.", response=CaseFileDataItemList.class, code=200) @ApiResponses(value = { @ApiResponse(code = 500, message = "Unexpected error"), @ApiResponse(code = 200, message = "Successfull response", examples=@Example(value= { @ExampleProperty(mediaType=JSON, value=GET_CASE_FILE_DATA_RESPONSE_JSON)}))}) @GET @Path(CASE_FILE_GET_URI) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) Response getCaseInstanceDataItems(@javax.ws.rs.core.Context HttpHeaders headers, 
            @ApiParam(value = "case instance identifier that data items should belong to", required = true, example = "CASE-0000000001") @PathParam(CASE_ID) String caseId,
            @ApiParam(value = "optionally filter by data item names", required = false) @QueryParam("name") List<String> names, 
            @ApiParam(value = "optionally filter by data item types", required = false) @QueryParam("type") List<String> types,
            @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
            @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize); @ApiOperation(value = "Queries cases by variables and tasks") @POST @Path(RestURI.VARIABLES_CASES_URI) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @KieServerEndpoint(categories = {EndpointType.DEFAULT, EndpointType.HISTORY}) Response queryCaseByVariables(@Context HttpHeaders headers, String payload,
                                         @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
                                         @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize); @ApiOperation(value = "Queries cases tasks by variables") @POST @Path(RestURI.VARIABLES_TASKS_CASES_URI) @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @KieServerEndpoint(categories = {EndpointType.DEFAULT, EndpointType.HISTORY}) Response queryCaseUserTasksByVariables(@Context HttpHeaders headers,
                                                  String payload,
                                                  @ApiParam(value = "optional pagination - at which page to start, defaults to 0 (meaning first)", required = false) @QueryParam("page") @DefaultValue("0") Integer page, 
                                                  @ApiParam(value = "optional pagination - size of the result, defaults to 10", required = false) @QueryParam("pageSize") @DefaultValue("10") Integer pageSize);  }