Doubt to modeling of attributes type Date in OCL



Doubt to modeling of attributes type Date in OCL

From: Geoflávia Guilarducci de Alvarenga <geoflavia_at_hotmail.com>
Date: Sat, 22 Jul 2006 14:18:59 -0300
Message-ID: <BAY111-F15C0F0B91B7B7ECDD37C68B7670@phx.gbl>
How modeling constraints about attributes type Date in OCL?

I am studying the book: “The Object Constraint Language Second Edition - 
Getting your Models ready will be MDA” .  I am testing the examples of the 
diagram “royals_and_loyals.zargo”.
In this diagram has the datatype “Date”. During the tests, I came across 
myself with some inconsistencies. For example: the constraint:
“context CustomerCard inv checkDates: validFrom.isBefore (validThru)” was 
not compiled
by the tool ARGO-UML.   It returns the following error: “Type checking 
failed: non-query operations cannot be used in OCL expressions”.

Somebody could help me?
Received on Sat 22 Jul 2006 - 18:19:35 BST