Quantcast
Channel: SCN: Message List - BOPF Application Framework
Viewing all articles
Browse latest Browse all 726

Re: BOPF and shared locks

$
0
0

Hello Daniel,

there are different solutions possible, here is one.

 

I assume that the parallel processes do not modify the BO instances itself while executing the assignment:

 

Use an action validation on SAVE or a consistency validation contained in a save preventing consistency group. In this validation, you can implement a check, if the instance is assigned to a "sent" bundle and if a parallel process is transmitting the bundle at the moment (you could use an own separat enqueue object for that task that is locked/unlocked by the batch processes). In that case you prevent the save of the transaction by putting the IT_KEY into ET_FAILED_KEY of the validation implementation and raise an error message (e.g. "Modifications are not allowed due to assignment phase").

 

However to avoid that the user loses the already maintained data when he saves the transaction and gets angry, a property determination allows to inform him upfront by disabling all actions and modifications (so that all fields are displayed readonly). Thereto you can reuse the checking logic you have implementend in the validation. That validation is still required as some consumers might not care about properties at all (e.g. a different background job).

 

A further solution would be to redefine BOPF's locking behavior, however the solution above is more "standard" compliant.

 

Best regards
Tilmann


Viewing all articles
Browse latest Browse all 726

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>