Package org.flowable.engine.repository

# Interface ProcessDefinitionQuery

All Superinterfaces:
  `Query<ProcessDefinitionQuery,ProcessDefinition>`

public interface ProcessDefinitionQuery extends Query<ProcessDefinitionQuery,ProcessDefinition>
Allows programmatic querying of `ProcessDefinition`s.

Author:
  Tom Baeyens, Joram Barrez, Daniel Meyer, Saeid Mirzaei

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query

  `Query.NullHandlingOnOrder`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ProcessDefinitionQuery`
  `active()`
  Only selects process definitions which are active
  `ProcessDefinitionQuery`
  `deploymentId(String deploymentId)`
  Only select process definitions that are deployed in a deployment with the given deployment id
  `ProcessDefinitionQuery`
  `deploymentIds(Set<String> deploymentIds)`
  Select process definitions that are deployed in deployments with the given set of ids
  `ProcessDefinitionQuery`
  `latestVersion()`
  Only select the process definitions which are the latest deployed (ie. which have the highest version number for the given key).
  `ProcessDefinitionQuery`
  `locale(String locale)`
  Localize process definition name and description to specified locale.
  `ProcessDefinitionQuery`
  `messageEventSubscriptionName(String messageName)`
  Selects the single process definition which has a start message event with the messageName.
  `ProcessDefinitionQuery`
  `orderByDeploymentId()`
  Order by deployment id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessDefinitionQuery`
  `orderByProcessDefinitionCategory()`
  Order by the category of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessDefinitionQuery`
  `orderByProcessDefinitionId()`
  Order by the id of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessDefinitionQuery`
  `orderByProcessDefinitionKey()`
  Order by process definition key (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessDefinitionQuery`
  `orderByProcessDefinitionName()`
  Order by the name of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessDefinitionQuery`
  `orderByProcessDefinitionVersion()`
  Order by the version of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessDefinitionQuery`
  `orderByTenantId()`
  Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).
  `ProcessDefinitionQuery`
  `parentDeploymentId(String deploymentId)`
  Only select process definitions that are deployed in a deployment with the given parent deployment id
  `ProcessDefinitionQuery`
  `processDefinitionCategory(String processDefinitionCategory)`
  Only select process definitions with the given category.
  `ProcessDefinitionQuery`
  `processDefinitionCategoryLike(String processDefinitionCategoryLike)`
  Only select process definitions where the category matches the given parameter.
  `ProcessDefinitionQuery`
  `processDefinitionCategoryNotEquals(String categoryNotEquals)`
  Only select deployments that have a different category then the given one.
  `ProcessDefinitionQuery`
  `processDefinitionEngineVersion(String engineVersion)`
  Only select process definitions that have the given engine version.
  `ProcessDefinitionQuery`
  `processDefinitionId(String processDefinitionId)`
  Only select process definition with the given id.
  `ProcessDefinitionQuery`
  `processDefinitionIds(Set<String> processDefinitionIds)`
  Only select process definitions with the given ids.
  `ProcessDefinitionQuery`
  `processDefinitionKey(String processDefinitionKey)`
  Only select process definition with the given key.
  `ProcessDefinitionQuery`
  `processDefinitionKeyLike(String processDefinitionKeyLike)`
  Only select process definitions where the key matches the given parameter.
  `ProcessDefinitionQuery`
  `processDefinitionName(String processDefinitionName)`
  Only select process definitions with the given name.
  `ProcessDefinitionQuery`
  `processDefinitionNameLike(String processDefinitionNameLike)`
  Only select process definitions where the name matches the given parameter.
  `ProcessDefinitionQuery`
  `processDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase)`
  Only select process definitions where the name matches the given parameter, ignoring upper/lower case.
  `ProcessDefinitionQuery`
  `processDefinitionResourceName(String resourceName)`
  Only select process definition with the given resource name.
  `ProcessDefinitionQuery`
  `processDefinitionResourceNameLike(String resourceNameLike)`
  Only select process definition with a resource name like the given .
  `ProcessDefinitionQuery`
  `processDefinitionTenantId(String tenantId)`
  Only select process definitions that have the given tenant id.
  `ProcessDefinitionQuery`
  `processDefinitionTenantIdLike(String tenantIdLike)`
  Only select process definitions with a tenant id like the given one.
  `ProcessDefinitionQuery`
  `processDefinitionVersion(Integer processDefinitionVersion)`
  Only select process definition with a certain version.
  `ProcessDefinitionQuery`
  `processDefinitionVersionGreaterThan(Integer processDefinitionVersion)`
  Only select process definitions which version are greater than a certain version.
  `ProcessDefinitionQuery`
  `processDefinitionVersionGreaterThanOrEquals(Integer processDefinitionVersion)`
  Only select process definitions which version are greater than or equals a certain version.
  `ProcessDefinitionQuery`
  `processDefinitionVersionLowerThan(Integer processDefinitionVersion)`
  Only select process definitions which version are lower than a certain version.
  `ProcessDefinitionQuery`
  `processDefinitionVersionLowerThanOrEquals(Integer processDefinitionVersion)`
  Only select process definitions which version are lower than or equals a certain version.
  `ProcessDefinitionQuery`
  `processDefinitionWithoutTenantId()`
  Only select process definitions that do not have a tenant id.
  `ProcessDefinitionQuery`
  `startableByUser(String userId)`
  Only selects process definitions which given userId is authorized to start
  `ProcessDefinitionQuery`
  `startableByUserOrGroups(String userId, Collection<String> groups)`
  Only selects process definition which the given userId or groups are authorized to start.
  `ProcessDefinitionQuery`
  `suspended()`
  Only selects process definitions which are suspended
  `ProcessDefinitionQuery`
  `withLocalizationFallback()`
  Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.

  ### Methods inherited from interface org.flowable.common.engine.api.query.Query

  `asc, count, desc, list, listPage, orderBy, orderBy, singleResult`

- ## Method Details

  - ### processDefinitionId

    ProcessDefinitionQuery processDefinitionId(String processDefinitionId)
    Only select process definition with the given id.

  - ### processDefinitionIds

    ProcessDefinitionQuery processDefinitionIds(Set<String> processDefinitionIds)
    Only select process definitions with the given ids.

  - ### processDefinitionCategory

    ProcessDefinitionQuery processDefinitionCategory(String processDefinitionCategory)
    Only select process definitions with the given category.

  - ### processDefinitionCategoryLike

    ProcessDefinitionQuery processDefinitionCategoryLike(String processDefinitionCategoryLike)
    Only select process definitions where the category matches the given parameter. The syntax that should be used is the same as in SQL, eg. %test%

  - ### processDefinitionCategoryNotEquals

    ProcessDefinitionQuery processDefinitionCategoryNotEquals(String categoryNotEquals)
    Only select deployments that have a different category then the given one.
    See Also:
      - `DeploymentBuilder.category(String)`

  - ### processDefinitionName

    ProcessDefinitionQuery processDefinitionName(String processDefinitionName)
    Only select process definitions with the given name.

  - ### processDefinitionNameLike

    ProcessDefinitionQuery processDefinitionNameLike(String processDefinitionNameLike)
    Only select process definitions where the name matches the given parameter. The syntax that should be used is the same as in SQL, eg. %test%

  - ### processDefinitionNameLikeIgnoreCase

    ProcessDefinitionQuery processDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase)
    Only select process definitions where the name matches the given parameter, ignoring upper/lower case. The syntax that should be used is the same as in SQL, eg. %test%

  - ### deploymentId

    ProcessDefinitionQuery deploymentId(String deploymentId)
    Only select process definitions that are deployed in a deployment with the given deployment id

  - ### deploymentIds

    ProcessDefinitionQuery deploymentIds(Set<String> deploymentIds)
    Select process definitions that are deployed in deployments with the given set of ids

  - ### parentDeploymentId

    ProcessDefinitionQuery parentDeploymentId(String deploymentId)
    Only select process definitions that are deployed in a deployment with the given parent deployment id

  - ### processDefinitionKey

    ProcessDefinitionQuery processDefinitionKey(String processDefinitionKey)
    Only select process definition with the given key.

  - ### processDefinitionKeyLike

    ProcessDefinitionQuery processDefinitionKeyLike(String processDefinitionKeyLike)
    Only select process definitions where the key matches the given parameter. The syntax that should be used is the same as in SQL, eg. %test%

  - ### processDefinitionVersion

    ProcessDefinitionQuery processDefinitionVersion(Integer processDefinitionVersion)
    Only select process definition with a certain version. Particularly useful when used in combination with `processDefinitionKey(String)`

  - ### processDefinitionVersionGreaterThan

    ProcessDefinitionQuery processDefinitionVersionGreaterThan(Integer processDefinitionVersion)
    Only select process definitions which version are greater than a certain version.

  - ### processDefinitionVersionGreaterThanOrEquals

    ProcessDefinitionQuery processDefinitionVersionGreaterThanOrEquals(Integer processDefinitionVersion)
    Only select process definitions which version are greater than or equals a certain version.

  - ### processDefinitionVersionLowerThan

    ProcessDefinitionQuery processDefinitionVersionLowerThan(Integer processDefinitionVersion)
    Only select process definitions which version are lower than a certain version.

  - ### processDefinitionVersionLowerThanOrEquals

    ProcessDefinitionQuery processDefinitionVersionLowerThanOrEquals(Integer processDefinitionVersion)
    Only select process definitions which version are lower than or equals a certain version.

  - ### latestVersion

    ProcessDefinitionQuery latestVersion()
    Only select the process definitions which are the latest deployed (ie. which have the highest version number for the given key). Can also be used without any other criteria (ie. query.latest().list()), which will then give all the latest versions of all the deployed process definitions.
    Throws:
      `FlowableIllegalArgumentException` - if used in combination with `processDefinitionVersion(Integer)` or `deploymentId(String)`

  - ### processDefinitionResourceName

    ProcessDefinitionQuery processDefinitionResourceName(String resourceName)
    Only select process definition with the given resource name.

  - ### processDefinitionResourceNameLike

    ProcessDefinitionQuery processDefinitionResourceNameLike(String resourceNameLike)
    Only select process definition with a resource name like the given .

  - ### startableByUser

    ProcessDefinitionQuery startableByUser(String userId)
    Only selects process definitions which given userId is authorized to start

  - ### startableByUserOrGroups

    ProcessDefinitionQuery startableByUserOrGroups(String userId, Collection<String> groups)
    Only selects process definition which the given userId or groups are authorized to start.

  - ### suspended

    ProcessDefinitionQuery suspended()
    Only selects process definitions which are suspended

  - ### active

    ProcessDefinitionQuery active()
    Only selects process definitions which are active

  - ### processDefinitionTenantId

    ProcessDefinitionQuery processDefinitionTenantId(String tenantId)
    Only select process definitions that have the given tenant id.

  - ### processDefinitionTenantIdLike

    ProcessDefinitionQuery processDefinitionTenantIdLike(String tenantIdLike)
    Only select process definitions with a tenant id like the given one.

  - ### processDefinitionWithoutTenantId

    ProcessDefinitionQuery processDefinitionWithoutTenantId()
    Only select process definitions that do not have a tenant id.

  - ### processDefinitionEngineVersion

    ProcessDefinitionQuery processDefinitionEngineVersion(String engineVersion)
    Only select process definitions that have the given engine version.

  - ### messageEventSubscriptionName

    ProcessDefinitionQuery messageEventSubscriptionName(String messageName)
    Selects the single process definition which has a start message event with the messageName.

  - ### locale

    ProcessDefinitionQuery locale(String locale)
    Localize process definition name and description to specified locale.

  - ### withLocalizationFallback

    ProcessDefinitionQuery withLocalizationFallback()
    Instruct localization to fallback to more general locales including the default locale of the JVM if the specified locale is not found.

  - ### orderByProcessDefinitionCategory

    ProcessDefinitionQuery orderByProcessDefinitionCategory()
    Order by the category of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionKey

    ProcessDefinitionQuery orderByProcessDefinitionKey()
    Order by process definition key (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionId

    ProcessDefinitionQuery orderByProcessDefinitionId()
    Order by the id of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionVersion

    ProcessDefinitionQuery orderByProcessDefinitionVersion()
    Order by the version of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByProcessDefinitionName

    ProcessDefinitionQuery orderByProcessDefinitionName()
    Order by the name of the process definitions (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByDeploymentId

    ProcessDefinitionQuery orderByDeploymentId()
    Order by deployment id (needs to be followed by `Query.asc()` or `Query.desc()`).

  - ### orderByTenantId

    ProcessDefinitionQuery orderByTenantId()
    Order by tenant id (needs to be followed by `Query.asc()` or `Query.desc()`).