Source:
<code>protected void doDeployBDM(IProgressMonitor monitor) throws InvocationTargetException { if (monitor == null) { monitor = Repository.NULL_PROGRESS_MONITOR; } final BusinessObjectModel bom = fileStore.getContent(); final String progressMessage = progressMessage(bom); monitor.beginTask(progressMessage, IProgressMonitor.UNKNOWN); BonitaStudioLog.debug(progressMessage, BusinessObjectPlugin.PLUGIN_ID); final BOSEngineManager engineManagerEx = getBOSEngineManagerEx(); TenantAdministrationAPI tenantManagementAPI = null; try { tenantManagementAPI = engineManagerEx.getTenantAdministrationAPI(session); if (!tenantManagementAPI.isPaused()) { tenantManagementAPI.pause(); } try { if (dropDBOnInstall()) { tenantManagementAPI.cleanAndUninstallBusinessDataModel(); } else { tenantManagementAPI.uninstallBusinessDataModel(); } } catch (final BusinessDataRepositoryDeploymentException bdrde) { } if (containsBusinessObjects(bom)) { tenantManagementAPI.installBusinessDataModel(fileStore.toByteArray()); } tenantManagementAPI.resume(); if (containsBusinessObjects(bom)) { final byte[] zipContent = tenantManagementAPI.getClientBDMZip(); final Map<String, byte[]> jarContent = retrieveContent(zipContent); updateDependency(jarContent.get("bdm-client")); final Map<String, Object> data = new HashMap<>(); data.put("model", bom); <START> data.put("bdm-dao", jarContent.get("bdm-dao")); <END> eventBroker().post("bdm/deployed", data); } else { removeDependency(); } } catch (final Exception e) { BonitaStudioLog.error(e); try { tenantManagementAPI.uninstallBusinessDataModel(); } catch (final BusinessDataRepositoryDeploymentException e1) { } throw new InvocationTargetException(e); } finally { if (tenantManagementAPI != null && tenantManagementAPI.isPaused()) { try { tenantManagementAPI.resume(); } catch (final UpdateException e) { throw new InvocationTargetException(e); } } if (flushSession && session != null) { engineManagerEx.logoutDefaultTenant(session); session = null; } } }</code><technical_language>need constant bdm-dao is in another class</technical_language>

Target:
protected void doDeployBDM(IProgressMonitor monitor) throws InvocationTargetException { if (monitor == null) { monitor = Repository.NULL_PROGRESS_MONITOR; } final BusinessObjectModel bom = fileStore.getContent(); final String progressMessage = progressMessage(bom); monitor.beginTask(progressMessage, IProgressMonitor.UNKNOWN); BonitaStudioLog.debug(progressMessage, BusinessObjectPlugin.PLUGIN_ID); final BOSEngineManager engineManagerEx = getBOSEngineManagerEx(); TenantAdministrationAPI tenantManagementAPI = null; try { tenantManagementAPI = engineManagerEx.getTenantAdministrationAPI(session); if (!tenantManagementAPI.isPaused()) { tenantManagementAPI.pause(); } try { if (dropDBOnInstall()) { tenantManagementAPI.cleanAndUninstallBusinessDataModel(); } else { tenantManagementAPI.uninstallBusinessDataModel(); } } catch (final BusinessDataRepositoryDeploymentException bdrde) { } if (containsBusinessObjects(bom)) { tenantManagementAPI.installBusinessDataModel(fileStore.toByteArray()); } tenantManagementAPI.resume(); if (containsBusinessObjects(bom)) { final byte[] zipContent = tenantManagementAPI.getClientBDMZip(); final Map<String, byte[]> jarContent = retrieveContent(zipContent); updateDependency(jarContent.get(BDM_CLIENT)); final Map<String, Object> data = new HashMap<>(); data.put(MODEL, bom); data.put(BDM_DAO, jarContent.get(BDM_DAO)); eventBroker().post(BDM_DEPLOYED_TOPIC, data); } else { removeDependency(); } } catch (final Exception e) { BonitaStudioLog.error(e); try { tenantManagementAPI.uninstallBusinessDataModel(); } catch (final BusinessDataRepositoryDeploymentException e1) { } throw new InvocationTargetException(e); } finally { if (tenantManagementAPI != null && tenantManagementAPI.isPaused()) { try { tenantManagementAPI.resume(); } catch (final UpdateException e) { throw new InvocationTargetException(e); } } if (flushSession && session != null) { engineManagerEx.logoutDefaultTenant(session); session = null; } } }