Learn OCL
No edit summary
No edit summary
Line 19: Line 19:
MDriven relies heavily on OCL and is a very powerful tool to describe constraints, actions, and transformations in your model.
MDriven relies heavily on OCL and is a very powerful tool to describe constraints, actions, and transformations in your model.


[[OCL Expressions|'''OCL expression''']] must be without side effects. It is a query language and as such, it is not expected to change data as the language is applied. In MDriven, we do however want to change data when appropriate. We use the same syntax as OCL in something we call [[EAL – ExtendedActionLanguage.|'''EAL – ExtendedActionLanguage.''']]
[[OCL Expressions|'''OCL expression''']] must be without side effects. It is a query language and as such, it is not expected to change data as the language is applied. In MDriven, we do however want to change data when appropriate. We use the same syntax as OCL in something we call [[EAL – ExtendedActionLanguage.|'''EAL – Extended Action Language.''']]


==== [[OCLps|'''OCLps''']] ====
==== [[OCLps|'''OCLps''']] ====

Revision as of 09:25, 12 January 2023


What is Object Constraint Language?

The Object Constraint Language (OCL) is a declarative language used for describing rules that apply to Unified Modeling Language (UML) models developed at IBM and now part of the UML standard. Initially, OCL was only a formal specification language extension to UML. OCL may now be used with any Meta-Object Facility (MOF) Object Management Group (OMG) meta-model, including UML. The Object Constraint Language is a precise text language that provides constraint and object query expressions on any MOF model or meta-model that cannot otherwise be expressed by diagrammatic notation. OCL is a key component of the new OMG standard recommendation for transforming models, the Queries/Views/Transformations (QVT) specification.

Learn more with ☛ OCL Video Tutorials

Different ways MDriven relies on OCL:

  • As a constraint definition of a class
  • As a description of the derivation rule on derived attributes
  • As a description of the derivation of derived associations
  • As ViewModel columns and Nesting definitions
  • As definitions for Visible and Enable state for ViewModel columns
  • As an expression of style information on ViewModel columns
  • As an expression for object presentation of classes
  • As Action Enable expression
  • As State machine Guards

MDriven relies heavily on OCL and is a very powerful tool to describe constraints, actions, and transformations in your model.

OCL expression must be without side effects. It is a query language and as such, it is not expected to change data as the language is applied. In MDriven, we do however want to change data when appropriate. We use the same syntax as OCL in something we call EAL – Extended Action Language.

OCLps

Seeking the database with OCLps

OCLOperators

Certain important constructs

Methods

More articles:

Unique constraints on 1 to 1 links

GuardConstraints

ClassFromString

Understanding OCL with reference to SQL

Custom types and custom operations in OCL

A few words on linq

OCL by example


This page was edited 88 days ago on 02/14/2024. What links here