Hi,
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.
-Hamed