AnsweredAssumed Answered

EmptyStackException with multi-instance task & CDI

Question asked by naag on Aug 13, 2012
Latest reply on Aug 14, 2012 by bernd.ruecker
Hi all,

I've just run into an EmptyStackException with Activiti 5.10. I've got an multi-instance user task where each task is finished via BusinessProcess.completeTask(). After finishing the last task instance, Activiti calls the end listeners in MultiInstanceActivityBehavior.callActivityEndListeners(), and because I've setup the CdiExecutionListener, this will also be called.

CdiExecutionListener will use Context.getExecutionContext(), but it seems the context is no longer available, that's why there will be the EmptyStackException.

Am I misusing the API here? It's a little bit difficult to provide a meaningful code sample here, but I believe this should work. Before I open a JIRA, I would like to get some confirmation that this should work.

Any pointers are greatly appreciated :-)