Examples of CaseDefinitionEntity


Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

  @Test
  public void testCaseDefinitionKey() {
    // given: a caseDefinition

    // when
    CaseDefinitionEntity activity = (CaseDefinitionEntity) handler.handleElement(caseDefinition, context);

    // then
    assertEquals(caseDefinition.getId(), activity.getKey());
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

  @Test
  public void testDeploymentId() {
    // given: a caseDefinition

    // when
    CaseDefinitionEntity activity = (CaseDefinitionEntity) handler.handleElement(caseDefinition, context);

    // then
    String deploymentId = context.getDeployment().getId();
    assertEquals(deploymentId, activity.getDeploymentId());
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

  public static Set<CmmnSentryDeclaration> sentryDeclarations = new HashSet<CmmnSentryDeclaration>();

  public void transformRootElement(Definitions definitions, List<? extends CmmnCaseDefinition> caseDefinitions) {
    modelElementInstances.add(definitions);
    for (CmmnCaseDefinition caseDefinition : caseDefinitions) {
      CaseDefinitionEntity entity = (CaseDefinitionEntity) caseDefinition;
      entity.setKey(entity.getKey().concat("-modified"));
    }
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

            .findDeployedProcessDefinitionById(processDefinitionId);

        taskDefinitions = processDefinition.getTaskDefinitions();

      } else {
        CaseDefinitionEntity caseDefinition = Context
            .getProcessEngineConfiguration()
            .getDeploymentCache()
            .findDeployedCaseDefinitionById(caseDefinitionId);

        taskDefinitions = caseDefinition.getTaskDefinitions();
      }

      taskDefinition = taskDefinitions.get(taskDefinitionKey);
    }
    return taskDefinition;
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

    ensureNotNull("Invalid case definition id", "caseDefinitionId", caseDefinitionId);

    CommandContext commandContext = Context.getCommandContext();

    // try to load case definition from cache
    CaseDefinitionEntity caseDefinition = commandContext
      .getDbEntityManager()
      .getCachedEntity(CaseDefinitionEntity.class, caseDefinitionId);

    if (caseDefinition == null) {
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

  public CaseDefinitionEntity findDeployedLatestCaseDefinitionByKey(String caseDefinitionKey) {
    ensureNotNull("Invalid case definition key", "caseDefinitionKey", caseDefinitionKey);

    // load case definition by key from db
    CaseDefinitionEntity caseDefinition = Context
      .getCommandContext()
      .getCaseDefinitionManager()
      .findLatestCaseDefinitionByKey(caseDefinitionKey);

    ensureNotNull(CaseDefinitionNotFoundException.class, "no case definition deployed with key '" + caseDefinitionKey + "'", "caseDefinition", caseDefinition);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

    return caseDefinition;
  }

  public CaseDefinitionEntity findDeployedCaseDefinitionByKeyAndVersion(String caseDefinitionKey, Integer caseDefinitionVersion) {

    CaseDefinitionEntity caseDefinition = Context
      .getCommandContext()
      .getCaseDefinitionManager()
      .findCaseDefinitionByKeyAndVersion(caseDefinitionKey, caseDefinitionVersion);

    ensureNotNull(CaseDefinitionNotFoundException.class, "no case definition deployed with key = '" + caseDefinitionKey + "' and version = '" + caseDefinitionVersion + "'", "caseDefinition", caseDefinition);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

    return caseDefinition;
  }

  public CaseDefinitionEntity findDeployedCaseDefinitionByDeploymentAndKey(String deploymentId, String caseDefinitionKey) {
    CaseDefinitionEntity caseDefinition = Context
      .getCommandContext()
      .getCaseDefinitionManager()
      .findCaseDefinitionByDeploymentAndKey(deploymentId, caseDefinitionKey);

    ensureNotNull(CaseDefinitionNotFoundException.class, "no case definition deployed with key = '" + caseDefinitionKey + "' in deployment = '" + deploymentId + "'", "caseDefinition", caseDefinition);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

  }

  public CaseDefinitionEntity getCaseDefinitionById(String caseDefinitionId) {
    ensureNotNull("caseDefinitionId", caseDefinitionId);

    CaseDefinitionEntity caseDefinition = caseDefinitionCache.get(caseDefinitionId);

    if (caseDefinition == null) {
      caseDefinition = findDeployedCaseDefinitionById(caseDefinitionId);

    }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.entity.repository.CaseDefinitionEntity

  public CaseDefinitionEntity resolveCaseDefinition(CaseDefinitionEntity caseDefinition) {
    String caseDefinitionId = caseDefinition.getId();
    String deploymentId = caseDefinition.getDeploymentId();

    CaseDefinitionEntity cachedCaseDefinition = caseDefinitionCache.get(caseDefinitionId);

    if (cachedCaseDefinition==null) {
      DeploymentEntity deployment = Context
        .getCommandContext()
        .getDeploymentManager()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.