Community
Participate
Working Groups
How to reproduce Create a validation from the viewpoint root in the .odesign Create a new semantic validation rule and select a target class present in your model.. Create a new Audit and make it possible to be false on your model. (personnally used aql:false) Open your model "your.model" right click in it, and select validate. No error is shown.
Hi Cyril, When you write "open you model", do you mean opening it with a tree editor (the sample reflective Ecore editor or the one generated from you gen model) ? Note that the validation rule [1] defined in a .odesign will only be called when you use the Validate diagram action from a Sirius diagram when the Viewpoint providing the rue is enabled. Regards Maxime [1] Validatin rule in the Diagram specifier guide: https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#validation
Validation rule documentation in the Diagram Specifier guide should be updated to indicate that the rules are triggered only from the Validate diagram action.
I keep the bugzilla untriaged for the moment. We know the documentation should be improved, but we need the answer from Cyril to check that we well understand his reproduction steps.
(In reply to Maxime Porhel from comment #3) > I keep the bugzilla untriaged for the moment. > We know the documentation should be improved, but we need the answer from > Cyril to check that we well understand his reproduction steps. First I didn't validate on a diagram but on my default model representation (the one the *.aird file is based on). But I don't get a trigger even with a dummy diagram. Plus, a nice to have would be to be able to validate from a table -especially since you can use table lines on view validation tests-.
Created attachment 267866 [details] Reproduction case
The semantic validation rule will be triggered if you validate a diagram which contains diagram elements whose type corresponds to the semantic rule domain class. See the attached sample zip. Steps to reproduce: . Get the sample project from the attached zip . Open the session by double clicking the aird file (the project does not have the modeling nature, the sesison is controlled by the aird file) . Open the two diagrams . Click on the Validate diagram action from the diagram on the root package: no error as there is no class in it . Click on the Validate diagram action from the diagram on p2: the validation rule is triggered, and a decorator appears on the EClass. . Open the tables: there is no validate action. This works as designed. I move the bugzilla as triaged but switch it from a bug to a feature request (enhancement) it should be great if the validation defined in the VSM could be used from the table editor / tree editor and from the future aird editor. Nevertheless, it's not yet in the scope of a future release.