use of org.uberfire.commons.services.cdi.ApplicationStarted in project drools-wb by kiegroup.
the class AppSetup method assertPlayground.
@PostConstruct
public void assertPlayground() {
try {
configurationService.startBatch();
// Setup mandatory properties for Drools-Workbench
final ConfigItem<String> supportRuntimeDeployConfigItem = new ConfigItem<>();
supportRuntimeDeployConfigItem.setName("support.runtime.deploy");
supportRuntimeDeployConfigItem.setValue("false");
setupConfigurationGroup(ConfigType.GLOBAL, GLOBAL_SETTINGS, getGlobalConfiguration(), supportRuntimeDeployConfigItem);
// Setup properties required by the Work Items Editor
setupConfigurationGroup(ConfigType.EDITOR, WorkItemsEditorService.WORK_ITEMS_EDITOR_SETTINGS, workbenchConfigurationHelper.getWorkItemElementDefinitions());
// Setup test scenario properties
// TODO : get TEST SCENARIO ELEMENT DEFINITIONS
setupConfigurationGroup(ConfigType.EDITOR, ScenarioTestEditorService.TEST_SCENARIO_EDITOR_SETTINGS, getTestScenarioElementDefinitions());
// notify components that bootstrap is completed to start post setups
applicationStartedEvent.fire(new ApplicationStarted());
} catch (final Exception e) {
logger.error("Error during update config", e);
throw new RuntimeException(e);
} finally {
configurationService.endBatch();
}
}
Aggregations