Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Exchanging data between constraints
Exchanging data between constraints [message #417749] Wed, 26 March 2008 13:04 Go to next message
Lars Heinemann is currently offline Lars HeinemannFriend
Messages: 37
Registered: July 2009
Member
Hi all,

we are using EMFT Validation to validate our models. My question is:
Is it possible/desirable that constraints exchange data?

I would use it for the following scenario: For a meta model class I have
a constraint with error severity and one with a warning severity. Now I
only want to evaluate and potentially trigger the warning constraint if
the error constraint has not fired. I.e. if the object is not invalid,
it might still get a warning but if it has alreay the error, the warning
message is meaningless and not wanted.

Btw, I don't want to recheck the warning condition in the error
constraint or the other way round.

What do you think?

Cheers,
Lars
Re: Exchanging data between constraints [message #417751 is a reply to message #417749] Wed, 26 March 2008 13:17 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33216
Registered: July 2009
Senior Member
Lars,

You can use the context map as a way to cache information that's shared
by all the constraints during a given validation invocation. But I'm
not sure you can rely much on the order in which constraints are evaluated.


Lars Heinemann wrote:
> Hi all,
>
> we are using EMFT Validation to validate our models. My question is:
> Is it possible/desirable that constraints exchange data?
>
> I would use it for the following scenario: For a meta model class I
> have a constraint with error severity and one with a warning severity.
> Now I only want to evaluate and potentially trigger the warning
> constraint if the error constraint has not fired. I.e. if the object
> is not invalid, it might still get a warning but if it has alreay the
> error, the warning message is meaningless and not wanted.
>
> Btw, I don't want to recheck the warning condition in the error
> constraint or the other way round.
>
> What do you think?
>
> Cheers,
> Lars


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Weird XML Parser error
Next Topic:cross reference to models in other project not resolved
Goto Forum:
  


Current Time: Thu Sep 19 12:31:24 GMT 2024

Powered by FUDForum. Page generated in 0.03605 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top