Re: Doubt to modeling of attributes type Date in OCL



Re: Doubt to modeling of attributes type Date in OCL

From: Anneke Kleppe <a.kleppe_at_klasse.nl>
Date: Mon, 07 Aug 2006 11:05:28 +0200
Message-ID: <44D70258.7030802@klasse.nl>
Hello Geoflávia,

Because the Date class is not in the standard OCL library, you have to 
include it in the model by hand. Apparantly, you have done that in your 
Argo model. The only thing that you still need to adjust in your model 
is to indicate that all operations of this Date class are query operations.

I hope this helps,
Anneke Kleppe

Geoflávia Guilarducci de Alvarenga wrote:

> 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?
>
>
>
>
>
> To remove yourself from this list please mail 
> puml-list-request@cs.york.ac.uk
> with a message containing the word "unsubscribe".
>
>
>
Received on Mon 07 Aug 2006 - 10:05:33 BST