Hi. I'm using the gwt-console and trying to set a parameter mapping to send some variables from the process to a task. First, the variables are setted in the process like: <header> <variables>
<variable name="myVariableA" > <type name="org.drools.process.core.datatype.impl.type.ObjectDataType" className="String" /> </variable> <variable name="myVariableB" >
<type name="org.drools.process.core.datatype.impl.type.ObjectDataType" className="String" /> </variable> </variables> </header> The parameter mapping is:
<humanTask id="3" name="Revisar Solicitud" x="119" y="143" width="162" height="48" > <work name="Human Task" > ... </work>
<mapping type="in" from="myVariableA" to="myVariableA" /> <mapping type="in" from="myVariableB" to="myVariableB" /> </humanTask>
Then I have a ftl file for the task form like: <html> ... <body> A value: ${myVariableA}</br> Another value: ${myVariableB}</br> ... </body> </html>
With this code, when I select a task and click "View", I get the following exception:
--------------------------------------------------------------------------------------------------------------------------------------------------------- org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Failed to process form template
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319) org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230) org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) causa raíz
java.lang.RuntimeException: Failed to process form template org.drools.integration.console.forms.AbstractFormDispatcher.processTemplate(AbstractFormDispatcher.java:104)
org.drools.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:111) org.drools.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50) org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:203)
org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:125) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) causa raíz
freemarker.core.InvalidReferenceException: Expression myVariableA is undefined on line 5, column 39 in Evaluacion.
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) freemarker.core.Expression.getStringValue(Expression.java:118) freemarker.core.Expression.getStringValue(Expression.java:93) freemarker.core.DollarVariable.accept(DollarVariable.java:76)
freemarker.core.Environment.visit(Environment.java:209) freemarker.core.MixedContent.accept(MixedContent.java:92) freemarker.core.Environment.visit(Environment.java:209) freemarker.core.Environment.process(Environment.java:189)
freemarker.template.Template.process(Template.java:237) org.drools.integration.console.forms.AbstractFormDispatcher.processTemplate(AbstractFormDispatcher.java:87) org.drools.integration.console.forms.TaskFormDispatcher.provideForm(TaskFormDispatcher.java:111)
org.drools.integration.console.forms.FormDispatcherComposite.provideForm(FormDispatcherComposite.java:50) org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormProcessingFacade.java:203) org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormProcessingFacade.java:125)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117) org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166) org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173) org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) ---------------------------------------------------------------------------------------------------------------------------------------------------------
Is this a bug? or I'm doing something wrong?