Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: André Ribeiro on May 21, 2013, 11:52:06 pm
-
Hi everyone,
I've been developing an EA Add-in which performs a model validation of some custom rules. Now I would like to check if the validation succeeded (without errors or warnings). My idea is to perform this check in the "EA_OnEndValidation" method, but I don't know where this information is stored. Can anyone help me out?
Many thanks! :)
-
André,
At a first glance it doesn't look like you have access to the results of the model validation.
I think the results are written to the system output only, no to the database, and I haven't seen any functions to read the system output completely (only a line when clicked or doubleclicked)
Geert
-
Hi,
a year ago I wrote an EA validation. If I remember right I used an Example of the EA documentation. It wasn't just writing a single function. It's more a framework for rules organized in categories and more...
If you follow the rules you can add your own rules and categories.
Have a look in the EA documentation and resources. If you can't find anything I can send you my pretty complex validation or search for myself. Just ask.
Best regards,
Helmut
-
Hello André,
I've found the example.
- Go into the EA help (F1)
- Search
- Select search for subject/title or so
- Search item is "Model Validation Example"
There you find an example.
Best regards,
Helmut
-
Hi everyone,
I've already solved my problem in a dummy way.
I've used a boolean that I set to false each time my custom rules are not respected.
Then in the end of the validation (EA_OnEndValidation method) I check its value: if true no errors occurred.
I've also reset the boolean to true in the EA_OnInitializeUserRules method.
Anyway thank you for the answers.
-
André,
I would be nice for the next user that has this issue and find this topic, that you describe what you did to solve the problem.
Geert