Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » ECP Model Validation before changes commit(Inverting the order of ECP validation process)
ECP Model Validation before changes commit [message #1691944] Fri, 10 April 2015 16:28 Go to next message
Aboubacar Kaba is currently offline Aboubacar KabaFriend
Messages: 9
Registered: March 2015
Junior Member
We have registered custom constraints on our model that is visualized using EMF Forms. The constraints are validated well and the UI is updated accordingly. However this is done after the changes are committed to the model. And it's possible to save the model with the violated constraints. It's even possible to share/push the model with the errors to the shared repo. Which means others can take the model with the errors.

What we want to achieve is to perform validation of the changes BEFORE transaction commit so that in case of constraints violation the transaction is reverted. And as soon as the error is fixed, the transaction is committed.

How can we achieve this?

Thanks.
Re: ECP Model Validation before changes commit [message #1692104 is a reply to message #1691944] Mon, 13 April 2015 13:21 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

what exactly do you mean by "commit"? Commiting the changes to a server
or saving them locally?

Best regards

Jonas

Am 10.04.2015 um 18:28 schrieb Aboubacar Kaba:
> We have registered custom constraints on our model that is visualized
> using EMF Forms. The constraints are validated well and the UI is
> updated accordingly. However this is done after the changes are
> committed to the model. And it's possible to save the model with the
> violated constraints. It's even possible to share/push the model with
> the errors to the shared repo. Which means others can take the model
> with the errors.
>
> What we want to achieve is to perform validation of the changes BEFORE
> transaction commit so that in case of constraints violation the
> transaction is reverted. And as soon as the error is fixed, the
> transaction is committed.
> How can we achieve this?
>
> Thanks.


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: ECP Model Validation before changes commit [message #1692118 is a reply to message #1692104] Mon, 13 April 2015 15:11 Go to previous messageGo to next message
Aboubacar Kaba is currently offline Aboubacar KabaFriend
Messages: 9
Registered: March 2015
Junior Member
Hi Jonas,

What I mean by "commit" is committing the changes locally to the model. The EMF Validation "Live Mode" allows validating a model against live constraints and if there is error, rolls back the transaction. It the kind of "thing" I would like to know with the ECP.

Thanks.
Re: ECP Model Validation before changes commit [message #1692404 is a reply to message #1692118] Wed, 15 April 2015 13:30 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
EMF Models are typically validated based on their state, meaning the
changes are already written into the model. What do you refer to as the
"Live Mode"?

One simple solution would be to create a copy which is then shown in the
form and update the values in the original, once the validation is
successful.

Best regards

Jonas


Am 13.04.2015 um 17:11 schrieb Aboubacar Kaba:
> Hi Jonas,
>
> What I mean by "commit" is committing the changes locally to the model.
> The EMF Validation "Live Mode" allows validating a model against live
> constraints and if there is error, rolls back the transaction. It the
> kind of "thing" I would like to know with the ECP.
>
> Thanks.
>


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:[EMF Forms] Setting up Forms for RAP
Next Topic:How and where can [ECP] I set my CustomLayoutProvider to control tyhe size of the dialogs
Goto Forum:
  


Current Time: Thu Apr 25 09:52:05 GMT 2024

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

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

Back to the top