cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new form property types

rainerv
Champ in-the-making
Champ in-the-making
Hi,

How would it be possible to easily implement new form property types?

Currently, Activiti uses following property types: string (StringFormType), long (LongFormType),
enum (EnumFormType) and date (DateFormType). Would it be possible to add new custom property types without changing Activiti source code? If not then could it be a feature in a future release?

For example, I have to use form properties for uploading and managing files and for that I would need to define a new property type for handling files so my user interface would be able to render those form properties as upload/download buttons instead of regular input fields. What would be the most reasonable way of achieving that?

Thank you
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
There is a property available on the ProcessEngineConfigutionImpl which allows plugging in your own types, called 'customFormTypes'. It expects a list of org.activiti.engine.impl.form.AbstractFormType subclasses, which are added to the default types which you have mentioned.

rainerv
Champ in-the-making
Champ in-the-making
Thank you! It works nicely Smiley Happy

rkroll
Champ in-the-making
Champ in-the-making
I think a generic file upload form type would be beneficial to many people - any chance you can contribute back some code to the community?