AnsweredAssumed Answered

NullPointerException in FormService

Question asked by luismdelgado on Dec 10, 2010
Latest reply on Dec 11, 2010 by luismdelgado

I am trying to retrieve a task form but I keep receiving a NullPointerException:

Caused by: java.lang.NullPointerException
   at org.activiti.engine.impl.form.JuelFormEngine.getFormTemplateString(
   at org.activiti.engine.impl.form.JuelFormEngine.renderTaskForm(
   at org.activiti.engine.impl.cmd.GetRenderedTaskFormCmd.execute(
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(
   at org.activiti.engine.impl.FormServiceImpl.getRenderedTaskForm(

The form works fine in Activiti Explorer and through the REST API, but it doesn't work if a use FormService.getRenderedTaskForm(taskId).

This is where I have the form in the process definition:

<userTask id="review" name="Review Document" activiti:formKey="dr-approve.form">

I have tested the same code with the Vacation Request example and it workfs fine. I based my process in the Vacation Request example so I don't know why my form is failing. But again, the form works fine in Activiti Explorer and through REST.

Any ideas?

Luis Delgado