Tabnine Logo
DeploymentQuery.deploymentId
Code IndexAdd Tabnine to your IDE (free)

How to use
deploymentId
method
in
org.camunda.bpm.engine.repository.DeploymentQuery

Best Java code snippets using org.camunda.bpm.engine.repository.DeploymentQuery.deploymentId (Showing top 20 results out of 315)

origin: camunda/camunda-bpm-platform

private void createDeploymentMock() {
 Deployment mockDeployment = MockProvider.createMockDeployment();
 DeploymentQuery deploymentQueryMock = mock(DeploymentQuery.class);
 when(deploymentQueryMock.deploymentId(anyString())).thenReturn(deploymentQueryMock);
 when(deploymentQueryMock.singleResult()).thenReturn(mockDeployment);
 when(mockRepoService.createDeploymentQuery()).thenReturn(deploymentQueryMock);
}
origin: camunda/camunda-bpm-platform

public DeploymentDto getDeployment() {
 RepositoryService repositoryService = getProcessEngine().getRepositoryService();
 Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
 if (deployment == null) {
  throw new InvalidRequestException(Status.NOT_FOUND, "Deployment with id '" + deploymentId + "' does not exist");
 }
 return DeploymentDto.fromDeployment(deployment);
}
origin: camunda/camunda-bpm-platform

public DeploymentDto getDeployment() {
 RepositoryService repositoryService = getProcessEngine().getRepositoryService();
 Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
 if (deployment == null) {
  throw new InvalidRequestException(Status.NOT_FOUND, "Deployment with id '" + deploymentId + "' does not exist");
 }
 return DeploymentDto.fromDeployment(deployment);
}
origin: camunda/camunda-bpm-platform

@Test
public void testAdditionalParameters() {
 Map<String, String> queryParameters = getCompleteQueryParameters();
 given().queryParams(queryParameters)
  .expect().statusCode(Status.OK.getStatusCode())
  .when().get(DEPLOYMENT_QUERY_URL);
 // assert query invocation
 verify(mockedQuery).deploymentName(queryParameters.get("name"));
 verify(mockedQuery).deploymentNameLike(queryParameters.get("nameLike"));
 verify(mockedQuery).deploymentId(queryParameters.get("id"));
 verify(mockedQuery).deploymentSource(queryParameters.get("source"));
 verify(mockedQuery).list();
}
origin: camunda/camunda-bpm-platform

@Test
public void testDeleteNonExistingDeployment() {
 when(mockDeploymentQuery.deploymentId(NON_EXISTING_DEPLOYMENT_ID)).thenReturn(mockDeploymentQuery);
 when(mockDeploymentQuery.singleResult()).thenReturn(null);
 given()
  .pathParam("id", NON_EXISTING_DEPLOYMENT_ID)
 .expect()
  .statusCode(Status.NOT_FOUND.getStatusCode())
  .body(containsString("Deployment with id '" + NON_EXISTING_DEPLOYMENT_ID + "' do not exist"))
 .when()
   .delete(DEPLOYMENT_URL);
}
origin: camunda/camunda-bpm-platform

@Test
public void testGetNonExistingSingleDeployment() {
 when(mockDeploymentQuery.deploymentId(NON_EXISTING_DEPLOYMENT_ID)).thenReturn(mockDeploymentQuery);
 when(mockDeploymentQuery.singleResult()).thenReturn(null);
 given().pathParam("id", NON_EXISTING_DEPLOYMENT_ID)
  .then().expect().statusCode(Status.NOT_FOUND.getStatusCode())
   .body(containsString("Deployment with id '" + NON_EXISTING_DEPLOYMENT_ID + "' does not exist"))
  .when().get(DEPLOYMENT_URL);
}
origin: camunda/camunda-bpm-platform

public void testQueryByInvalidDeploymentId() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId("invalid");
 assertNull(query.singleResult());
 assertEquals(0, query.list().size());
 assertEquals(0, query.count());
 try {
  repositoryService.createDeploymentQuery().deploymentId(null);
  fail();
 } catch (ProcessEngineException e) {}
}
origin: camunda/camunda-bpm-platform

