cancel
Showing results for 
Search instead for 
Did you mean: 

UserTask w.form:best practice to define the custom attribute

udoderk
Champ in-the-making
Champ in-the-making
Hello everybody, I try the currently described here steps for development of the user tasks with custom GUI mask elements with validators.
It seems to work when the custom form type/Custom form renderer not needs the additional informations to validate. However, if I need such additional informations to validate (for example, to validate the length of the input symbols. The max length must be determined into BPMN xml file within "formProperty" element) , currently i looking at the best practicies to implement it without deep changing of the original Activiti Explorer sources.
I have some idea  with deep changing: e.g.
1. extend the schema definition for activiti-bpmn-extensions (activiti-bpmn-extensions-5.10.xsd file) : define additional attribute "settings" with type "string"
2. Serialize the JavaBean, that contains needed information for validation and set it to "settings"
3. and then patch/extend the formTypes class (parseFormPropertyType() method to desirialize the JavaBean from parsed "settings" string and to initialize the custom form type with those JavaBean.


But such solution is not a lightweight solution :roll: (imho)
I'm seeking for best practices to realize it.

Thank You for goood ideas 8-)
10 REPLIES 10

jbarrez
Star Contributor
Star Contributor
Absolutely, but I'm no fan of visual tools (call me old fashioned), but I see people being productive in them so I might need to revise that stand 😉