Package org.activiti.engine.impl.cmd

Examples of org.activiti.engine.impl.cmd.ChangeDeploymentTenantIdCmd


    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
    Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
    taskService.complete(task.getId());
   
    // Set tenant on deployment
    managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
   
    ProcessInstance processInstance2 = runtimeService.startProcessInstanceByKeyAndTenantId("oneTaskProcess", "myTenant");

    String url = RestUrls.createRelativeResourceUrl(RestUrls.URL_HISTORIC_ACTIVITY_INSTANCES);
   
View Full Code Here


   
    // Without tenant ID, before setting tenant
    assertResultsPresentInDataResponse(url + "?withoutTenantId=true", processInstance.getId(), processInstance2.getId());
   
    // Set tenant on deployment
    managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
    startTime.add(Calendar.DAY_OF_YEAR, 1);
    processEngineConfiguration.getClock().setCurrentTime(startTime.getTime());
    ProcessInstance processInstance3 = runtimeService.startProcessInstanceByKeyAndTenantId("oneTaskProcess", "myTenant");
   
    // Without tenant ID, after setting tenant
View Full Code Here

    taskService.setVariableLocal(task.getId(), "local", "test");
    taskService.setOwner(task.getId(), "test");
    taskService.setDueDate(task.getId(), new GregorianCalendar(2013, 0, 1).getTime());
   
    // Set tenant on deployment
    managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
   
    ProcessInstance processInstance2 = runtimeService.startProcessInstanceByKeyAndTenantId("oneTaskProcess", processVariables, "myTenant");
    Task task2 = taskService.createTaskQuery().processInstanceId(processInstance2.getId()).singleResult();
   
    String url = RestUrls.createRelativeResourceUrl(RestUrls.URL_HISTORIC_TASK_INSTANCES);
View Full Code Here

    // Test without tenant id
    String url = RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_INSTANCE_COLLECTION) + "?withoutTenantId=true";
    assertResultsPresentInDataResponse(url, id);
   
    // Update the tenant for the deployment
    managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
   
    // Test tenant id
    url = RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_INSTANCE_COLLECTION) + "?tenantId=myTenant";
    assertResultsPresentInDataResponse(url, id);
   
View Full Code Here

    // Without tenant id, before tenant update
    url = RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB_COLLECTION) + "?withoutTenantId=true";
    assertResultsPresentInDataResponse(url, timerJob.getId(), asyncJob.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);
   
View Full Code Here

    assertEquals(timerJob.getRetries(), responseNode.get("retries").intValue());
    assertEquals(timerJob.getDuedate(), getDateFromISOString(responseNode.get("dueDate").textValue()));
    assertEquals(responseNode.get("tenantId").textValue(), "");
   
    // Set tenant on deployment
    managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
   
    response = executeRequest(new HttpGet(SERVER_URL_PREFIX +
        RestUrls.createRelativeResourceUrl(RestUrls.URL_JOB, timerJob.getId())), HttpStatus.SC_OK);
    responseNode = objectMapper.readTree(response.getEntity().getContent());
    closeResponse(response);
View Full Code Here

            RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_INSTANCE, task.getProcessInstanceId())));
    assertTrue(responseNode.get("processDefinitionUrl").asText().endsWith(
            RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_DEFINITION, task.getProcessDefinitionId())));
   
    // Set tenant on deployment
    managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
   
    response = executeRequest(new HttpGet(SERVER_URL_PREFIX +
        RestUrls.createRelativeResourceUrl(RestUrls.URL_TASK, task.getId())), HttpStatus.SC_OK);
   
    responseNode = objectMapper.readTree(response.getEntity().getContent());
View Full Code Here

            RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_INSTANCE, processInstance.getId())));
    assertTrue(responseNode.get("processDefinitionUrl").asText().endsWith(
            RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_DEFINITION, processInstance.getProcessDefinitionId())));
   
    // Check result after tenant has been changed
    managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
    response = executeRequest(new HttpGet(SERVER_URL_PREFIX +
        RestUrls.createRelativeResourceUrl(RestUrls.URL_PROCESS_INSTANCE, processInstance.getId())), HttpStatus.SC_OK);
   
    // Check resulting instance tenant id
    responseNode = objectMapper.readTree(response.getEntity().getContent());
View Full Code Here

    return commandExecutor.execute(new GetDeploymentResourceCmd(deploymentId, resourceName));
  }
 
  @Override
  public void changeDeploymentTenantId(String deploymentId, String newTenantId) {
    commandExecutor.execute(new ChangeDeploymentTenantIdCmd(deploymentId, newTenantId));
  }
View Full Code Here

      // Without tenantId filtering before tenant set
      url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TASK_COLLECTION) + "?withoutTenantId=true";
      assertResultsPresentInDataResponse(url, adhocTask.getId(), processTask.getId());

      // Set tenant on deployment
      managementService.executeCommand(new ChangeDeploymentTenantIdCmd(deploymentId, "myTenant"));
     
      // Without tenantId filtering after tenant set, only adhoc task should remain
      url = RestUrls.createRelativeResourceUrl(RestUrls.URL_TASK_COLLECTION) + "?withoutTenantId=true";
      assertResultsPresentInDataResponse(url, adhocTask.getId());
     
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.cmd.ChangeDeploymentTenantIdCmd

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.