cancel
Showing results for 
Search instead for 
Did you mean: 

NullPointerException in JUEL evaluation in FormService

frauke
Champ in-the-making
Champ in-the-making
Hi,

I have a problem after switching to release RC1, concerning the new FormService.
The code

processEngine.getFormService().getRenderedTaskForm(taskId);
throws an exception:

java.lang.NullPointerException
   at org.activiti.engine.impl.form.JuelFormEngine.getFormTemplateString(JuelFormEngine.java:58)
   at org.activiti.engine.impl.form.JuelFormEngine.renderTaskForm(JuelFormEngine.java:44)
   at org.activiti.engine.impl.cmd.GetRenderedTaskFormCmd.execute(GetRenderedTaskFormCmd.java:62)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:36)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.FormServiceImpl.getRenderedTaskForm(FormServiceImpl.java:44)
9 REPLIES 9

tombaeyens
Champ in-the-making
Champ in-the-making
check the activiti:formKey attribute on the activity.  it has changed from activiti:form to activiti:formKey i think.

frauke
Champ in-the-making
Champ in-the-making
Yes, I changed that, but it happens nonetheless.

<userTask id="cardRequest" name="Create card request" activiti:formKey="form-card.xml" />
Frauke

jbarrez
Star Contributor
Star Contributor
What do you want: the rendered form? Because i see that you are using an .xml suffix. Is it a valid form?

Or do you just want to retrieve the key ?

frauke
Champ in-the-making
Champ in-the-making
I need just the key.

frauke
Champ in-the-making
Champ in-the-making
Hi everybody,

do you have any ideas on that so far?
I'm stuck with this problem, I fear, so I am thinking about returning to beta2.

Frauke

frederikherema1
Star Contributor
Star Contributor
Can you double-check (in for example probe) that the resource with name "form-card.xml" is deployed in the same deployment as the process-definition for the task?

frauke
Champ in-the-making
Champ in-the-making
I don't need it as a resource, but just as a key…. that I access via FormService.
Or is it because of the name ("*.xml")?
But on the other hand I have an example with a simple name (without ".xml"), which causes the same problem.

jbarrez
Star Contributor
Star Contributor
If you only need the key, you can do:

StartFormData startForm = formService.getStartFormData(processDefinitionId);
String formKey = startForm.getFormKey();

frauke
Champ in-the-making
Champ in-the-making
Great, Thanks a lot!!!
Getting started

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.