cancel
Showing results for 
Search instead for 
Did you mean: 

How to inject external properties in a groovy script for scriptTask

marfago
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to parameterize some workflows injecting properties from an external properties file.
What is the best way to do that? Any suggestion?

Thanks in advance,
M@rco
4 REPLIES 4

marfago
Champ in-the-making
Champ in-the-making
Sorry, I forgot to mention that I need them available in a groovy script for scriptTask.
M@rco

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I would say that you can add properties as a spring bean to the process engine.
http://www.activiti.org/userguide/#N10A60

Regards
Martin

marfago
Champ in-the-making
Champ in-the-making
Hi,

Thank you for the answer.
Using <code><utilSmiley Tongueroperties></code> and loading properties from a file works fine, even though it requires a little bit more verbosity (the bean name is required for each property).
Indeed, it looks like the properties are not injected into the activiti context with <code>PropertyPlaceholderConfigurer</code> or <code>contextSmiley Tongueroperty-placeholder</code>.

Regards,
M@rco

deeps2633
Champ in-the-making
Champ in-the-making

Hi Can you please post an example, how you could inject properties into processEngine using <utilSmiley Tongueroperties>. Thank you