I am trying to know if a process definition key exists in Camunda using its services.
I am aware of the rest api to fetch the details which is - GET /process-definition/key/{key}.
But instead of using rest calls, I would like to use the service's methods to achieve in my Java code.
Checke the RepositoryService. It will give you the createProcessDefinitionQuery
method, which creates a Query builder that (among other attributes) accepts the process definition key.