Hello,
sounds like extreme customization, the thing that I like
you can try to achieve this in this way (i have no code examples at this moment, so check syntax twice):
- publish z_lock attribute;
- mod file could be:
MODIFY <factory> PRE_VALIDATE z_lock_obj(z_lock) 1337 FILTER((z_lock{}) || EVENT("UPDATE"));
- spl:
<factory>::z_lock_obj(...) {
int prev_lock, new_lock;
prev_lock = argv[2];
new_lock = argv[3];
if ( (prev_lock == new_lock) && (new_lock == 1) ) {
set_error(1);
set_return_data("Unable to modify locked object");
retrun;
} else {
logf(SIGNIFICANT, "Changing object %s lock {%d > %d}", persistent_id, old_lock, new_lock);
}
}
Regards,
Timur