Get parent process id returns null

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member

Get parent process id returns null

Hi,

I have a tasklistener that executes within two tasks of a called sub-process. This tasklistener retrieves the parent process id. In the first task, which happens to be the first task of the process, the returned parent process id is null. However, the returned parent process id from the second task with the tasklistener is correct.

Is the null return from the first task something to do with the first task of the called sub-process being in the same transaction as the parent process?

Thanks

4 Replies
Alfresco Employee

Re: Get parent process id returns null

Can you share you process definition(s) showing the tasks?

Active Member

Re: Get parent process id returns null

Hi, I've created a couple of simple process definitions plus listener to test this. See attached.

The behaviour I'm now seeing with a JUnit test is that in both cases (Task 1 and 2) the task listener returns null for the parent process id.

Alfresco Employee

Re: Get parent process id returns null

Can you structure the files in a maven project that I can test?

Active Member

Re: Get parent process id returns null

Bassam, Thanks for looking into this. See attached.