@Override public List<DecisionRequirementsDefinition> getDeployedDecisionRequirementsDefinitions() { return deployment.getDeployedDecisionRequirementsDefinitions(); } }
private List<CaseDefinition> executePaginatedQuery(CaseDefinitionQuery query, Integer firstResult, Integer maxResults) { if (firstResult == null) { firstResult = 0; } if (maxResults == null) { maxResults = Integer.MAX_VALUE; } return query.listPage(firstResult, maxResults); }
protected void assertProcessDeployed(String processKey, String expectedDeploymentName) { ProcessDefinition processDefinition = repositoryService .createProcessDefinitionQuery() .latestVersion() .processDefinitionKey(processKey) .singleResult(); DeploymentQuery deploymentQuery = repositoryService .createDeploymentQuery() .deploymentId(processDefinition.getDeploymentId()); Assert.assertEquals(expectedDeploymentName, deploymentQuery.singleResult().getName()); }
public void testParseSwitchedSourceAndTargetRefsForAssociations() { repositoryService.createDeployment() .addClasspathResource("org/camunda/bpm/engine/test/bpmn/parse/BpmnParseTest.testParseSwitchedSourceAndTargetRefsForAssociations.bpmn20.xml").deploy(); assertEquals(1, repositoryService.createProcessDefinitionQuery().count()); repositoryService.deleteDeployment(repositoryService.createDeploymentQuery().singleResult().getId(), true); }
private void removeHistoryTimeToLive() { List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().processDefinitionKey(ONE_TASK_PROCESS).list(); assertEquals(1, processDefinitions.size()); repositoryService.updateProcessDefinitionHistoryTimeToLive(processDefinitions.get(0).getId(), null); final List<DecisionDefinition> decisionDefinitions = repositoryService.createDecisionDefinitionQuery().decisionDefinitionKey(DECISION).list(); assertEquals(1, decisionDefinitions.size()); repositoryService.updateDecisionDefinitionHistoryTimeToLive(decisionDefinitions.get(0).getId(), null); final List<CaseDefinition> caseDefinitions = repositoryService.createCaseDefinitionQuery().caseDefinitionKey(ONE_TASK_CASE).list(); assertEquals(1, caseDefinitions.size()); repositoryService.updateCaseDefinitionHistoryTimeToLive(caseDefinitions.get(0).getId(), null); }
public void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate) { updateProcessDefinitionSuspensionState() .byProcessDefinitionKey(processDefinitionKey) .includeProcessInstances(suspendProcessInstances) .executionDate(suspensionDate) .suspend(); }
public void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate) { updateProcessDefinitionSuspensionState() .byProcessDefinitionKey(processDefinitionKey) .includeProcessInstances(activateProcessInstances) .executionDate(activationDate) .activate(); }
private List<Deployment> executePaginatedQuery(DeploymentQuery query, Integer firstResult, Integer maxResults) { if (firstResult == null) { firstResult = 0; } if (maxResults == null) { maxResults = Integer.MAX_VALUE; } return query.listPage(firstResult, maxResults); }
private List<ProcessDefinition> executePaginatedQuery(ProcessDefinitionQuery query, Integer firstResult, Integer maxResults) { if (firstResult == null) { firstResult = 0; } if (maxResults == null) { maxResults = Integer.MAX_VALUE; } return query.listPage(firstResult, maxResults); }
protected void assertProcessDeployed(String processKey, String expectedDeploymentName) { ProcessDefinition processDefinition = repositoryService .createProcessDefinitionQuery() .latestVersion() .processDefinitionKey(processKey) .singleResult(); DeploymentQuery deploymentQuery = repositoryService .createDeploymentQuery() .deploymentId(processDefinition.getDeploymentId()); Assert.assertEquals(expectedDeploymentName, deploymentQuery.singleResult().getName()); }
public void testParseWithMultipleDocumentation() { repositoryService.createDeployment() .addClasspathResource("org/camunda/bpm/engine/test/bpmn/parse/BpmnParseTest.testParseWithMultipleDocumentation.bpmn20.xml").deploy(); assertEquals(1, repositoryService.createProcessDefinitionQuery().count()); repositoryService.deleteDeployment(repositoryService.createDeploymentQuery().singleResult().getId(), true); }
public void suspendProcessDefinitionByKey(String processDefinitionKey, boolean suspendProcessInstances, Date suspensionDate) { updateProcessDefinitionSuspensionState() .byProcessDefinitionKey(processDefinitionKey) .includeProcessInstances(suspendProcessInstances) .executionDate(suspensionDate) .suspend(); }
public void activateProcessDefinitionByKey(String processDefinitionKey, boolean activateProcessInstances, Date activationDate) { updateProcessDefinitionSuspensionState() .byProcessDefinitionKey(processDefinitionKey) .includeProcessInstances(activateProcessInstances) .executionDate(activationDate) .activate(); }
private List<CaseDefinition> executePaginatedQuery(CaseDefinitionQuery query, Integer firstResult, Integer maxResults) { if (firstResult == null) { firstResult = 0; } if (maxResults == null) { maxResults = Integer.MAX_VALUE; } return query.listPage(firstResult, maxResults); }
protected void assertProcessDeployed(String processKey, String expectedDeploymentName) { ProcessDefinition processDefinition = repositoryService .createProcessDefinitionQuery() .latestVersion() .processDefinitionKey(processKey) .singleResult(); DeploymentQuery deploymentQuery = repositoryService .createDeploymentQuery() .deploymentId(processDefinition.getDeploymentId()); Assert.assertEquals(expectedDeploymentName, deploymentQuery.singleResult().getName()); }
public void testParseCollaborationPlane() { repositoryService.createDeployment().addClasspathResource("org/camunda/bpm/engine/test/bpmn/parse/BpmnParseTest.testParseCollaborationPlane.bpmn").deploy(); assertEquals(1, repositoryService.createProcessDefinitionQuery().count()); repositoryService.deleteDeployment(repositoryService.createDeploymentQuery().singleResult().getId(), true); }
protected void assertProcessDeployed(String processKey, String expectedDeploymentName) { ProcessDefinition processDefinition = repositoryService .createProcessDefinitionQuery() .latestVersion() .processDefinitionKey(processKey) .singleResult(); DeploymentQuery deploymentQuery = repositoryService .createDeploymentQuery() .deploymentId(processDefinition.getDeploymentId()); Assert.assertEquals(expectedDeploymentName, deploymentQuery.singleResult().getName()); }
public void testParseWithBpmnNamespacePrefix() { repositoryService.createDeployment() .addClasspathResource("org/camunda/bpm/engine/test/bpmn/parse/BpmnParseTest.testParseWithBpmnNamespacePrefix.bpmn20.xml").deploy(); assertEquals(1, repositoryService.createProcessDefinitionQuery().count()); repositoryService.deleteDeployment(repositoryService.createDeploymentQuery().singleResult().getId(), true); }