Author Topic: Understanding OCL  (Read 5596 times)

Polymorph

  • EA User
  • **
  • Posts: 133
  • Karma: +4/-0
    • View Profile
Understanding OCL
« on: May 25, 2017, 08:13:22 pm »
I'm interesting in writing OCL expressions to help me apply my own model validation rules to my custom MDG Technology...

Can anyone recommend any good resources to help me get started? I have found a few generic tutorials on OCL on the web which explain the syntax. But I am not really sure how I actually use them in EA. Does anyone know of any tutorials that show how it can be used?

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Understanding OCL
« Reply #1 on: May 25, 2017, 10:08:24 pm »
Actually you can't really use it in EA. EA does not compile/run OCL but roughly checks its syntax. There's almost nothing out there to really work with OCL, except for some academic research (I looked about one year ago or so).

q.

Polymorph

  • EA User
  • **
  • Posts: 133
  • Karma: +4/-0
    • View Profile
Re: Understanding OCL
« Reply #2 on: May 26, 2017, 12:11:37 am »
So, if I want to add checks to my MDG that ensure that when I create a model element it has the correct types of relationship to other model elements (for example) how can I do it? Are we talking about scripts?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Understanding OCL
« Reply #3 on: May 26, 2017, 12:41:43 am »
Likely. There is that build-in model validation stuff from EA. I never used it but rather scripted the checks directly. OCL will not help here.

q.