Advanced microflow settings Abort on all validation errors.

0
Since Mx4.1 it seems that the setting was changed to have the abort on all validation errors to yes in the advanced microflow settings. I only found this out by accident while banging my head to the wall why a button would not fire in all the browsers. The breakpoint would not trigger and I could not find the cause. Now I can see the reasoning why this should be indeed set default to yes. But on the afflicted form I have no validation errors that I am aware of. Normally you would see a red dot with a number somewhere on the form with tabs if there is a validation error. Is there a way to check why Mendix seems to conclude it has validation errors? I now solved the problem by setting the validation to no but I am interested in the root cause why the microflow would not trigger. Regards, Ronald
asked
1 answers
3

Normally, this is what should happen when a server validation error (due to domain model validation rules or microflow validation feedback) occurs:

  • If there are one or more widgets subscribed to validation messages for the attribute and the widget

    • is visible -> show the validation message underneath the widget.
    • is in a non-active, but visible tab -> show the validation message underneath the widget, and show a notification in the tab.
    • is not visible (conditional formatting, ...) -> show a dialog message with the validation message.
  • If there are no subscribers -> show a dialog message with the validation message.

In case of a client validation error (type errors or form validations) a validation message is shown underneath the widget.

It there are validation errors, but no error message is shown either underneath the node or in a dialog, please file a ticket. However, having a validation error for an attribute which can not be edited by the user (because there is no widget showing the attribute, the widget is read-only, or the widget it is not visible) is a situation which should never occur.

If there are server validation errors, you could take a look at the request response with for example Firebug (in the console tab) or the Chrome Developer Tools (in the network tab) to find out what validation errors are preventing the microflow from being called. A red line with a 551 response code in the console indicates a validation error, and the response would be something like this:

{
    "actionResult": "",
    "datavalidation": [{
        "guid": "2533274790395905",
        "errorFields": [{
            "name": "UserName",
            "message": "This user name is already in use."
        }]
    }],
    "instructions": []
}

Where "2533274790395905" is the id of the object, and "UserName" is the attribute.

answered