Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: PeterHeintz on June 01, 2016, 03:19:23 am
-
A student writes for me a plugin to do model validation.
Currently we have the problem that after repeating the same validation several times we get exceptions or EA even crashes.
So far we did a lot to localize the problem, but there seem to be no rule when the problem occurs (EA just stops calling our rules).
Some ideas or experience on that?
-
I try to rephrase this.
Is anyone using the model validation with own written non-primitive validation rules?
If so, does it work without problems?
-
I seem to remember some threads where people discuss the use of validation (using it on their own). For myself I found it easier to implement validation on a rule set which can be programmed somehow. So I simply used the API to do the checks which were needed. If you implement it in a smart way you can even define rule sets on an abstract level (like some OCL syntax).
q.
-
I've written both validation tools as as add-in as as a set of scripts.
The scripts can be found here: https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/tree/master/Framework/ModelValidation (https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/tree/master/Framework/ModelValidation)
Geert
-
Thank you Geert,
we will try to use that code to find out I EA do not crash after several validation calls.
-
Hello Geert,
I want to use your VBScript-Library for Model Validation.
But I am missing the 'Atrias Rules' in the Include.vbs (line 10). Where does this come from?
-
https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/tree/master/Projects/Project%20A/A%20Rules
But you can move all rules to a single group and include them individually as well.
Geert
-
I was now able to build a small test rule using your VBScript-Lib.
It works when you just run the script, but unfortunately I always get an error when debugging step by step in EA. It says "Class undefined: 'validationResult' " in 'Rule_BPANotSynchronized.vbs' line 53... however this does not happen when executing without debugging.
Don't you experience this issue? And what might be the reason?
-
Must be an issue with the order in which it includes the different scripts.
The strange thing is that I usually only have these kind of issues when running the script, but never when debugging :-\
Can probably be solved by adding all the code to a single script.
Geert
-
Geert,
is there a specific reason why you created your own validation environment, rather than integration your validation algorithms in the Sparx validation framework?