update daysAvailableCounter vacation Request

Hello everybody
anyone can help me pleeease , in leave request when I do the first one a leave request the currentbalance(daysAvailable) updated but the second one back to the daysAvailableInitial
For exemple daysInitialValue = 60
new request( NbreDays=5 ) → daysAvailableCounter:60-5=55
second request (NbreDays = 3)–> daysAvailableCounter 60-3=57 shoud be do daysAvailableCounter 55-3= 52
thanks in advance
this is my process.bos
https://www.dropbox.com/home?preview=DemandeConges-19.0.bos

There is an issue with the logic of your program, you are:

either not saving 55 into the record correctly, or
you are getting the wrong record

something you need to walk through very carefully, understand and fix yourself. I don’t have a couple of free hours to do this, sorry.

@ Sean MCP I speak about the official exemple of bonita vacation management example

You mean this one?

https://github.com/Bonitasoft-Community/vacation-management-example

If there is a problem with it you should create an issue on the Github page for the example here

Bonitasoft support this example to ensure customers can use it.

regards

it is resolved . an error in the code of official example
while ((currentlyExistingVacationAvailable = VacationAvailableDAO.find(offset, increment)).size() > 0) {
for (VacationAvailable va : currentlyExistingVacationAvailable) {
// Update the list of user ids for user who already have an associated VacationAvailable object
alreadyKnownEmployeeId.add(va.bonitaBPMId)
// Reset the vacation available counter
va.daysAvailableCounter = daysAvailableInitialValue

==>
while ((currentlyExistingVacationAvailable = VacationAvailableDAO.find(offset, increment)).size() > 0) {
for (VacationAvailable va : currentlyExistingVacationAvailable) {
// Update the list of user ids for user who already have an associated VacationAvailable object
alreadyKnownEmployeeId.add(va.bonitaBPMId)
// Reset the vacation available counter
va.daysAvailableCounter = va.getDaysAvailableCounter()