JUEl and Spring activiti engine configuration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2013 05:40 AM
For my workflow I need to have a JUEL engine which acceptes null values. JUEL documentation precises that the propertie : "javax.el.nullProperties" should be set to our need.
But how can we set this propertie with a org.activiti.spring.SpringProcessEngineConfiguration or org.activiti.spring.ProcessEngineFactoryBean ?
Thanks for your replies.
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2013 07:37 AM
Best regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2013 08:37 AM
I know it's possible to delegate the behaviour to a JAVA class but The workflow is "big" and I prefer the first solution than modify each part that needs this behaviour.
Edit : this stack trace may help you to illustrate my need,
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'escalationNeeded'
at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
at org.activiti.engine.impl.juel.AstUnary$SimpleOperator.eval(AstUnary.java:28)
at org.activiti.engine.impl.juel.AstUnary.eval(AstUnary.java:60)
at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
… 97 more
Like in JSP EL, I would like that the unknown field "escalationNeeded" is null than get an exception. The main goal of this is to be able to test "${!escalationNeeded}" like ${escalationNeeded==null || !escalationNeeded} (or something similar to test if the variable exists or not).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2013 08:49 AM
Best regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2013 10:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2013 10:47 AM
https://xircles.codehaus.org/signup/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2013 04:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2014 02:56 PM
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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2014 05:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2015 05:05 AM
We are using Activiti 5.14 and creating el.properties file seems to be not working.
I've overridden [java]org.activiti.engine.impl.juel.ExpressionFactoryImpl[/java] to support [java]javax.el.nullProperties[/java] property but I wonder whether a better way to do this exists.
Thank you.
