Activiti

Please add a ELResolver that automatically resolves any bean in the Spring BeanFactory in which the ELResolver resides

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 5.0.alpha4
  • Fix Version/s: 5.0.beta1
  • Component/s: Engine
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

Please add a ELResolver that automatically resolves any bean in the Spring BeanFactory in which the ELResolver resides.

Dave Syer added a very good one called StaticELResolver that resolves beans explicitly configured on the <code>map</code> property, and I've simply extended it to preload the map automatically with all known Spring ApplicationContext bean names.

Source is attached. Thanks in advance.

Activity

Hide
Josh Long added a comment -

thinking about it a bit more, I realize that the first file attached created an unnecessary class variable. I've inlined it and that code is attached instead. Additionally, I've created another ELResolver which simply does the same thing but only preloads beans assignable to the interface ActivityBehavior. Thanks

Show
Josh Long added a comment - thinking about it a bit more, I realize that the first file attached created an unnecessary class variable. I've inlined it and that code is attached instead. Additionally, I've created another ELResolver which simply does the same thing but only preloads beans assignable to the interface ActivityBehavior. Thanks
Hide
Tom Baeyens added a comment -

For now, I started with the simplest thing: just expose all the spring beans in all the expressions. Next task is doing the same for JSR 223 scripting: i created ACT-97 for that.

I don't see the urgent need for creating limiting visibility to certain beans that are declared in that static el resolver. It needs to be though through carefully as we don't want to make it more complex for the default use case.

Same comment for preloading the ActivityBehaviors. I don't see the urgent need for that. I think it's already a great start if we have visibility of all the beans in UEL expressions and the next step should be ACT-97

Show
Tom Baeyens added a comment - For now, I started with the simplest thing: just expose all the spring beans in all the expressions. Next task is doing the same for JSR 223 scripting: i created ACT-97 for that. I don't see the urgent need for creating limiting visibility to certain beans that are declared in that static el resolver. It needs to be though through carefully as we don't want to make it more complex for the default use case. Same comment for preloading the ActivityBehaviors. I don't see the urgent need for that. I think it's already a great start if we have visibility of all the beans in UEL expressions and the next step should be ACT-97

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: