AnsweredAssumed Answered

Why don't set ExecutionImpl in ELContext using putContext?

Question asked by iravanchi on Oct 10, 2010
Latest reply on Oct 12, 2010 by iravanchi

I was browsing the EL-related code in Activiti, where a point came into my mind:
The ExecutionVariableElResolver class needs an instance of Execution for looking up variables.
So, everytime an ELContext instance is needed, it is created with brand-new resolvers, so that execution can be set into them.
(I know it is cached for each execution)

But instead of creating resolvers everytime (I think they are stateless, except for ExecutionVariableElResolver)
you can set the execution in the ELContext using putContext method, and look it up in ExecutionVariableElResolver class using getContext method.
This is a more logical place, imho, to keep the execution in the el context object model.
And if any other resolvers need the execution instance in any way, is can be easier for them to access.