the name of process definition is stored in the JBPM4_DEPLOYPROP, with a specified name. I cannot remember it clearly. But I think you could find it from source codes.
And you could find processInstance by using taskImpl.processInstance(), and you could get process deifnition id from processInstance. Then you could get processDefintionName by processDefinitionId, they both stored in the JBPM4_DEPLOYPROP.
And good luck.:)