Book a Demo

Author Topic: Model Validation  (Read 4728 times)

carolin.boeckler

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Model Validation
« on: August 06, 2013, 10:53:09 pm »
Hello,

I read something about Model Validation.
I found something for MDG Technologies in mst-file:  <ModelValidation>
 <RuleSet name="MOFRules"/>

But I have no idea where to write my "MOFRules" or how I can create this.

I also find something about Model Validation in C# Extensions.
But here I have the same problem? I don't know how it works.

Does anybody have an example for me?
Or exits a document like "Create your first C# Enterprise
Architect add-in in 10 minutes" for Model Validation?

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Model Validation
« Reply #1 on: August 06, 2013, 11:33:39 pm »
I suspect EA treats MOF similar to OCL: it's doing some syntax checking on the rules but not executing the rules themselves. This is just a stomach feeling. Just check what the help says when you enter MOF. There are 13 topics.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Model Validation
« Reply #2 on: August 07, 2013, 09:13:02 am »
Probably the quickest way to get started with writing add-ins is to download the C# sample from this site. Click "Resources" at the top of this page, then click the "Downloads and Image Library" button, and click the link "C# Extension Template". I think (from memory) that all you have to do is unzip the downloaded file, open the .sln file in your favourite .NET development environment, build and run.

Then, to start writing your own model validation rules, open the help file and go to the page "Model Validation Example" and copy and paste the example code into your C# project. And that's when you can start enjoying yourself... :)
The Sparx Team
[email protected]

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Model Validation
« Reply #3 on: August 07, 2013, 03:04:08 pm »
Hello Caroline,

In the online help 'Model Validation Example' you can find an example.

I myself started from this point.

If you want a complex example with configuration and a lot more drop me a mail.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)