ProcessDefinitionQuery doesn't account for tenantId

Description

When doing a ProcessDefinitionQuery and specifying that i want the latest revision, this is managed per key of the processdefinition.
This doesn't work when two tenants deploy a process with the same key. In this case, only the processdefinition with the latest revision is returned. As such, for the tenant with the lower revision, his processdefinition is missing.
In the mapping file:
modules/activiti-engine/src/main/resources/org/activiti/db/mapping/entity/ProcessDefinition.xml
could the query selectProcessDefinitionsByQueryCriteriaSql be corrected by modifying the latest part as such:

modules/activiti-engine/src/main/resources/org/activiti/db/mapping/entity/ProcessDefinition.xml

With this, the latest revision would be per tenant, per key. So the processDefinition of the second tenant isn't missing.

Environment

None

Assignee

Joram Barrez

Reporter

Ph M

Labels

None

Components

Fix versions

Affects versions

Priority

Lowest
Configure