AnsweredAssumed Answered

How to get process definition id in service task?

Question asked by kesavkolla on May 5, 2011
Latest reply on Sep 14, 2012 by mindaugas
I've a service task which implements JavaDelegate.  I want to get the current running process definition id.  Is there any API which returns the current process definition id?

I'm trying

runtimeService.createProcessInstanceQuery()
               .processInstanceId(executionContext.getProcessInstanceId()).singleResult().getProcessDefinitionId();

and is failing with NPE.  This is very first task in my process.

Outcomes