Book a Demo

Author Topic: Model Validation - OCL? + Solution  (Read 9007 times)

TheVampyre

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Model Validation - OCL? + Solution
« on: October 01, 2018, 10:45:36 pm »
Hi All,

Problem: My team and I currently create data models, that can have a number of classes and attributes, which we then export from EA to Eclipse in order to produce schema. Our issue is that we need to check our data models which can be created manually or by import for things such as trailing and/or leading spaces(or some customised checker, we can configure). So that we do not have these carried through into our schema.

Research: I have browsed various disucssion boards and examples saying that you can produce an 'Add-in' for EA to include things like OCL. I have also seen comments denying this and saying you have to code in these rules.

Ask: Can someone please confirm or deny the use of OCL in EA and tell me the best way we can use a module or set of scripting to check multiple models from a base principle please ? If this is not possible, give a solution to how this validation of data models can be done.

Many thanks in advance

D


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Model Validation - OCL? + Solution
« Reply #1 on: October 01, 2018, 11:07:54 pm »
EA does (if at all) only syntax checking of eventually provided OCL. But it does not execute it. AFAIK there are only academic tools for using OCL. Never saw something in concrete projects.

What I did in the past was to write a (lengthy) script to check model rules and take according actions.

q.

TheVampyre

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Model Validation - OCL? + Solution
« Reply #2 on: October 01, 2018, 11:15:22 pm »
Hi @Qwerty,

Thanks for that, so i will take it that currently OCL is a no go in EA.

In your experience of writting scripting, where was this is EA? and could this be used as a standard or did it have to be modified with each check?

We are really looking for some kind of validsating module we can create to check for mistakes and human error.

Many thanks in advance

D


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Model Validation - OCL? + Solution
« Reply #3 on: October 01, 2018, 11:16:54 pm »
We have developed our own add-in that dynamically loads SQL queries to validate a model.

I have not yet "officially" released it, but the code can be found here: https://github.com/GeertBellekens/Enterprise-Architect-Toolpack/tree/master/EAValidationFramework

Geert

TheVampyre

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Model Validation - OCL? + Solution
« Reply #4 on: October 01, 2018, 11:26:42 pm »
Thanks @Geert, I'll take a look.

And i take it that this has had a good success rate?

How do you load in the SQL queries? (Sorry, i am a bit of a newb)

Many thanks

D

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Model Validation - OCL? + Solution
« Reply #5 on: October 01, 2018, 11:54:23 pm »
Thanks @Geert, I'll take a look.

And i take it that this has had a good success rate?

How do you load in the SQL queries? (Sorry, i am a bit of a newb)

Many thanks

D

Our users are very happy with the tool. We have already implemented more then 100 rules, and thanks to the SQL approach the performance is still acceptable.

We put the queries in xml files that are stored on a shared drive.
If you PM me I can provide you with some example sql queries and an installer to get you started

Geert

TheVampyre

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Model Validation - OCL? + Solution
« Reply #6 on: October 02, 2018, 12:02:12 am »
Thanks Geert,

i'll drop you a message, much obliged.

D