@Test public void testNotStartableInTasklist() { List<ProcessDefinition> processDefinitions = Arrays.asList( MockProvider.mockDefinition().isStartableInTasklist(false).build()); mockedQuery = setUpMockDefinitionQuery(processDefinitions); given() .queryParam("notStartableInTasklist", true) .then().expect() .statusCode(Status.OK.getStatusCode()) .when() .get(PROCESS_DEFINITION_QUERY_URL); verify(mockedQuery).notStartableInTasklist(); verify(mockedQuery).list(); }
.notStartableInTasklist() .count(); assertEquals(0, processes); ProcessDefinition notStartable = repositoryService.createProcessDefinitionQuery() .deploymentId(dplmntId2) .notStartableInTasklist() .singleResult();
public void testQueryByStartableInTasklistNestedProcess() { // given // startable super process // non-startable subprocess BpmnModelInstance[] nestedProcess = setupNestedProcess(false); String dplmntId = deployment(nestedProcess); // when ProcessDefinition actualStartable = repositoryService.createProcessDefinitionQuery() .deploymentId(dplmntId) .startableInTasklist() .singleResult(); ProcessDefinition actualNotStartable = repositoryService.createProcessDefinitionQuery() .deploymentId(dplmntId) .notStartableInTasklist() .singleResult(); // then assertEquals("calling", actualStartable.getKey()); assertEquals("called", actualNotStartable.getKey()); // cleanup repositoryService.deleteDeployment(dplmntId); }
.notStartableInTasklist() .count(); assertEquals(0, processes); ProcessDefinition notStartable = repositoryService.createProcessDefinitionQuery() .deploymentId(dplmntId2) .notStartableInTasklist() .singleResult();
public void testQueryByStartableInTasklistNestedProcess() { // given // startable super process // non-startable subprocess BpmnModelInstance[] nestedProcess = setupNestedProcess(false); String dplmntId = deployment(nestedProcess); // when ProcessDefinition actualStartable = repositoryService.createProcessDefinitionQuery() .deploymentId(dplmntId) .startableInTasklist() .singleResult(); ProcessDefinition actualNotStartable = repositoryService.createProcessDefinitionQuery() .deploymentId(dplmntId) .notStartableInTasklist() .singleResult(); // then assertEquals("calling", actualStartable.getKey()); assertEquals("called", actualNotStartable.getKey()); // cleanup repositoryService.deleteDeployment(dplmntId); }