"Business data model not managed by the current BDM" error, BDM possibly not updating
I keep turning up the error, "The business data 'employeeRecords' with the class name 'com.company.model.employeeRecords', is not managed by the current version of BDM" whenever I run my diagram.
In the Help - Bonita Engine Log, the repeating error appears as:
"[date/time] -0700 ERROR: org.hibernate.internal.SessionFactoryImpl HHH000177: Error in named query: employeeRecords.topView
org.hibernate.QueryException: could not resolve property: CRDisclusure of: com.company.model.employeeRecords [SELECT e
FROM com.company.model.employeeRecords e "
I'm a Bonita newbie and have a pretty simple diagram so far (I tried to parallel the tutorial).
I tried changing my BDM attributes to get rid of the multiples I was testing out and fix a few preceding-capital issues, but, interestingly, the Help - Bonita Engine Log still shows the old attribute names being used (ex CRDisclosure instead of crDisclosure), and the Development - Browse Data (H2 Console) still shows the multiple attribute as such. Has my BDM database not been updating, in spite of me resetting it several times? Could this be causing my issue?
When you edit your business data model (BDM) it then needs to be redeployed. The update might be incompatible with the existing data model. So in development environment (i.e. Bonita Studio) it is recommended to "reset" the deployed BDM after doing some modifications. This reset will delete the data and the database tables. You have an option (checkbox) to reset the BDM when you click on the button to validate the BDM edition. You should be able to confirm that reset was successful by checking the tables and columns names using the H2 console.
Editing the BDM definition can also impact your process definition. That's because process definition includes references to the BDM in business variables declaration. You also have reference to the BDM in the business variables default value, in task operations... Usually the update of the BDM is automatically propagated to your process definition. But some limitations might exists. You can search (using the tree view) in your process for the old object or attributes name in order to locate them and rename them to match the BDM definition.
If you need help with that you might share (using Google Drive, Dropbox...) your process (export from Studio as a .bos file).
Thanks for your response. I have tried redeploying/resetting the BDM several times, but the attribute names in the H2 console haven't been updating to match. I tried exiting out of Bonita and reopening it, but it hasn't seemed to make a difference.
What else can I try?
I'm not sure why those changes haven't been applied; I haven't touched the bom.xml file (only the Studio interface) and, like I mentioned, I've reset the database several times.
How do I apply them now?
How do I get the edited .xml file back into Bonita Studio so I can redeploy it? It won't recognize it as a BDM right now so I can't import it that way.
That is much more convenient, thank you.
Alright, I got those changes deployed, but when I try to run my program I still get the same error. Are there other changes I should make to the file? (I want to wait until this can run before I tidy things up and split my attributes into different objects)
Actually, I just checked an found I had made a typo. After fixing it and redeploying, I am now able to run it without the "Business data model not managed by the current BDM" error! Mission accomplished!
Thank you so much for your help! :D
As a final question, do you know why my BDM didn't update those fields automatically and how I might be able to make it do so to avoid this kind of problem in the future?