Sorry, I didn’t noticed that the engine log had more detail about this issue. Now I’m copying all the log:
2014-09-16 15:51:15 org.bonitasoft.forms.server.provider.impl.FormServiceProviderExtImpl
SEVERE: Username<thorsten.hartmann> Form<Expense Claim–1.3–Finance Approval$entry> Task
org.bonitasoft.console.common.server.utils.BPMExpressionEvaluationException: Error when evaluating expressions on activity instance 60259. Error on expression evaluation for the attribute [available-values] of object [expenseClaimTable].
at org.bonitasoft.forms.server.accessor.api.ExpressionEvaluatorEngineClient.evaluateExpressionsOnActivityInstance(ExpressionEvaluatorEngineClient.java:47)
at org.bonitasoft.forms.server.api.impl.FormExpressionsAPIExtImpl.evaluateActivityExpressions(FormExpressionsAPIExtImpl.java:383)
at org.bonitasoft.forms.server.api.impl.FormWorkflowAPIImpl.getActivityFieldsValues(FormWorkflowAPIImpl.java:769)
at org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl.resolveExpressions(FormServiceProviderImpl.java:854)
at org.bonitasoft.forms.server.FormsServletExt.resolveFormFieldExpressions(FormsServletExt.java:401)
at org.bonitasoft.forms.server.FormsServletExt.setFormFieldValues(FormsServletExt.java:354)
at org.bonitasoft.forms.server.FormsServletExt.setFormFieldValues(FormsServletExt.java:323)
at org.bonitasoft.forms.server.FormsServletExt.getFormFirstPage(FormsServletExt.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at org.bonitasoft.forms.server.FormsServlet.processCall(FormsServlet.java:138)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.bonitasoft.console.common.server.sso.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.bonitasoft.console.common.server.login.filter.NoCacheFilter.doFilter(NoCacheFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.expression.ExpressionEvaluationException: USERNAME=thorsten.hartmann | org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Groovy script throws an exception of type class org.codehaus.groovy.runtime.typehandling.GroovyCastException with message = Cannot cast object ‘{paymentAmount=1.0, paymentDate=Mon Sep 01 00:00:00 BST 2014, paymentFile=paymentFile_0-e2e6ab87-1471-4cf6-bdf7-7608895d8a02, paymentTo=1, paymentCateg=Airfare}’ with class ‘java.util.HashMap’ to class ‘org.bonitasoft.expenseclaimitem.ExpenseClaimItemType’ due to: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘paymentFile_0-e2e6ab87-1471-4cf6-bdf7-7608895d8a02’ with class ‘java.lang.String’ to class ‘long’
Expression : SExpressionImpl [name=expenseClaimTable:available-values, content=import org.bonitasoft.expenseclaimitem.ExpenseClaimItemType;
List cases = new ArrayList();
for(ExpenseClaimItemType expenseClaimItem : expenseClaimItems){
List caseRow = new ArrayList();
caseRow.add(expenseClaimItem.getPaymentDate().format("dd MMM yyyy"));
caseRow.add(expenseClaimItem.getPaymentTo());
caseRow.add(expenseClaimItem.getPaymentAmount().toString());
caseRow.add(expenseClaimItem.getPaymentCateg());
// caseRow.add(expenseClaimItem.getPaymentFile().toString());
cases.add(caseRow);
}
return cases;, returnType=java.util.List, dependencies=[SExpressionImpl [name=expenseClaimItems, content=expenseClaimItems, returnType=java.util.List, dependencies=, expressionKind=ExpressionKind [interpreter=NONE, type=TYPE_VARIABLE]]], expressionKind=ExpressionKind [interpreter=GROOVY, type=TYPE_READ_ONLY_SCRIPT]]
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.evaluateExpressionsOnActivityInstance(ProcessAPIImpl.java:5571)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:368)
at org.bonitasoft.engine.api.impl.ServerAPIImpl$1.call(ServerAPIImpl.java:337)
at com.bonitasoft.engine.transaction.JTATransactionServiceExt.executeInTransaction(JTATransactionServiceExt.java:55)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:344)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:286)
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:128)
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:88)
at com.sun.proxy.$Proxy19.evaluateExpressionsOnActivityInstance(Unknown Source)
at org.bonitasoft.forms.server.accessor.api.ExpressionEvaluatorEngineClient.evaluateExpressionsOnActivityInstance(ExpressionEvaluatorEngineClient.java:45)
… 37 more
Caused by: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Groovy script throws an exception of type class org.codehaus.groovy.runtime.typehandling.GroovyCastException with message = Cannot cast object ‘{paymentAmount=1.0, paymentDate=Mon Sep 01 00:00:00 BST 2014, paymentFile=paymentFile_0-e2e6ab87-1471-4cf6-bdf7-7608895d8a02, paymentTo=1, paymentCateg=Airfare}’ with class ‘java.util.HashMap’ to class ‘org.bonitasoft.expenseclaimitem.ExpenseClaimItemType’ due to: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘paymentFile_0-e2e6ab87-1471-4cf6-bdf7-7608895d8a02’ with class ‘java.lang.String’ to class ‘long’
Expression : SExpressionImpl [name=expenseClaimTable:available-values, content=import org.bonitasoft.expenseclaimitem.ExpenseClaimItemType;
List cases = new ArrayList();
for(ExpenseClaimItemType expenseClaimItem : expenseClaimItems){
List caseRow = new ArrayList();
caseRow.add(expenseClaimItem.getPaymentDate().format("dd MMM yyyy"));
caseRow.add(expenseClaimItem.getPaymentTo());
caseRow.add(expenseClaimItem.getPaymentAmount().toString());
caseRow.add(expenseClaimItem.getPaymentCateg());
// caseRow.add(expenseClaimItem.getPaymentFile().toString());
cases.add(caseRow);
}
return cases;, returnType=java.util.List, dependencies=[SExpressionImpl [name=expenseClaimItems, content=expenseClaimItems, returnType=java.util.List, dependencies=, expressionKind=ExpressionKind [interpreter=NONE, type=TYPE_VARIABLE]]], expressionKind=ExpressionKind [interpreter=GROOVY, type=TYPE_READ_ONLY_SCRIPT]]
at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:146)
at org.bonitasoft.engine.expression.impl.ExpressionServiceImpl.evaluate(ExpressionServiceImpl.java:77)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionWithResolvedDependencies(ExpressionResolverServiceImpl.java:180)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluateExpressionsFlatten(ExpressionResolverServiceImpl.java:102)
at org.bonitasoft.engine.core.expression.control.api.impl.ExpressionResolverServiceImpl.evaluate(ExpressionResolverServiceImpl.java:76)
at org.bonitasoft.engine.api.impl.transaction.expression.EvaluateExpressionsInstanceLevel.execute(EvaluateExpressionsInstanceLevel.java:69)
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.evaluateExpressionsInstanceLevel(ProcessAPIImpl.java:5618)
at org.bonitasoft.engine.api.impl.ProcessAPIImpl.evaluateExpressionsOnActivityInstance(ProcessAPIImpl.java:5568)
… 49 more
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘{paymentAmount=1.0, paymentDate=Mon Sep 01 00:00:00 BST 2014, paymentFile=paymentFile_0-e2e6ab87-1471-4cf6-bdf7-7608895d8a02, paymentTo=1, paymentCateg=Airfare}’ with class ‘java.util.HashMap’ to class ‘org.bonitasoft.expenseclaimitem.ExpenseClaimItemType’ due to: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘paymentFile_0-e2e6ab87-1471-4cf6-bdf7-7608895d8a02’ with class ‘java.lang.String’ to class ‘long’
at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:358)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:599)
at Script35.run(Script35.groovy:7)
at org.bonitasoft.engine.expression.impl.GroovyScriptExpressionExecutorCacheStrategy.evaluate(GroovyScriptExpressionExecutorCacheStrategy.java:127)
… 56 more
2014-09-16 15:51:15 org.bonitasoft.forms.server.FormsServletExt
SEVERE: Error while getting the first page for id Expense Claim–1.3–Finance Approval$entry
org.bonitasoft.forms.server.exception.FormInitializationException: Error when evaluating expressions on activity instance 60259. Error on expression evaluation for the attribute [available-values] of object [expenseClaimTable].
at org.bonitasoft.forms.server.provider.impl.FormServiceProviderImpl.resolveExpressions(FormServiceProviderImpl.java:910)
at org.bonitasoft.forms.server.FormsServletExt.resolveFormFieldExpressions(FormsServletExt.java:401)
at org.bonitasoft.forms.server.FormsServletExt.setFormFieldValues(FormsServletExt.java:354)
at org.bonitasoft.forms.server.FormsServletExt.setFormFieldValues(FormsServletExt.java:323)
at org.bonitasoft.forms.server.FormsServletExt.getFormFirstPage(FormsServletExt.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at org.bonitasoft.forms.server.FormsServlet.processCall(FormsServlet.java:138)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.bonitasoft.console.common.server.sso.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.bonitasoft.console.common.server.login.filter.NoCacheFilter.doFilter(NoCacheFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
What I can understand is that my script is not very happy with class attribute paymentFile. It’s a long type.