@Override
public void deleteDeployment(String deploymentId, UriInfo uriInfo) {
 RepositoryService repositoryService = getProcessEngine().getRepositoryService();
 Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
 if (deployment == null) {
  throw new InvalidRequestException(Status.NOT_FOUND, "Deployment with id '" + deploymentId + "' do not exist");
 }
 boolean cascade = isQueryPropertyEnabled(uriInfo, CASCADE);
 boolean skipCustomListeners = isQueryPropertyEnabled(uriInfo, "skipCustomListeners");
 boolean skipIoMappings = isQueryPropertyEnabled(uriInfo, "skipIoMappings");
 repositoryService.deleteDeployment(deploymentId, cascade, skipCustomListeners, skipIoMappings);
}
origin: camunda/camunda-bpm-platform

@Override
public void deleteDeployment(String deploymentId, UriInfo uriInfo) {
 RepositoryService repositoryService = getProcessEngine().getRepositoryService();
 Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
 if (deployment == null) {
  throw new InvalidRequestException(Status.NOT_FOUND, "Deployment with id '" + deploymentId + "' do not exist");
 }
 boolean cascade = isQueryPropertyEnabled(uriInfo, CASCADE);
 boolean skipCustomListeners = isQueryPropertyEnabled(uriInfo, "skipCustomListeners");
 boolean skipIoMappings = isQueryPropertyEnabled(uriInfo, "skipIoMappings");
 repositoryService.deleteDeployment(deploymentId, cascade, skipCustomListeners, skipIoMappings);
}
origin: camunda/camunda-bpm-platform

public void testQueryByDeploymentId() {
 DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId(deploymentOneId);
 assertNotNull(query.singleResult());
 assertEquals(1, query.list().size());
 assertEquals(1, query.count());
}
origin: camunda/camunda-bpm-platform

@Test
@Deployment(resources = SINGLE_CONDITIONAL_START_EVENT_XML)
public void testStartInstanceAfterDeleteLatestProcessVersion() {
 // given a deployed process
 // deploy second version of the process
 String deploymentId = testRule.deploy(SINGLE_CONDITIONAL_XML).getId();
 org.camunda.bpm.engine.repository.Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
 // delete it
 repositoryService.deleteDeployment(deployment.getId(), true);
 // when
 List<ProcessInstance> conditionInstances = runtimeService
   .createConditionEvaluation()
   .setVariable("foo", 1)
   .evaluateStartConditions();
 // then
 assertEquals(1, conditionInstances.size());
 assertNotNull(conditionInstances.get(0));
}
origin: camunda/camunda-bpm-platform

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());
 
}

origin: camunda/camunda-bpm-platform

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());
 
}

origin: camunda/camunda-bpm-platform

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());
 
}
origin: camunda/camunda-bpm-platform

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());
 
}

origin: camunda/camunda-bpm-platform

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());
 
}
origin: camunda/camunda-bpm-platform

@Test
public void testDeployProcessArchive() {
 assertNotNull(processEngine);
 RepositoryService repositoryService = processEngine.getRepositoryService();
 ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery()
  .processDefinitionKey("invoice-it");
 assertEquals(1, processDefinitionQuery.count());
 ProcessDefinition processDefinition = processDefinitionQuery.singleResult();
 String deploymentId = repositoryService.createDeploymentQuery()
  .deploymentId(processDefinition.getDeploymentId())
  .singleResult()
  .getId();
 List<Resource> deploymentResources = repositoryService.getDeploymentResources(deploymentId);
 assertEquals(3, deploymentResources.size());
}
origin: camunda/camunda-bpm-platform

