We have processInsatanceId in Task table of jbpm which remains unique through out the process.
But the problem is created when we use Reusable Sub-process. When we use Reusable Sub-process it creates another processInstance Id it does not remain same for the whole process(till the end node of process).
So, there should one unique Id which remains same for one process. It can also be added as a new column in Task Table.