Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: PeterHeintz on June 01, 2016, 03:19:23 am

Title: Experience with model validation?!
Post 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?
Title: Re: Experience with model validation?!
Post by: PeterHeintz on June 07, 2016, 10:09:21 pm
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?
Title: Re: Experience with model validation?!
Post by: qwerty on June 07, 2016, 11:40:47 pm
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.
Title: Re: Experience with model validation?!
Post by: Geert Bellekens on June 08, 2016, 02:56:56 am
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
Title: Re: Experience with model validation?!
Post by: PeterHeintz on June 08, 2016, 04:57:09 pm
Thank you Geert,
we will try to use that code to find out I EA do not crash after several validation calls.
Title: Re: Experience with model validation?!
Post by: Hoefler1 on June 21, 2016, 09:20:52 pm
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?
Title: Re: Experience with model validation?!
Post by: Geert Bellekens on June 21, 2016, 10:05:48 pm

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
Title: Re: Experience with model validation?!
Post by: Hoefler1 on June 28, 2016, 10:33:48 pm
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?
Title: Re: Experience with model validation?!
Post by: Geert Bellekens on June 29, 2016, 04:22:30 am
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
Title: Re: Experience with model validation?!
Post by: PeterHeintz on July 20, 2016, 04:54:14 pm
Geert,
is there a specific reason why you created your own validation environment, rather than integration your validation algorithms in the Sparx validation framework?