Java Code Examples for org.flowable.engine.repository.ProcessDefinition#getVersion()
The following examples show how to use
org.flowable.engine.repository.ProcessDefinition#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: TaskRepresentation.java From flowable-engine with Apache License 2.0 | 5 votes |
public TaskRepresentation(TaskInfo taskInfo, ProcessDefinition processDefinition) { initializeTaskDetails(taskInfo); if (processDefinition != null) { this.processDefinitionName = processDefinition.getName(); this.processDefinitionDescription = processDefinition.getDescription(); this.processDefinitionKey = processDefinition.getKey(); this.processDefinitionCategory = processDefinition.getCategory(); this.processDefinitionVersion = processDefinition.getVersion(); this.processDefinitionDeploymentId = processDefinition.getDeploymentId(); } }
Example 2
Source File: ProcessDefinitionRepresentation.java From flowable-engine with Apache License 2.0 | 5 votes |
public ProcessDefinitionRepresentation(ProcessDefinition processDefinition) { this.id = processDefinition.getId(); this.name = processDefinition.getName(); this.description = processDefinition.getDescription(); this.key = processDefinition.getKey(); this.category = processDefinition.getCategory(); this.version = processDefinition.getVersion(); this.deploymentId = processDefinition.getDeploymentId(); this.tenantId = processDefinition.getTenantId(); this.hasStartForm = processDefinition.hasStartFormKey(); }
Example 3
Source File: ProcessInstanceRepresentation.java From flowable-engine with Apache License 2.0 | 5 votes |
protected void mapProcessDefinition(ProcessDefinition processDefinition) { if (processDefinition != null) { this.processDefinitionName = processDefinition.getName(); this.processDefinitionDescription = processDefinition.getDescription(); this.processDefinitionKey = processDefinition.getKey(); this.processDefinitionCategory = processDefinition.getCategory(); this.processDefinitionVersion = processDefinition.getVersion(); this.processDefinitionDeploymentId = processDefinition.getDeploymentId(); } }
Example 4
Source File: DeploymentEntityManagerImpl.java From flowable-engine with Apache License 2.0 | 5 votes |
protected ProcessDefinition findNewLatestProcessDefinitionAfterRemovalOf(ProcessDefinition processDefinitionToBeRemoved) { // The latest process definition is not necessarily the one with 'version -1' (some versions could have been deleted) // Hence, the following logic ProcessDefinitionQueryImpl query = new ProcessDefinitionQueryImpl(); query.processDefinitionKey(processDefinitionToBeRemoved.getKey()); if (processDefinitionToBeRemoved.getTenantId() != null && !ProcessEngineConfiguration.NO_TENANT_ID.equals(processDefinitionToBeRemoved.getTenantId())) { query.processDefinitionTenantId(processDefinitionToBeRemoved.getTenantId()); } else { query.processDefinitionWithoutTenantId(); } if (processDefinitionToBeRemoved.getVersion() > 0) { query.processDefinitionVersionLowerThan(processDefinitionToBeRemoved.getVersion()); } query.orderByProcessDefinitionVersion().desc(); query.setFirstResult(0); query.setMaxResults(1); List<ProcessDefinition> processDefinitions = getProcessDefinitionEntityManager().findProcessDefinitionsByQueryCriteria(query); if (processDefinitions != null && processDefinitions.size() > 0) { return processDefinitions.get(0); } return null; }