Do not show success message when trying to save a model that contains errors
Currently the admin messages give a wrong impression if a model was successfully saved or not:
I've set up a model with two StartEvents, one Task, and saved. After that I've added two Flows. each with the Tamper: Find replace REGEX template. If i save the model i get the admin notices shown in the screenshot above. From a usability standpoint those messages are misleading. The overall dominant message is the green status message "successfully saved the model". Me as a user assume, in case i even read any further after i'Ve scanned the first green status message that the model was successfully saved, that i could tackle the two errors at a later point, and the other changes to the model are applied and saved. but as i've initially learned in here https://www.drupal.org/project/bpmn_io/issues/3302271 as soon as the action mentioned is in and isn't properly set up no changes are saved at all in general. Which is a potential source for data loss for the user in the worst case.
Proposed resolution
- Remove the "successfully saved the model" status message.
- Perhaps unify the admin notice into a single message? A suggestion for the error text could be:
singular:
Error message
The model could not be saved. The following problem that prevents saving needs your attention:
- action "Tamper": Find replace REGEX" (Flow_1vue8i3): Invalid regular expression.
plural:
Error message
The model could not be saved. The following problems that prevent saving need your attention:
- action "Tamper": Find replace REGEX" (Flow_1vue8i3): Invalid regular expression.
- action "Tamper": Find replace REGEX" (Flow_1fx5wc2): Invalid regular expression.