Author Topic: Experience with model validation?!  (Read 6876 times)

PeterHeintz

  • EA User
  • **
  • Posts: 967
  • Karma: +58/-18
    • View Profile
Experience with model validation?!
« 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?
Best regards,

Peter Heintz

PeterHeintz

  • EA User
  • **
  • Posts: 967
  • Karma: +58/-18
    • View Profile
Re: Experience with model validation?!
« Reply #1 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?
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Experience with model validation?!
« Reply #2 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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Experience with model validation?!
« Reply #3 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

Geert

PeterHeintz

  • EA User
  • **
  • Posts: 967
  • Karma: +58/-18
    • View Profile
Re: Experience with model validation?!
« Reply #4 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.
Best regards,

Peter Heintz

Hoefler1

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Experience with model validation?!
« Reply #5 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Experience with model validation?!
« Reply #6 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

Hoefler1

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Experience with model validation?!
« Reply #7 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Experience with model validation?!
« Reply #8 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

PeterHeintz

  • EA User
  • **
  • Posts: 967
  • Karma: +58/-18
    • View Profile
Re: Experience with model validation?!
« Reply #9 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?
Best regards,

Peter Heintz