how to load data from the database?

Hi everyone
I’m trying to work with engine API to work with my processes, and I don’t want to use REST API, so I need to know how can I export my DAO file from the Bonita studio and import it into my java project to work with it?

should I implement the DAO class myself?

Hi,

You can use the generated DAO and Model jars that are build after every BDM update.

You can find these jars on your install folders, for example :
C:\BonitaBPMSubscription-7.5.4\workspace\tomcat\server\temp\bonita_portal\tenants\1\bdm\701
You’ll find :

  • bdm-dao.jar
  • bdm-model.jar
  • bom.zip
  • javassist-3.18.1-GA.jar

Cheers

Hi
Thanks for your reply, but I needed to know how to gain DAO classes and I found that The below code could help me to gain the DAO classes and the .jar files which you have mentioned:

TenantAdministrationAPI tenantAdministrationAPI = TenantAPIAccessor.getTenantAdministrationAPI(apiSession);

File file = new File(“D:/Rabiei/BPM/Bonita/BDM/bdmClient.zip”);

FileUtils.writeByteArrayToFile(file, tenantAdministrationAPI.getClientBDMZip());

and when I got this .jar files then I can use them by below code to find my required data:

BusinessObjectDAOFactory daoFactory = new BusinessObjectDAOFactory();
daoFactory.createDAO(apiSession, forExample.class);