test_class.file: modules/flowable-rest/src/test/java/org/flowable/rest/service/api/management/JobCollectionResourceTest.java
test_class.identifier: JobCollectionResourceTest
test_class.superclass: extends BaseSpringRestTestCase
test_case.body: @Test
      @Deployment(resources = { "org/flowable/rest/service/api/management/JobCollectionResourceTest.testTimerProcess.bpmn20.xml" })
      public void testGetJobs() throws Exception {
          Calendar hourAgo = Calendar.getInstance();
          hourAgo.add(Calendar.HOUR, -1);
  
          Calendar inAnHour = Calendar.getInstance();
          inAnHour.add(Calendar.HOUR, 1);
  
          // Start process, forcing error on job-execution
          ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("timerProcess", Collections.singletonMap("error", (Object) Boolean.TRUE));
  
          Job timerJob = managementService.createTimerJobQuery().processInstanceId(processInstance.getId()).timers().singleResult();
          assertThat(timerJob).isNotNull();
  
          String url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION);
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          // Fetch using id
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?id=" + timerJob.getId();
          assertResultsPresentInDataResponse(url, timerJob.getId());
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?id=" + timerJob.getId() + "xyzzy";
          assertResultsPresentInDataResponse(url);
  
          // Fetch using processInstanceId
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?processInstanceId=" + processInstance.getId();
          assertResultsPresentInDataResponse(url, timerJob.getId());
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?processInstanceId=" + processInstance.getId() + "xyzzy";
          assertResultsPresentInDataResponse(url);
  
          // Fetch using executionId
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?executionId=" + timerJob.getExecutionId();
          assertResultsPresentInDataResponse(url, timerJob.getId());
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?executionId=" + timerJob.getExecutionId() + "xyzzy";
          assertResultsPresentInDataResponse(url);
  
          // Fetch using processDefinitionId
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?processDefinitionId=" + timerJob.getProcessDefinitionId();
          assertResultsPresentInDataResponse(url, timerJob.getId());
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?processDefinitionId=" + timerJob.getProcessDefinitionId() + "xyzzy";
          assertResultsPresentInDataResponse(url);
          // Fetch using dueBefore
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?dueBefore=" + getISODateString(inAnHour.getTime());
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?dueBefore=" + getISODateString(hourAgo.getTime());
          assertResultsPresentInDataResponse(url);
  
          // Fetch using dueAfter
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?dueAfter=" + getISODateString(hourAgo.getTime());
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?dueAfter=" + getISODateString(inAnHour.getTime());
          assertResultsPresentInDataResponse(url);
          
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?elementId=escalationTimer";
          assertResultsPresentInDataResponse(url, timerJob.getId());
          
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?elementId=unknown";
          assertEmptyResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?elementName=Escalation";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?elementName=unknown";
          assertEmptyResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?executable";
          assertEmptyResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?tenantId=xyzzy";
          assertResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?tenantIdLike=xyzzy";
          assertResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?withoutTenantId=true";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?timersOnly=true";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?messagesOnly=true";
          assertResultsPresentInDataResponse(url);
  
          // Combining messagesOnly with timersOnly should result in exception
          closeResponse(executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?timersOnly=true&messagesOnly=true"), HttpStatus.SC_BAD_REQUEST));
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?withException=true";
          assertResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?exceptionMessage=";
          assertResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TIMER_JOB_COLLECTION) + "?exceptionMessage=FlowableException";
          assertResultsPresentInDataResponse(url);
  
          Job timerJob2 = managementService.createTimerJobQuery().processInstanceId(processInstance.getId()).timers().singleResult();
          for (int i = 0; i < timerJob2.getRetries(); i++) {
              // Force execution of job until retries are exhausted
              assertThatThrownBy(() -> {
                  managementService.moveTimerToExecutableJob(timerJob2.getId());
                  managementService.executeJob(timerJob2.getId());
              })
                      .isExactlyInstanceOf(FlowableException.class);
          }
  
          timerJob = managementService.createDeadLetterJobQuery().processInstanceId(processInstance.getId()).timers().singleResult();
          assertThat(timerJob.getRetries()).isZero();
  
          // Fetch the async-job (which has retries left)
          Job asyncJob = managementService.createJobQuery().processInstanceId(processInstance.getId()).singleResult();
  
          // Test fetching all jobs
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION);
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION);
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          // Fetch using job-id
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?id=" + asyncJob.getId();
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          // Fetch using processInstanceId
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?processInstanceId=" + processInstance.getId();
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?processInstanceId=unexisting";
          assertResultsPresentInDataResponse(url);
  
          // Fetch using executionId
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?executionId=" + asyncJob.getExecutionId();
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?executionId=" + timerJob.getExecutionId();
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          // Fetch using processDefinitionId
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?processDefinitionId=" + processInstance.getProcessDefinitionId();
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?processDefinitionId=" + processInstance.getProcessDefinitionId();
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?processDefinitionId=unexisting";
          assertResultsPresentInDataResponse(url);
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?processDefinitionId=unexisting";
          assertResultsPresentInDataResponse(url);
          
          // Fetch using element id and name
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?elementId=escalationTimer";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?elementId=unexisting";
          assertResultsPresentInDataResponse(url);
          
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?elementName=Escalation";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?elementName=unexisting";
          assertResultsPresentInDataResponse(url);
  
          // Fetch using withRetriesLeft
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?withRetriesLeft=true";
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          // Fetch using executable
          // url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION)
          // + "?executable=true";
          // assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          // Fetch using timers only
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?timersOnly=true";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          // Combining messagesOnly with timersOnly should result in exception
          closeResponse(executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?timersOnly=true&messagesOnly=true"), HttpStatus.SC_BAD_REQUEST));
  
          // Fetch using withException
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?withException=true";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          // Fetch with exceptionMessage
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?exceptionMessage=" + encode(timerJob.getExceptionMessage());
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          // Fetch with empty exceptionMessage
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?exceptionMessage=";
          assertResultsPresentInDataResponse(url);
  
          // Without tenant id, before tenant update
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?withoutTenantId=true";
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?withoutTenantId=true";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          // Set tenant on deployment
          managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
  
          // Without tenant id, after tenant update
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?withoutTenantId=true";
          assertResultsPresentInDataResponse(url);
  
          // Tenant id
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?tenantId=myTenant";
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?tenantId=anotherTenant";
          assertResultsPresentInDataResponse(url);
  
          // Tenant id like
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?tenantIdLike=" + encode("%enant");
          assertResultsPresentInDataResponse(url, asyncJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_DEADLETTER_JOB_COLLECTION) + "?tenantIdLike=" + encode("%enant");
          assertResultsPresentInDataResponse(url, timerJob.getId());
  
          url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?tenantIdLike=anotherTenant";
          assertResultsPresentInDataResponse(url);
  
      }
