Skip to main content



      Home
Home » Modeling » EMF » EMF Validation, RollBack on error
EMF Validation, RollBack on error [message #503225] Fri, 11 December 2009 03:19 Go to next message
Eclipse UserFriend
Hello,

I'm currently using EMF Validation with Java constraints to validate my model.

I'm using Batch and Live mode but it seems that in Live mode if an EMF transaction break a constraint it's automatically rolled back.

Is there a way to disable this behaviour.

Thank you in advance.

[Updated on: Fri, 11 December 2009 03:20] by Moderator

Re: EMF Validation, RollBack on error [message #503237 is a reply to message #503225] Fri, 11 December 2009 09:18 Go to previous messageGo to next message
Eclipse UserFriend
--=-8oeGkpuWeEs5Y+fWp/cx
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Baptiste,

That's the whole point of the integration of validation into the
transaction API: transactions that would violate constraints of ERROR
severity are rolled back so that problems don't occur downstream. If a
live constraint doesn't warrant transaction roll-back, then it should at
most be a WARNING severity. Or, perhaps it shouldn't be live but
instead batch.

However, the API does acknowledge that there may be situations where an
application really needs to perform unvalidated model edits. In that
case, you can apply the Transaction::OPTION_UNVALIDATED to your
transaction, via TransactionalCommandStack::execute(Command, Map) or the
AbstractEMFOperation constructor.

HTH,

Christian


On Fri, 2009-12-11 at 09:19 +0100, Baptiste Mesta wrote:

> Hello,
>
> I'm currently using EMF Validation with Java constraints to validate my model.
>
> I'm using Batch and Live mode but it seems that in Live mode if an EMF transaction break a constraint it's automatically rolled back.
>
> Is there a way to disable this behaviour.
>
> Thank you in advance.

--=-8oeGkpuWeEs5Y+fWp/cx
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Baptiste,<BR>
<BR>
That's the whole point of the integration of validation into the transaction API:&nbsp; transactions that would violate constraints of ERROR severity are rolled back so that problems don't occur downstream.&nbsp; If a live constraint doesn't warrant transaction roll-back, then it should at most be a WARNING severity.&nbsp; Or, perhaps it shouldn't be live but instead batch.<BR>
<BR>
However, the API does acknowledge that there may be situations where an application really needs to perform unvalidated model edits.&nbsp; In that case, you can apply the Transaction::OPTION_UNVALIDATED to your transaction, via TransactionalCommandStack::execute(Command, Map) or the AbstractEMFOperation constructor.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Fri, 2009-12-11 at 09:19 +0100, Baptiste Mesta wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hello,

I'm currently using EMF Validation with Java constraints to validate my model.

I'm using Batch and Live mode but it seems that in Live mode if an EMF transaction break a constraint it's automatically rolled back.

Is there a way to disable this behaviour.

Thank you in advance.
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-8oeGkpuWeEs5Y+fWp/cx--
Re: EMF Validation, RollBack on error [message #503483 is a reply to message #503237] Mon, 14 December 2009 02:33 Go to previous message
Eclipse UserFriend
Thank you for the hint.

I'm in that case, I have disabled live validation for now but i'll try that when needed.


Thanks a lot.
Previous Topic:How to compare dynamic ecore models
Next Topic:Modifying properties view (combo box value)
Goto Forum:
  


Current Time: Fri Jul 04 11:18:53 EDT 2025

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

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

Back to the top