Getting Process definition key from DelegateExecution

How do I get the ProcessDefn key from a DelegateExecution object using the java API

Hi @asarvaiya,

you can’t get the process definition key directly from the DelegateExecution. You have to get the process definition via RepositoryService first. The Id of the process definition is in the DelegateExecution.

Does this help you?

Best regards,
Philipp

delegateExecution.getProcessEngineServices().getRepositoryService().getProcessDefinition(delegateExecution.getProcessDefinitionId()).getKey()

:wink:

2 Likes

Great, it works.