|
|
|
Re: Live Validation: Undo, if constraint is violated [message #424331 is a reply to message #424325] |
Thu, 23 October 2008 11:02 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Bernd,
An operation is one or more changes. The notation
rollback-if-constraints-are-violated is exactly what the transaction
APIs support.
Bernd Mühlböck wrote:
> It should just undo the last operation. That would be enough for me.
> Maybe there is a way to use the OperationHistory.
>
>
> Cheers,
> Bernd
>
>
> Ed Merks wrote:
>> Bernd,
>>
>> The transaction APIs support the notion of rollback. So typically a
>> constraint would be checked after a set of changes, and if the
>> constraints are violated, the entire set of changes is rolled back to
>> the preceding valid state.
>>
>>
>> Bernd Mühlböck wrote:
>>> How can I undo the last action (e.g. add an element) if a live
>>> constraint is violated. I am using OCL constraints defined in the
>>> plugin.xml.
>>>
>>> Thanks,
>>> Bernd
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03314 seconds