Java Code Examples for org.camunda.bpm.engine.repository.CaseDefinition#getVersion()

The following examples show how to use org.camunda.bpm.engine.repository.CaseDefinition#getVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HalCaseDefinition.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public static HalCaseDefinition fromCaseDefinition(CaseDefinition caseDefinition, ProcessEngine processEngine) {
  HalCaseDefinition halCaseDefinition = new HalCaseDefinition();

  halCaseDefinition.id = caseDefinition.getId();
  halCaseDefinition.key = caseDefinition.getKey();
  halCaseDefinition.category = caseDefinition.getCategory();
  halCaseDefinition.name = caseDefinition.getName();
  halCaseDefinition.version = caseDefinition.getVersion();
  halCaseDefinition.resource = caseDefinition.getResourceName();
  halCaseDefinition.deploymentId = caseDefinition.getDeploymentId();
  halCaseDefinition.contextPath = ApplicationContextPathUtil.getApplicationPathForDeployment(processEngine, caseDefinition.getDeploymentId());

  halCaseDefinition.linker.createLink(REL_SELF, caseDefinition.getId());
  halCaseDefinition.linker.createLink(REL_DEPLOYMENT, caseDefinition.getDeploymentId());
  halCaseDefinition.linker.createLink(REL_DEPLOYMENT_RESOURCE, caseDefinition.getDeploymentId(), caseDefinition.getResourceName());

  return halCaseDefinition;
}
 
Example 2
Source File: CaseDefinitionDto.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public static CaseDefinitionDto fromCaseDefinition(CaseDefinition definition) {
  CaseDefinitionDto dto = new CaseDefinitionDto();

  dto.id = definition.getId();
  dto.key = definition.getKey();
  dto.category = definition.getCategory();
  dto.name = definition.getName();
  dto.version = definition.getVersion();
  dto.resource = definition.getResourceName();
  dto.deploymentId = definition.getDeploymentId();
  dto.tenantId = definition.getTenantId();
  dto.historyTimeToLive = definition.getHistoryTimeToLive();

  return dto;
}