cancel
Showing results for 
Search instead for 
Did you mean: 

StartForm/TaskForm data validation

redguy1
Champ in-the-making
Champ in-the-making
Is there any possibility to hook validation of data entered by user in StartForm/Taskform? I mean not only proper type/range validation but also conditional validation, references between values etc…

If not - why the engine does not offer such hook and accepts everything is posted? What is the common practice when dealing with TaskForms with generated forms based on FormProperties? Can I use formKey for my own validation model or it will break some other mechanizms?

Wouldn't it be nice to have a validation hook for data provided by user in initial step or task step and provide validators with process definition package?
5 REPLIES 5

redguy1
Champ in-the-making
Champ in-the-making
To be more specific, here is an example: is there a way I can ensure that user starting 'vacation request' workflow must provide vacation date in the future, and if not - he cannot start the workflow.

or: can I force user that provides "approve: false" to also provide not empty reason, or he won't be able to complete the task…

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Form properties validation (except isRequired) is not supported. You can create pull request if you want to support it. I would say the best way is to include such an information in model (process of form).

Regards
Martin

redguy1
Champ in-the-making
Champ in-the-making
And don't you think validation is neccesary? No system should relay on user entered data, and as I understand currently I can only gather data in user task, then add scripted/java native step that checks it's validity and in case it is not valid - return to previous step (create another user task)… I very simple case this will work (with some overhead of objects created in system and database), but it is not very neat and easy to maintain.

I will create ticket and see what happens Smiley Happy

trademak
Star Contributor
Star Contributor
Hi,

Thanks for your post and the issue you created on Github. Could you create an issue in JIRA as well, because that's our issue management system. I think it would be a good feature to add the possibility to add form validation via a Java class or script.

Best regards,

redguy1
Champ in-the-making
Champ in-the-making
Cannot easily create jira account (Not a member? To request an account, please contact your JIRA administrators.), so I could only create github issue…