test_case.class_method_signature: JobCollectionResourceTest.testGetJobs()
test_case.full_signature: @Test @Deployment(resources = { "org/flowable/rest/service/api/management/JobCollectionResourceTest.testTimerProcess.bpmn20.xml" }) public void testGetJobs()
test_case.identifier: testGetJobs
test_case.invocations: getInstance add getInstance add startProcessInstanceByKey singletonMap singleResult timers processInstanceId createTimerJobQuery getId isNotNull assertThat createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl getId assertResultsPresentInDataResponse getId createRelativeResourceUrl getId assertResultsPresentInDataResponse createRelativeResourceUrl getId assertResultsPresentInDataResponse getId createRelativeResourceUrl getId assertResultsPresentInDataResponse createRelativeResourceUrl getExecutionId assertResultsPresentInDataResponse getId createRelativeResourceUrl getExecutionId assertResultsPresentInDataResponse createRelativeResourceUrl getProcessDefinitionId assertResultsPresentInDataResponse getId createRelativeResourceUrl getProcessDefinitionId assertResultsPresentInDataResponse createRelativeResourceUrl getISODateString getTime assertResultsPresentInDataResponse getId createRelativeResourceUrl getISODateString getTime assertResultsPresentInDataResponse createRelativeResourceUrl getISODateString getTime assertResultsPresentInDataResponse getId createRelativeResourceUrl getISODateString getTime assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertEmptyResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertEmptyResultsPresentInDataResponse createRelativeResourceUrl assertEmptyResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse closeResponse executeRequest createRelativeResourceUrl createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse singleResult timers processInstanceId createTimerJobQuery getId getRetries isExactlyInstanceOf assertThatThrownBy moveTimerToExecutableJob getId executeJob getId singleResult timers processInstanceId createDeadLetterJobQuery getId isZero assertThat getRetries singleResult processInstanceId createJobQuery getId createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl getId assertResultsPresentInDataResponse getId createRelativeResourceUrl getId assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl getExecutionId assertResultsPresentInDataResponse getId createRelativeResourceUrl getExecutionId assertResultsPresentInDataResponse getId createRelativeResourceUrl getProcessDefinitionId assertResultsPresentInDataResponse getId createRelativeResourceUrl getProcessDefinitionId assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse getId closeResponse executeRequest createRelativeResourceUrl createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl encode getExceptionMessage assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse getId executeCommand createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse createRelativeResourceUrl encode assertResultsPresentInDataResponse getId createRelativeResourceUrl encode assertResultsPresentInDataResponse getId createRelativeResourceUrl assertResultsPresentInDataResponse
test_case.modifiers: @Test @Deployment(resources = { "org/flowable/rest/service/api/management/JobCollectionResourceTest.testTimerProcess.bpmn20.xml" }) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetJobs()
focal_class.declarator: restResponseFactory
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected RestResponseFactory restResponseFactory;
focal_class.type: RestResponseFactory
focal_class.var_name: restResponseFactory
focal_class.declarator: managementService
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected ManagementService managementService;
focal_class.type: ManagementService
focal_class.var_name: managementService
focal_class.declarator: restApiInterceptor
focal_class.modifier: @Autowired(required=false)
      protected
