Reputation: 832
I am using JBPM 6.1.0.Final on JBoss EAP 6.3 created using the eclipse modeler. I have a main process that is calling a reusable subprocess. I have overridden the ProcessEventListener.afterProcessCompleted method to print the Process Variables upon process completion. It appears that for each time the subprocess is completes, it call the afterProcessCompleted method multiple times depending on how many times the process completed. After the first run, it will execute once. After the second run, it will execute twice. After the third run, it will execute three times .etc.
I noticed that if my process does not execute a User Task, the task is removed from the TASK table in the database. If a User Task is executed, the record stays in the database with status 'Completed'. I don't know if it is important to this issue, but I thought it was worth mentioning.
Is this multiple execution happening the intended behavior or is there some other issue causing the multiple lifecycle method executions?
Upvotes: 1
Views: 384
Reputation: 2918
AfterProcessCompleted should only be called once for each process instance that is completed. Is it possible the listener is getting added multiple times to the session? If not, do you have a reproducer? Could you open a JIRA and attach this information?
Upvotes: 1