Implementing the new feature add validation feedback
I am currently implementing the new feature 'add validation feedback' which I can now use in microflow. Before, I had validation rules that I configured on the object in the meta-model (required), but I want to remove this and use the new feature instead. I want to check if a number of fields are filled in by the user and I (obviously) want to be able to present the result of the complete (so if two fields are not filled in, I want to be able to add validation feedback on both of those fields. The best way to do this I think, is to do the check in a subflow but I do not know an elegant way to 'detect' that I need to break the commit action, any thoughts on that?
I had a similar case using validation warnings. I wanted to create a list of validation warnings in a string that included all warnings instead of only the first validation fail.
What you have to do is to create boolean that is set to false. Each time you're validation check fails you give the specific validation feedback and set the boolean to true. At the end of the flow you check whether the boolean is true or false and let the commit activity fail in case the validation fails.
I don't know if I get the question right, but maybe you can configure the subflow to return a boolean. Let it return 'true' in the case it suffices the validation rules and false when it doesn't. When you now map this variable to the end event of the (before commit) micro flow it should do the trick.