Hi Activiti team,
After the initial rush for setting up my workflow I'm looking back and wondering if there's a cleaner way to inject property values loaded by the SpringPropertyPlaceholderConfigurer …
E.g. to externalize the duration for a timer
Since some of the expressions I tried to refer to the properties didn't work I ended up with a [n ugly?] workaround defining a spring bean as a map with key,value entries where I configured -an indirection to- a subset of the properties loaded by spring that I need "within" activiti. The juel expression to this bean is successfully resolved.
Thanks,
Omar
PS: below, some snippets illustrating my solution/workaround
<code>
<!– ugly workaround, activiti doesn t seem to resolve properties from PropertyPlaceholderConfigurer –>
<util:map id="activitiProps">
<entry key="emailTo" value="${notification.email.recipients}"/>
<entry key="emailFrom" value="${email.sender}"/>
<entry key="peTimeout" value="${workflow.timeout.minutes:60}"/>
</util:map>
<boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="calculationDone" cancelActivity="false">
<timerEventDefinition>
<timeDuration>PT${activitiProps.peTimeout}M</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<activiti:field name="from">
<activiti:expression>${activitiProps.emailFrom}</activiti:expression>
</activiti:field>
<code>