Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Validation rule on root
Validation rule on root [message #1407383] Tue, 12 August 2014 13:34 Go to next message
Emmanuel Billaud is currently offline Emmanuel BillaudFriend
Messages: 3
Registered: August 2014
Junior Member
Hello,

I would like to validate the root element of my diagram (domain class). But, when I write my semantic validation rule on the root declared using the target class attribute, the rule is not triggered when I launch the validation command.

<?xml version="1.0" encoding="UTF-8"?>
<description:Group xmi:version="2.0" [...]>
  <ownedViewpoints name="name" label="label" modelFileExtension="ext">
    <ownedRepresentations xsi:type="description_1:DiagramDescription" name="diagram" label="label_diag" initialisation="true" domainClass="ext.Root">
      </validationSet>
        <ownedRules xsi:type="validation:SemanticValidationRule" level="ERROR" message="Wrong value" targetClass="ext.Root">
          <audits auditExpression="[self.attribute <= 30/]"/>
        </ownedRules>
      </validationSet>
[...]


The other semantic rules that I have defined for the children of such root elementare however triggered.

When I add a mapping (container) corresponding to my root, as told here, the rule is taken into account; but I don't want to display my root element since I have no graphical need for it.
I did not find any information on the documentation.

Is this behaviour intended? (i.e. to not be able to validate the root of the document if not graphically displayed?)
Re: Validation rule on root [message #1407421 is a reply to message #1407383] Tue, 12 August 2014 14:53 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Emmanuel,

This seems a bug, could you raise a bugzilla with a scenario and project
sample to reproduce?

Best Regards.

Le 12/08/2014 16:02, Emmanuel Billaud a écrit :
> Hello,
>
> I would like to validate the root element of my diagram (domain class).
> But, when I write my semantic validation rule on the root declared using
> the target class attribute, the rule is not triggered when I launch the
> validation command.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <description:Group xmi:version="2.0" [...]>
> <ownedViewpoints name="name" label="label" modelFileExtension="ext">
> <ownedRepresentations xsi:type="description_1:DiagramDescription"
> name="diagram" label="label_diag" initialisation="true"
> domainClass="ext.Root">
> </validationSet>
> <ownedRules xsi:type="validation:SemanticValidationRule"
> level="ERROR" message="Wrong value" targetClass="ext.Root">
> <audits auditExpression="[self.attribute <= 30/]"/>
> </ownedRules>
> </validationSet>
> [...]
>
>
> The other semantic rules that I have defined for the children of such
> root elementare however triggered.
>
> When I add a mapping (container) corresponding to my root, as told
> https://www.eclipse.org/forums/index.php/mv/msg/796347/1404167/#msg_1404167,
> the rule is taken into account; but I don't want to display my root
> element since I have no graphical need for it.
> I did not find any information on the
> http://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#validation.
>
>
> Is this behaviour intended? (i.e. to not be able to validate the root of
> the document if not graphically displayed?)


--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Validation rule on root [message #1407528 is a reply to message #1407421] Tue, 12 August 2014 21:00 Go to previous messageGo to next message
Emmanuel Billaud is currently offline Emmanuel BillaudFriend
Messages: 3
Registered: August 2014
Junior Member
Hello Esteban,

thank you for your quick reply! Bug-report at https://bugs.eclipse.org/bugs/show_bug.cgi?id=441642

Best regards.
Re: Validation rule on root [message #1407729 is a reply to message #1407528] Wed, 13 August 2014 10:03 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Thanks for the report and I confirm the bug.

Best Regards.

Le 12/08/2014 23:00, Emmanuel Billaud a écrit :
> Hello Esteban,
>
> thank you for your quick reply! Bug-report at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=441642
>
> Best regards.


--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Validation rule on root [message #1453420 is a reply to message #1407729] Sun, 26 October 2014 23:57 Go to previous message
János Czentye is currently offline János CzentyeFriend
Messages: 1
Registered: October 2014
Junior Member
Hello,

i experienced exactly the same error, when i tried to validate a root element in a semantic vaidation rule, with the same terms and result.
- The semantic root element had no graphical representation.
- No error entry showed in the error window.

For a try, i set an audit with the expression: [false/]. The result was the same.
When i define a validation rule on a non-root element, the rule triggers correctly.

Regards,
János

ui: I'm using Sirius v1.0.1.201408121314
Previous Topic:"Edge Creation" tool with external Nodes
Next Topic:[ANN] Sirius 2.0.0
Goto Forum:
  


Current Time: Tue Apr 23 16:45:46 GMT 2024

Powered by FUDForum. Page generated in 0.03432 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top