Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Polymorph on May 25, 2017, 08:13:22 pm

Title: Understanding OCL
Post by: Polymorph 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
Title: Re: Understanding OCL
Post by: qwerty 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.
Title: Re: Understanding OCL
Post by: Polymorph 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?
Title: Re: Understanding OCL
Post by: qwerty on May 26, 2017, 12:41:43 am
Likely. There is that build-in model validation stuff from EA (http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/configuring_model_validation.html). I never used it but rather scripted the checks directly. OCL will not help here.

q.