Book a Demo

Author Topic: OCL Conformance Rules  (Read 3092 times)

Guerson

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
OCL Conformance Rules
« on: September 11, 2012, 05:31:11 am »
Hi,

I have tried to make a UML Profile in EA Trial with some syntactic rules written in OCL. How can i make this OCL rules ?

These rules, from what I have read, are made within each metaclass on the properties view (Elements->Properties-> Constraints). Is that correct?

Through the OCL Conformance at Model Validation Configuration, i can validated the model against this syntactic rules:

http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/testing/ocl_conformance_element_relati.html

But it seems that is not working properly.

For example: Creating a UML Model (forget about the profile, just a test with UML). Creating a Class (name: Class1), then writing something like:

inv: self.oclIsKindOf(Association)

Does not return an validation error ... Why? The Class created is of type Class, and not Association.

There is other material that i can read about it?

I appreciate your attention,
John

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: OCL Conformance Rules
« Reply #1 on: September 11, 2012, 05:29:09 pm »
EA does only check the syntax of the OCL but it does not execute it.

q.

Guerson

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: OCL Conformance Rules
« Reply #2 on: September 11, 2012, 11:47:45 pm »

so, if EA only check the OCL syntax, actually, OCL violations does not work as they should?

i cannot write any violations rules in OCL? what is the use of only checking the syntax?

thanks for your reply,
John

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: OCL Conformance Rules
« Reply #3 on: September 12, 2012, 06:00:27 pm »
I guess, only Sparx can answer those questions.

q.