|
Re: EMF Validation, RollBack on error [message #503237 is a reply to message #503225] |
Fri, 11 December 2009 14:18 |
|
--=-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: 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.<BR>
<BR>
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.<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--
|
|
|
|
Powered by
FUDForum. Page generated in 0.02889 seconds