12-09-2011 05:02 AM
<userTask id="usertask1" name="Task 1"" activiti:candidateGroups="Group">
<extensionElements>
<activiti:formProperty id="someProperty" name="Some Property" type="boolean" required="true" readable="true" writable="true"></activiti:formProperty>
</extensionElements>
</userTask>
What I would like to do, though, is to initialize the property with a default value in case no variable someProperty has been created in the process context so far.
<userTask id="usertask1" name="Task 1"" activiti:candidateGroups="Group">
<extensionElements>
<activiti:formProperty id="someProperty" name="Some Property" type="boolean" required="true" readable="true" writable="true" expression="${false}"></activiti:formProperty>
</extensionElements>
</userTask>
org.activiti.engine.impl.javax.el.ELException: Cannot set value of a non-lvalue expression 'false'
at org.activiti.engine.impl.juel.AstRightValue.setValue(AstRightValue.java:53)
at org.activiti.engine.impl.juel.AstEval.setValue(AstEval.java:86)
at org.activiti.engine.impl.juel.TreeValueExpression.setValue(TreeValueExpression.java:138)
at org.activiti.engine.impl.delegate.ExpressionSetInvocation.invoke(ExpressionSetInvocation.java:37)
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.setValue(JuelExpression.java:69)
… 118 more
Now I thought about adding some kind of default expression that is used to initialize a form property iff the backing variable does not yet exist in the current execution scope.12-09-2011 09:04 AM
12-13-2011 03:04 AM
Right, a default or an initial value (with an expression) is not implemented.Sounds good. I'll open a JIRA issue and attach a patch as soon as it is ready.
So if you would be willing to contribute a patch that would be great.
Maybe you can use an attribute name like default that could hold a static String or an expression?
12-14-2011 10:55 AM
04-30-2012 12:38 PM
05-02-2012 03:52 AM
07-17-2012 12:31 PM
07-18-2012 02:24 AM
07-18-2012 03:38 AM
07-18-2012 04:03 AM
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.