Cant Update BDM values inside a Process Operation

1
0
-1

Hi
I have table which stores all the Employee Data like name, Email, phone no etc.
My Goal is edit and modify data like Phone number or email for a particular employee in my table.
As I understand, we can edit or modify records only inside a process using the Operations section.
For POC purpose , I have a Saved the persistence version for a particular record like 40 inside a variable.
Now using the Query parameter, I am using the findByPersistenceId to load the particular instance of the table.
As I check the Context inside a form, I can see the particular record corresponding to persistence id 40 is loaded in the context.
Now i am modifying the Existing value and passing the new values through formOutput.
In the operation Section, on the Left hand section, i have the table object, and in the middle I have the column name and right hand side has the contract value.
But i am getting an error. I am not able to change the value at all.
Below are the Error logs. Kindly suggest where I am going Wrong.
{"exception":"class org.bonitasoft.engine.bpm.flownode.FlowNodeExecutionException","message":"USERNAME=walter.bates | org.bonitasoft.engine.transaction.STransactionCommitException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback"}

1 answer

1
+2
-1
This one is the BEST answer!

Ok, Very Silly of me. I found the Problem and the answer.

Bonita has a column called Persistence Version. Every time a record is updated, the persistence version is incremented by 1.
I made the mistake of keeping my persistence version column as null for all the records.
Hence updation was not working.
After I introduced integer values in the column and tried again, it worked.
Records were updated and persistence version column was updated by 1.

Regards

Notifications