@Deployment(resources = {"org/camunda/bpm/engine/test/bpmn/event/message/MessageStartEventTest.testDeployStartAndIntermediateEventWithSameMessageDifferentProcesses2.bpmn"})
public void testDeployStartAndIntermediateEventWithSameMessageDifferentProcessesFirstIntermediateEvent() {
 ProcessInstance pi = null;
 try {
  runtimeService.startProcessInstanceByKey("Process_2");
  pi = runtimeService.createProcessInstanceQuery().singleResult();
  assertThat(pi.isEnded(), is(false));
  String deploymentId = repositoryService
    .createDeployment()
    .addClasspathResource(
      "org/camunda/bpm/engine/test/bpmn/event/message/MessageStartEventTest.testDeployStartAndIntermediateEventWithSameMessageDifferentProcesses.bpmn")
    .name("deployment2").deploy().getId();
  assertThat(repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult(), is(notNullValue()));
 } finally {
  // clean db:
  runtimeService.deleteProcessInstance(pi.getId(), "failure");
  List<org.camunda.bpm.engine.repository.Deployment> deployments = repositoryService.createDeploymentQuery().list();
  for (org.camunda.bpm.engine.repository.Deployment d : deployments) {
   repositoryService.deleteDeployment(d.getId(), true);
  }
  // Workaround for #CAM-4250: remove process definition of failed
  // deployment from deployment cache
  processEngineConfiguration.getDeploymentCache().getProcessDefinitionCache().clear();
 }
}
origin: camunda/camunda-bpm-platform

@Test
public void testVersionWithoutConditionAfterDeleteLatestProcessVersionWithCondition() {
 // given a process
 testRule.deploy(MODEL_WITHOUT_MESSAGE);
 // deploy second version of the process
 String deploymentId = testRule.deploy(SINGLE_MESSAGE_START_EVENT_XML).getId();
 org.camunda.bpm.engine.repository.Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
 // delete it
 repositoryService.deleteDeployment(deployment.getId(), true);
 thrown.expect(ProcessEngineException.class);
 thrown.expectMessage("No subscriptions were found during evaluation of the conditional start events.");
 // when
 runtimeService
  .createConditionEvaluation()
  .setVariable("foo", 1)
  .evaluateStartConditions();
}
origin: camunda/camunda-bpm-platform

@Test
public void testVersionWithoutConditionAfterDeleteLatestProcessVersionWithCondition() {
 // given a process
 testRule.deploy(MODEL_WITHOUT_CONDITION);
 // deploy second version of the process
 String deploymentId = testRule.deploy(SINGLE_CONDITIONAL_XML).getId();
 org.camunda.bpm.engine.repository.Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
 // delete it
 repositoryService.deleteDeployment(deployment.getId(), true);
 thrown.expect(ProcessEngineException.class);
 thrown.expectMessage("No subscriptions were found during evaluation of the conditional start events.");
 // when
 runtimeService
  .createConditionEvaluation()
  .setVariable("foo", 1)
  .evaluateStartConditions();
}
org.camunda.bpm.engine.repositoryDeploymentQuerydeploymentId

Javadoc

Only select deployments with the given deployment id.

Popular methods of DeploymentQuery

  • list
  • singleResult
  • count
  • deploymentName
    Only select deployments with the given name.
  • deploymentAfter
    Only select deployments deployed after the given date
  • deploymentBefore
    Only select deployments deployed before the given date
  • deploymentNameLike
    Only select deployments with a name like the given string.
  • deploymentSource
    If the given source is null, then deployments are returned where source is equal to null. Otherwise
  • includeDeploymentsWithoutTenantId
    Select deployments which have no tenant id. Can be used in combination with #tenantIdIn(String...).
  • orderByDeploymentId
    Order by deployment id (needs to be followed by #asc() or #desc()).
  • orderByDeploymentName
    Order by deployment name (needs to be followed by #asc() or #desc()).
  • orderByDeploymentTime
    Order by deployment time (needs to be followed by #asc() or #desc()).
  • orderByDeploymentName,
  • orderByDeploymentTime,
  • orderByTenantId,
  • tenantIdIn,
  • withoutTenantId,
  • listPage,
  • asc,
  • desc,
  • orderByDeploymenTime

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ImageIO (javax.imageio)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now