Once I commit a record without events, validation is skipped?

0
When trying to "fix" our validation issues we were trying a solution where we allow the users to Save a record WITHOUT events, so they can come back and finish the registration later. So the Save button is changed into a workflow that essentially is a Change Object, Save without Events. After returning to the registration and finalizing they hit another Microflow that does a Change Object, Save. At which point none of the Domain MOdel/Boject based validation rules trigger..... Obviously I am overlooking something very simple, so could anyone please point me the correct way.
asked
2 answers
1

Create an extra attribute: Draft.

Remove all validation from events. Don't use build in validation because only one validation at a time is triggered.

Button 'Save as draft' can skip validation. Put all validations in a validation microflow.

When 'save and finalize' is clicked call this validation microflow (be sure to set 'Abort on validation errors' for this button). Set draft false. Commit.

Create a scheduled task to clean up old drafts. Older than 24 hour for example.

answered
1

Lex,

I assume you have validation in the entity and the form? Because then when you do a refresh (no commit, but only a refresh) on the form ALL the fields that are not validated will have the red required message. Not just the first.

So with a custom save button, do the validation check there and when failing refresh the screen without the commit. Then ALL the fields on the form that have the required set to true will show the required message.

answered