AnsweredAssumed Answered

Can't evaluate boolean expression in usertask

Question asked by fellowtom on Jul 11, 2013
Latest reply on Jul 17, 2013 by frederikheremans1
Hi,

as the topic says, I get a warning when completing a usertask. My process: User A starts it and some variables are created and some task are done. A parallel gateway leads to eventbased gateway and a usertask of different lane. One event is a timer the other a signal. After User B fulfills that usertask a signal is thrown and User A can continue. The variable "buyArticle" is type of boolean and the userform property type is the same. If I finish that task I get: Warning –> "Error while evaluation boolean expression: #{buyArticle}"

I evaluated strings and longs inusertaks (User A) before without problem. Is there a problem because variables are defined in lane 1 and this usertask is lane2 (but in scripttask(lane2) the variable is recognized correctly[defined with execution.setVariable("buyArticle,true")]).

I have no idea whats wrong with this expression. I hope someone can help me with this issue.

With kind regards,

FellowTom


<userTask id="usertask4" name="check article and do purchase decision" activiti:assignee="kermit" activiti:candidateUsers="kermit">
      <extensionElements>
        <activiti:formProperty id="wannaBuyArticle" name="Artikel kaufen" type="boolean" expression="#{buyArticle}" required="true"></activiti:formProperty>
      </extensionElements>
</userTask>


09:08:11,680 [http-bio-8080-exec-3] ERROR org.activiti.engine.impl.interceptor.C
ommandContext  - Error while closing command context
org.activiti.engine.ActivitiException: Error while evaluating expression: #{buyA
rticle}
        at org.activiti.engine.impl.el.JuelExpression.setValue(JuelExpression.ja
va:71)
        at org.activiti.engine.impl.form.FormPropertyHandler.submitFormProperty(
FormPropertyHandler.java:108)
        at org.activiti.engine.impl.form.DefaultFormHandler.submitFormProperties
(DefaultFormHandler.java:97)
        at org.activiti.engine.impl.cmd.SubmitTaskFormCmd.execute(SubmitTaskForm
Cmd.java:45)
        at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTa
skCmd.java:61)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(Comm
andExecutorImpl.java:24)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execut
e(CommandContextInterceptor.java:61)
        at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(Sp
ringTransactionInterceptor.java:42)
        at org.springframework.transaction.support.TransactionTemplate.execute(T
ransactionTemplate.java:130)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransa
ctionInterceptor.java:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterc
eptor.java:31)
        at org.activiti.engine.impl.FormServiceImpl.submitTaskFormData(FormServi
ceImpl.java:70)
        at org.activiti.explorer.ui.task.TaskDetailPanel$4.handleFormSubmit(Task
DetailPanel.java:315)
        at org.activiti.explorer.ui.form.FormPropertiesEventListener.componentEv
ent(FormPropertiesEventListener.java:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)

        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219
)
        at org.activiti.explorer.ui.form.FormPropertiesForm.access$000(FormPrope
rtiesForm.java:45)
        at org.activiti.explorer.ui.form.FormPropertiesForm$1.buttonClick(FormPr
opertiesForm.java:139)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)

        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219
)
        at com.vaadin.ui.Button.fireClick(Button.java:567)
        at com.vaadin.ui.Button.changeVariables(Button.java:223)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVar
iables(AbstractCommunicationManager.java:1460)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVar
iableBurst(AbstractCommunicationManager.java:1404)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVar
iables(AbstractCommunicationManager.java:1329)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleU
idlRequest(AbstractCommunicationManager.java:761)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest
(CommunicationManager.java:325)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(Abs
tractApplicationServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
        at org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.j
ava:44)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:1023)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot r
esolve identifier 'buyArticle'
        at org.activiti.engine.impl.juel.AstIdentifier.setValue(AstIdentifier.ja
va:97)
        at org.activiti.engine.impl.juel.AstEval.setValue(AstEval.java:86)
        at org.activiti.engine.impl.juel.TreeValueExpression.setValue(TreeValueE
xpression.java:138)
        at org.activiti.engine.impl.delegate.ExpressionSetInvocation.invoke(Expr
essionSetInvocation.java:37)
        at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(Delegate
Invocation.java:37)
        at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleIn
vocation(DefaultDelegateInterceptor.java:25)
        at org.activiti.engine.impl.el.JuelExpression.setValue(JuelExpression.ja
va:67)
        … 57 more

Outcomes