Search in sources :

Example 26 with Resource

use of org.camunda.bpm.engine.repository.Resource in project camunda-bpm-platform by camunda.

the class BpmnDeploymentTest method testDeploymentIdOfResource.

@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/deployment/BpmnDeploymentTest.testGetBpmnXmlFileThroughService.bpmn20.xml" })
public void testDeploymentIdOfResource() {
    String deploymentId = repositoryService.createDeploymentQuery().singleResult().getId();
    List<Resource> resources = repositoryService.getDeploymentResources(deploymentId);
    assertEquals(1, resources.size());
    Resource resource = resources.get(0);
    assertEquals(deploymentId, resource.getDeploymentId());
}
Also used : Resource(org.camunda.bpm.engine.repository.Resource) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 27 with Resource

use of org.camunda.bpm.engine.repository.Resource in project camunda-bpm-platform by camunda.

the class EmbeddedProcessApplicationTest method testDeployAppWithAdditionalResourceSuffixes.

public void testDeployAppWithAdditionalResourceSuffixes() {
    registerProcessEngine();
    TestApplicationWithAdditionalResourceSuffixes processApplication = new TestApplicationWithAdditionalResourceSuffixes();
    processApplication.deploy();
    Deployment deployment = repositoryService.createDeploymentQuery().singleResult();
    assertNotNull(deployment);
    List<Resource> deploymentResources = repositoryService.getDeploymentResources(deployment.getId());
    assertEquals(4, deploymentResources.size());
    processApplication.undeploy();
    assertEquals(0, repositoryService.createDeploymentQuery().count());
}
Also used : Resource(org.camunda.bpm.engine.repository.Resource) Deployment(org.camunda.bpm.engine.repository.Deployment) ProcessApplicationDeployment(org.camunda.bpm.engine.repository.ProcessApplicationDeployment)

Aggregations

Resource (org.camunda.bpm.engine.repository.Resource)27 Deployment (org.camunda.bpm.engine.repository.Deployment)19 ProcessApplicationDeployment (org.camunda.bpm.engine.repository.ProcessApplicationDeployment)14 BpmnModelInstance (org.camunda.bpm.model.bpmn.BpmnModelInstance)12 ProcessDefinitionQuery (org.camunda.bpm.engine.repository.ProcessDefinitionQuery)9 Test (org.junit.Test)9 InputStream (java.io.InputStream)6 ProcessApplicationRegistration (org.camunda.bpm.application.ProcessApplicationRegistration)3 EmbeddedProcessApplication (org.camunda.bpm.application.impl.EmbeddedProcessApplication)3 ArrayList (java.util.ArrayList)1 RepositoryService (org.camunda.bpm.engine.RepositoryService)1 ResourceEntity (org.camunda.bpm.engine.impl.persistence.entity.ResourceEntity)1 ProcessDefinition (org.camunda.bpm.engine.repository.ProcessDefinition)1 DeploymentResourceDto (org.camunda.bpm.engine.rest.dto.repository.DeploymentResourceDto)1 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)1 DeploymentResourcesResource (org.camunda.bpm.engine.rest.sub.repository.DeploymentResourcesResource)1 Deployment (org.camunda.bpm.engine.test.Deployment)1 AbstractFoxPlatformIntegrationTest (org.camunda.bpm.integrationtest.util.AbstractFoxPlatformIntegrationTest)1