focal_class.original_string: @Autowired(required=false)
      protected BpmnRestApiInterceptor restApiInterceptor;
focal_class.type: BpmnRestApiInterceptor
focal_class.var_name: restApiInterceptor
focal_class.file: modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/JobCollectionResource.java
focal_class.identifier: JobCollectionResource
focal_class.class_method_signature: JobCollectionResource.getJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)
focal_class.full_signature: @ApiOperation(value = "List jobs", tags = { "Jobs" }, nickname = "listJobs") @ApiImplicitParams({ @ApiImplicitParam(name = "id", dataType = "string", value = "Only return job with the given id", paramType = "query"), @ApiImplicitParam(name = "processInstanceId", dataType = "string", value = "Only return jobs part of a process with the given id", paramType = "query"), @ApiImplicitParam(name = "executionId", dataType = "string", value = "Only return jobs part of an execution with the given id", paramType = "query"), @ApiImplicitParam(name = "processDefinitionId", dataType = "string", value = "Only return jobs with the given process definition id", paramType = "query"), @ApiImplicitParam(name = "elementId", dataType = "string", value = "Only return jobs with the given element id", paramType = "query"), @ApiImplicitParam(name = "elementName", dataType = "string", value = "Only return jobs with the given element name", paramType = "query"), @ApiImplicitParam(name = "timersOnly", dataType = "boolean", value = "If true, only return jobs which are timers. If false, this parameter is ignored. Cannot be used together with 'messagesOnly'.", paramType = "query"), @ApiImplicitParam(name = "messagesOnly", dataType = "boolean", value = "If true, only return jobs which are messages. If false, this parameter is ignored. Cannot be used together with 'timersOnly'", paramType = "query"), @ApiImplicitParam(name = "withException", dataType = "boolean", value = "If true, only return jobs for which an exception occurred while executing it. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "dueBefore", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed before the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "dueAfter", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed after the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "exceptionMessage", dataType = "string", value = "Only return jobs with the given exception message", paramType = "query"), @ApiImplicitParam(name = "tenantId", dataType = "string", value = "Only return jobs with the given tenantId.", paramType = "query"), @ApiImplicitParam(name = "tenantIdLike", dataType = "string", value = "Only return jobs with a tenantId like the given value.", paramType = "query"), @ApiImplicitParam(name = "withoutTenantId", dataType = "boolean", value = "If true, only returns jobs without a tenantId set. If false, the withoutTenantId parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "locked", dataType = "boolean", value = "If true, only return jobs which are locked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "unlocked", dataType = "boolean", value = "If true, only return jobs which are unlocked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "sort", dataType = "string", value = "Property to sort on, to be used together with the order.", allowableValues = "id,dueDate,executionId,processInstanceId,retries,tenantId", paramType = "query") }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the requested jobs were returned."), @ApiResponse(code = 400, message = "Indicates an illegal value has been used in a url query parameter or the both 'messagesOnly' and 'timersOnly' are used as parameters. Status description contains additional details about the error.") }) @GetMapping(value = "/management/jobs", produces = "application/json") public DataResponse<JobResponse> getJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)
focal_class.identifier: getJobs
focal_class.modifiers: @ApiOperation(value = "List jobs", tags = { "Jobs" }, nickname = "listJobs") @ApiImplicitParams({ @ApiImplicitParam(name = "id", dataType = "string", value = "Only return job with the given id", paramType = "query"), @ApiImplicitParam(name = "processInstanceId", dataType = "string", value = "Only return jobs part of a process with the given id", paramType = "query"), @ApiImplicitParam(name = "executionId", dataType = "string", value = "Only return jobs part of an execution with the given id", paramType = "query"), @ApiImplicitParam(name = "processDefinitionId", dataType = "string", value = "Only return jobs with the given process definition id", paramType = "query"), @ApiImplicitParam(name = "elementId", dataType = "string", value = "Only return jobs with the given element id", paramType = "query"), @ApiImplicitParam(name = "elementName", dataType = "string", value = "Only return jobs with the given element name", paramType = "query"), @ApiImplicitParam(name = "timersOnly", dataType = "boolean", value = "If true, only return jobs which are timers. If false, this parameter is ignored. Cannot be used together with 'messagesOnly'.", paramType = "query"), @ApiImplicitParam(name = "messagesOnly", dataType = "boolean", value = "If true, only return jobs which are messages. If false, this parameter is ignored. Cannot be used together with 'timersOnly'", paramType = "query"), @ApiImplicitParam(name = "withException", dataType = "boolean", value = "If true, only return jobs for which an exception occurred while executing it. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "dueBefore", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed before the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "dueAfter", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed after the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "exceptionMessage", dataType = "string", value = "Only return jobs with the given exception message", paramType = "query"), @ApiImplicitParam(name = "tenantId", dataType = "string", value = "Only return jobs with the given tenantId.", paramType = "query"), @ApiImplicitParam(name = "tenantIdLike", dataType = "string", value = "Only return jobs with a tenantId like the given value.", paramType = "query"), @ApiImplicitParam(name = "withoutTenantId", dataType = "boolean", value = "If true, only returns jobs without a tenantId set. If false, the withoutTenantId parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "locked", dataType = "boolean", value = "If true, only return jobs which are locked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "unlocked", dataType = "boolean", value = "If true, only return jobs which are unlocked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "sort", dataType = "string", value = "Property to sort on, to be used together with the order.", allowableValues = "id,dueDate,executionId,processInstanceId,retries,tenantId", paramType = "query") }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the requested jobs were returned."), @ApiResponse(code = 400, message = "Indicates an illegal value has been used in a url query parameter or the both 'messagesOnly' and 'timersOnly' are used as parameters. Status description contains additional details about the error.") }) @GetMapping(value = "/management/jobs", produces = "application/json") public
focal_class.parameters: (@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)
focal_class.return: DataResponse<JobResponse>
focal_class.signature: DataResponse<JobResponse> getJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)
focal_method.body: @ApiOperation(value = "List jobs", tags = { "Jobs" }, nickname = "listJobs")
      @ApiImplicitParams({
              @ApiImplicitParam(name = "id", dataType = "string", value = "Only return job with the given id", paramType = "query"),
              @ApiImplicitParam(name = "processInstanceId", dataType = "string", value = "Only return jobs part of a process with the given id", paramType = "query"),
              @ApiImplicitParam(name = "executionId", dataType = "string", value = "Only return jobs part of an execution with the given id", paramType = "query"),
              @ApiImplicitParam(name = "processDefinitionId", dataType = "string", value = "Only return jobs with the given process definition id", paramType = "query"),
              @ApiImplicitParam(name = "elementId", dataType = "string", value = "Only return jobs with the given element id", paramType = "query"),
              @ApiImplicitParam(name = "elementName", dataType = "string", value = "Only return jobs with the given element name", paramType = "query"),
              @ApiImplicitParam(name = "timersOnly", dataType = "boolean", value = "If true, only return jobs which are timers. If false, this parameter is ignored. Cannot be used together with 'messagesOnly'.", paramType = "query"),
              @ApiImplicitParam(name = "messagesOnly", dataType = "boolean", value = "If true, only return jobs which are messages. If false, this parameter is ignored. Cannot be used together with 'timersOnly'", paramType = "query"),
              @ApiImplicitParam(name = "withException", dataType = "boolean", value = "If true, only return jobs for which an exception occurred while executing it. If false, this parameter is ignored.", paramType = "query"),
              @ApiImplicitParam(name = "dueBefore", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed before the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"),
              @ApiImplicitParam(name = "dueAfter", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed after the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"),
              @ApiImplicitParam(name = "exceptionMessage", dataType = "string", value = "Only return jobs with the given exception message", paramType = "query"),
              @ApiImplicitParam(name = "tenantId", dataType = "string", value = "Only return jobs with the given tenantId.", paramType = "query"),
              @ApiImplicitParam(name = "tenantIdLike", dataType = "string", value = "Only return jobs with a tenantId like the given value.", paramType = "query"),
              @ApiImplicitParam(name = "withoutTenantId", dataType = "boolean", value = "If true, only returns jobs without a tenantId set. If false, the withoutTenantId parameter is ignored.", paramType = "query"),
              @ApiImplicitParam(name = "locked", dataType = "boolean", value = "If true, only return jobs which are locked.  If false, this parameter is ignored.", paramType = "query"),
              @ApiImplicitParam(name = "unlocked", dataType = "boolean", value = "If true, only return jobs which are unlocked. If false, this parameter is ignored.", paramType = "query"),
              @ApiImplicitParam(name = "sort", dataType = "string", value = "Property to sort on, to be used together with the order.", allowableValues = "id,dueDate,executionId,processInstanceId,retries,tenantId", paramType = "query")
      })
      @ApiResponses(value = {
              @ApiResponse(code = 200, message = "Indicates the requested jobs were returned."),
              @ApiResponse(code = 400, message = "Indicates an illegal value has been used in a url query parameter or the both 'messagesOnly' and 'timersOnly' are used as parameters. Status description contains additional details about the error.")
      })
      @GetMapping(value = "/management/jobs", produces = "application/json")
      public DataResponse<JobResponse> getJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request) {
          JobQuery query = managementService.createJobQuery();
  
          if (allRequestParams.containsKey("id")) {
              query.jobId(allRequestParams.get("id"));
          }
          if (allRequestParams.containsKey("processInstanceId")) {
              query.processInstanceId(allRequestParams.get("processInstanceId"));
          }
          if (allRequestParams.containsKey("executionId")) {
              query.executionId(allRequestParams.get("executionId"));
          }
          if (allRequestParams.containsKey("processDefinitionId")) {
              query.processDefinitionId(allRequestParams.get("processDefinitionId"));
          }
          if (allRequestParams.containsKey("elementId")) {
              query.elementId(allRequestParams.get("elementId"));
          }
          if (allRequestParams.containsKey("elementName")) {
              query.elementName(allRequestParams.get("elementName"));
          }
          if (allRequestParams.containsKey("timersOnly")) {
              if (allRequestParams.containsKey("messagesOnly")) {
                  throw new FlowableIllegalArgumentException("Only one of 'timersOnly' or 'messagesOnly' can be provided.");
              }
              if (Boolean.valueOf(allRequestParams.get("timersOnly"))) {
                  query.timers();
              }
          }
          if (allRequestParams.containsKey("messagesOnly")) {
              if (Boolean.valueOf(allRequestParams.get("messagesOnly"))) {
                  query.messages();
              }
          }
          if (allRequestParams.containsKey("dueBefore")) {
              query.duedateLowerThan(RequestUtil.getDate(allRequestParams, "dueBefore"));
          }
          if (allRequestParams.containsKey("dueAfter")) {
              query.duedateHigherThan(RequestUtil.getDate(allRequestParams, "dueAfter"));
          }
          if (allRequestParams.containsKey("withException")) {
              if (Boolean.valueOf(allRequestParams.get("withException"))) {
                  query.withException();
              }
          }
          if (allRequestParams.containsKey("exceptionMessage")) {
              query.exceptionMessage(allRequestParams.get("exceptionMessage"));
          }
          if (allRequestParams.containsKey("tenantId")) {
              query.jobTenantId(allRequestParams.get("tenantId"));
          }
          if (allRequestParams.containsKey("tenantIdLike")) {
              query.jobTenantIdLike(allRequestParams.get("tenantIdLike"));
          }
          if (allRequestParams.containsKey("withoutTenantId")) {
              if (Boolean.valueOf(allRequestParams.get("withoutTenantId"))) {
                  query.jobWithoutTenantId();
              }
          }
          if (allRequestParams.containsKey("locked")) {
              if (Boolean.valueOf(allRequestParams.get("locked"))) {
                  query.locked();
              }
          }
          if (allRequestParams.containsKey("unlocked")) {
              if (Boolean.valueOf(allRequestParams.get("unlocked"))) {
                  query.unlocked();
              }
          }
          
          if (restApiInterceptor != null) {
              restApiInterceptor.accessJobInfoWithQuery(query);
          }
  
          return paginateList(allRequestParams, query, "id", JobQueryProperties.PROPERTIES, restResponseFactory::createJobResponseList);
      }
focal_method.class_method_signature: JobCollectionResource.getJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)
focal_method.full_signature: @ApiOperation(value = "List jobs", tags = { "Jobs" }, nickname = "listJobs") @ApiImplicitParams({ @ApiImplicitParam(name = "id", dataType = "string", value = "Only return job with the given id", paramType = "query"), @ApiImplicitParam(name = "processInstanceId", dataType = "string", value = "Only return jobs part of a process with the given id", paramType = "query"), @ApiImplicitParam(name = "executionId", dataType = "string", value = "Only return jobs part of an execution with the given id", paramType = "query"), @ApiImplicitParam(name = "processDefinitionId", dataType = "string", value = "Only return jobs with the given process definition id", paramType = "query"), @ApiImplicitParam(name = "elementId", dataType = "string", value = "Only return jobs with the given element id", paramType = "query"), @ApiImplicitParam(name = "elementName", dataType = "string", value = "Only return jobs with the given element name", paramType = "query"), @ApiImplicitParam(name = "timersOnly", dataType = "boolean", value = "If true, only return jobs which are timers. If false, this parameter is ignored. Cannot be used together with 'messagesOnly'.", paramType = "query"), @ApiImplicitParam(name = "messagesOnly", dataType = "boolean", value = "If true, only return jobs which are messages. If false, this parameter is ignored. Cannot be used together with 'timersOnly'", paramType = "query"), @ApiImplicitParam(name = "withException", dataType = "boolean", value = "If true, only return jobs for which an exception occurred while executing it. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "dueBefore", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed before the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "dueAfter", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed after the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "exceptionMessage", dataType = "string", value = "Only return jobs with the given exception message", paramType = "query"), @ApiImplicitParam(name = "tenantId", dataType = "string", value = "Only return jobs with the given tenantId.", paramType = "query"), @ApiImplicitParam(name = "tenantIdLike", dataType = "string", value = "Only return jobs with a tenantId like the given value.", paramType = "query"), @ApiImplicitParam(name = "withoutTenantId", dataType = "boolean", value = "If true, only returns jobs without a tenantId set. If false, the withoutTenantId parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "locked", dataType = "boolean", value = "If true, only return jobs which are locked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "unlocked", dataType = "boolean", value = "If true, only return jobs which are unlocked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "sort", dataType = "string", value = "Property to sort on, to be used together with the order.", allowableValues = "id,dueDate,executionId,processInstanceId,retries,tenantId", paramType = "query") }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the requested jobs were returned."), @ApiResponse(code = 400, message = "Indicates an illegal value has been used in a url query parameter or the both 'messagesOnly' and 'timersOnly' are used as parameters. Status description contains additional details about the error.") }) @GetMapping(value = "/management/jobs", produces = "application/json") public DataResponse<JobResponse> getJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)
focal_method.identifier: getJobs
focal_method.invocations: createJobQuery containsKey jobId get containsKey processInstanceId get containsKey executionId get containsKey processDefinitionId get containsKey elementId get containsKey elementName get containsKey containsKey valueOf get timers containsKey valueOf get messages containsKey duedateLowerThan getDate containsKey duedateHigherThan getDate containsKey valueOf get withException containsKey exceptionMessage get containsKey jobTenantId get containsKey jobTenantIdLike get containsKey valueOf get jobWithoutTenantId containsKey valueOf get locked containsKey valueOf get unlocked accessJobInfoWithQuery paginateList
focal_method.modifiers: @ApiOperation(value = "List jobs", tags = { "Jobs" }, nickname = "listJobs") @ApiImplicitParams({ @ApiImplicitParam(name = "id", dataType = "string", value = "Only return job with the given id", paramType = "query"), @ApiImplicitParam(name = "processInstanceId", dataType = "string", value = "Only return jobs part of a process with the given id", paramType = "query"), @ApiImplicitParam(name = "executionId", dataType = "string", value = "Only return jobs part of an execution with the given id", paramType = "query"), @ApiImplicitParam(name = "processDefinitionId", dataType = "string", value = "Only return jobs with the given process definition id", paramType = "query"), @ApiImplicitParam(name = "elementId", dataType = "string", value = "Only return jobs with the given element id", paramType = "query"), @ApiImplicitParam(name = "elementName", dataType = "string", value = "Only return jobs with the given element name", paramType = "query"), @ApiImplicitParam(name = "timersOnly", dataType = "boolean", value = "If true, only return jobs which are timers. If false, this parameter is ignored. Cannot be used together with 'messagesOnly'.", paramType = "query"), @ApiImplicitParam(name = "messagesOnly", dataType = "boolean", value = "If true, only return jobs which are messages. If false, this parameter is ignored. Cannot be used together with 'timersOnly'", paramType = "query"), @ApiImplicitParam(name = "withException", dataType = "boolean", value = "If true, only return jobs for which an exception occurred while executing it. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "dueBefore", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed before the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "dueAfter", dataType = "string", format="date-time", value = "Only return jobs which are due to be executed after the given date. Jobs without duedate are never returned using this parameter.", paramType = "query"), @ApiImplicitParam(name = "exceptionMessage", dataType = "string", value = "Only return jobs with the given exception message", paramType = "query"), @ApiImplicitParam(name = "tenantId", dataType = "string", value = "Only return jobs with the given tenantId.", paramType = "query"), @ApiImplicitParam(name = "tenantIdLike", dataType = "string", value = "Only return jobs with a tenantId like the given value.", paramType = "query"), @ApiImplicitParam(name = "withoutTenantId", dataType = "boolean", value = "If true, only returns jobs without a tenantId set. If false, the withoutTenantId parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "locked", dataType = "boolean", value = "If true, only return jobs which are locked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "unlocked", dataType = "boolean", value = "If true, only return jobs which are unlocked. If false, this parameter is ignored.", paramType = "query"), @ApiImplicitParam(name = "sort", dataType = "string", value = "Property to sort on, to be used together with the order.", allowableValues = "id,dueDate,executionId,processInstanceId,retries,tenantId", paramType = "query") }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the requested jobs were returned."), @ApiResponse(code = 400, message = "Indicates an illegal value has been used in a url query parameter or the both 'messagesOnly' and 'timersOnly' are used as parameters. Status description contains additional details about the error.") }) @GetMapping(value = "/management/jobs", produces = "application/json") public
focal_method.parameters: (@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)
focal_method.return: DataResponse<JobResponse>
focal_method.signature: DataResponse<JobResponse> getJobs(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams, HttpServletRequest request)