cancel
Showing results for 
Search instead for 
Did you mean: 

Why don't set ExecutionImpl in ELContext using putContext?

iravanchi
Champ in-the-making
Champ in-the-making
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
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Thanks for pointing that out, added it to Jira as improvement: http://jira.codehaus.org/browse/ACT-240

iravanchi
Champ in-the-making
Champ in-the-making
You're totally welcome.
I already like Activiti engine, and think it's great. And I like to make it better.

I'm totally willing to implement such improvements on the engine myself, and let you guys just check the code.
I've already sent the agreement form to Tom two weeks ago, and haven't heard anything since.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.