Bug 515046 - Semantic validation unresponsive with aql audit on viewpoint root
Summary: Semantic validation unresponsive with aql audit on viewpoint root
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 4.1.1   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-04-10 12:07 EDT by Cyril Osdoit CLA
Modified: 2017-04-20 04:49 EDT (History)
2 users (show)

See Also:


Attachments
Reproduction case (2.96 KB, application/zip)
2017-04-20 04:05 EDT, Maxime Porhel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril Osdoit CLA 2017-04-10 12:07:03 EDT
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.
Comment 1 Maxime Porhel CLA 2017-04-18 05:25:13 EDT
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
Comment 2 Maxime Porhel CLA 2017-04-18 05:26:26 EDT
Validation rule documentation in the Diagram Specifier guide should be updated to indicate that the rules are triggered only from the Validate diagram action.
Comment 3 Maxime Porhel CLA 2017-04-18 05:41:30 EDT
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.
Comment 4 Cyril Osdoit CLA 2017-04-19 03:46:07 EDT
(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-.
Comment 5 Maxime Porhel CLA 2017-04-20 04:05:01 EDT
Created attachment 267866 [details]
Reproduction case
Comment 6 Maxime Porhel CLA 2017-04-20 04:49:42 EDT
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.