use of org.drools.workbench.screens.scenariosimulation.businesscentral.client.editor.strategies.BusinessCentralDMODataManagementStrategy in project drools-wb by kiegroup.
the class ScenarioSimulationEditorBusinessCentralWrapper method getModelSuccessCallbackMethod.
protected void getModelSuccessCallbackMethod(ScenarioSimulationModelContent content) {
// Path is set to null when the Editor is closed (which can happen before async calls complete).
if (versionRecordManager.getCurrentPath() == null) {
return;
}
scenarioSimulationEditorPresenter.setPackageName(content.getDataModel().getPackageName());
resetEditorPages(content.getOverview());
DataManagementStrategy dataManagementStrategy;
if (ScenarioSimulationModel.Type.RULE.equals(content.getModel().getSettings().getType())) {
dataManagementStrategy = new BusinessCentralDMODataManagementStrategy(oracleFactory);
} else {
dataManagementStrategy = new BusinessCentralDMNDataManagementStrategy(dmnTypeService, scenarioSimulationEditorPresenter.getEventBus());
}
dataManagementStrategy.manageScenarioSimulationModelContent(versionRecordManager.getCurrentPath(), content);
ScenarioSimulationModel model = content.getModel();
if (dataManagementStrategy instanceof BusinessCentralDMODataManagementStrategy) {
importsWidget.setContent(((BusinessCentralDMODataManagementStrategy) dataManagementStrategy).getOracle(), model.getImports(), isReadOnly);
addImportsTab(importsWidget);
}
baseView.hideBusyIndicator();
scenarioSimulationEditorPresenter.getModelSuccessCallbackMethod(dataManagementStrategy, model);
setOriginalHash(scenarioSimulationEditorPresenter.getJsonModel(model).hashCode());
}
Aggregations