Custom Form Type Error

Showing results for 
Search instead for 
Did you mean: 
Member II

Custom Form Type Error

Hi every one, I have a problem with custom types. I did it

package test;
import org.activiti.engine.form.AbstractFormType;

public class TextAreaFormType extends AbstractFormType {
public static final String TYPE_NAME = "textarea";
public String getName() {
return TYPE_NAME;

public Object convertFormValueToModelValue(String propertyValue) {
return propertyValue;

public String convertModelValueToFormValue(Object modelValue) {
return (String) modelValue;

package test;

import org.activiti.engine.form.FormProperty;
import org.activiti.explorer.Messages;
import org.activiti.explorer.ui.form.AbstractFormPropertyRenderer;

import com.vaadin.ui.Field;
import com.vaadin.ui.TextArea;

public class TextAreaFormPropertyRenderer extends AbstractFormPropertyRenderer {

public TextAreaFormPropertyRenderer() {
public Field getPropertyField(FormProperty formProperty) {
TextArea textArea = new TextArea(getPropertyLabel(formProperty));
if (formProperty.getValue() != null) {
return textArea;

In activiti.cfg.xml

<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="customFormTypes">
      <bean class="test.TextAreaFormType"/>
<property name="jdbcUrl" value="@jdbc.url@" />
<property name="jdbcDriver" value="@jdbc.driver@" />
<property name="jdbcUsername" value="@jdbc.username@" />
<property name="jdbcPassword" value="@jdbc.password@" />


<!-- Custom form property renderers can be plugged in here -->
<bean id="formPropertyRendererManager" class="org.activiti.explorer.ui.form.FormPropertyRendererManager" lazy-init="true">
<!-- Default renderer -->
<property name="noTypePropertyRenderer">
<bean class="org.activiti.explorer.ui.form.StringFormPropertyRenderer" />
<!-- Renderers by property type -->
<property name="propertyRenderers">
<bean class="org.activiti.explorer.ui.form.StringFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.EnumFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.LongFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.DoubleFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.DateFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.UserFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.BooleanFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.ProcessDefinitionFormPropertyRenderer" />
<bean class="org.activiti.explorer.ui.form.MonthFormPropertyRenderer" />
<bean class="test.TextAreaFormPropertyRenderer" />

In .bpmn

So, when I try to deploy my .bar I get this error

2 Replies
Alfresco Employee

Re: Custom Form Type Error

From an initial look what you've posted looks in line with the MonthFormPropertyRenderer example (Creating a new form property in Activiti ). As a diagnostic check perhaps it's worth checking that those versions of the config files are the ones being read? To check whether those are the config files being used, maybe you could try taking parts of those files out and restarting to see whether you then get an error related what you've taken out (e.g. MonthFormPropertyRenderer entry and see if you get an error for that when you upload your file)? I also notice you've used a different package name from the examples - I wouldn't expect that to be the problem but it is worth checking.


Re: Custom Form Type Error

Since the error is coming when you deploy the bar, it indicates the problem has nothing to do with the the form renderer, rather it is the form type that is causing the exception.

I see you have registered the form type so perhaps the class is not being found in your classpath.