cancel
Showing results for 
Search instead for 
Did you mean: 

How to get ExecutionContext

cookie-exploit
Champ in-the-making
Champ in-the-making
Hello Guys,

I need to access the ExecutionContext, but if I try to get the context with:

Context.getExecutionContext()
I get an EmptyStackException. Then I debug it and saw that there could a problem in the
protected static <T> Stack<T> getStack(ThreadLocal<Stack<T>> threadLocal)

method. Because if the stack is null then a new Stack will created and then if the peack() method is calling an EmptyStackException will thrown.

How is it possible to get the ExecutionContext? Or isn't there anyway to do this?
4 REPLIES 4

meyerd
Champ on-the-rise
Champ on-the-rise
Context.getExecutionContext()
only works if the calling thread is currently performing an atomic operation in activiti

cookie-exploit
Champ in-the-making
Champ in-the-making
Okay, thanks. Smiley Happy

dajago
Champ in-the-making
Champ in-the-making
I've run into the same problem. Had to upgrade from 5.13 to 5.14 for other bug-fixes and where via Camel we could use Context.getExecutionContext(), it no longer works. I've not much experience with Activiti and would like to know how to handle this "atomic operation".

trademak
Star Contributor
Star Contributor
Could you share some code what you are trying to do?

Thanks,