Search in sources :

Example 1 with AbstractDMODataManagementStrategy

use of org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy in project drools-wb by kiegroup.

the class ScenarioSimulationEditorBusinessCentralWrapper method setCoverageReport.

protected void setCoverageReport(CoverageReportView.Presenter presenter) {
    ScenarioSimulationModel.Type modelType = scenarioSimulationEditorPresenter.getDataManagementStrategy() instanceof AbstractDMODataManagementStrategy ? ScenarioSimulationModel.Type.RULE : ScenarioSimulationModel.Type.DMN;
    SimulationRunMetadata simulationRunMetadata = lastRunResult != null ? lastRunResult.getSimulationRunMetadata() : null;
    presenter.populateCoverageReport(modelType, simulationRunMetadata);
    if (simulationRunMetadata != null && simulationRunMetadata.getAuditLog() != null) {
        presenter.setDownloadReportCommand(() -> onDownloadReportToCsv(scenarioSimulationEditorPresenter.getExportCallBack(), new ScenarioSimulationHasBusyIndicatorDefaultErrorCallback(scenarioSimulationEditorPresenter.getView()), simulationRunMetadata, modelType));
    }
}
Also used : SimulationRunMetadata(org.drools.scenariosimulation.api.model.SimulationRunMetadata) ScenarioSimulationHasBusyIndicatorDefaultErrorCallback(org.drools.workbench.screens.scenariosimulation.client.handlers.ScenarioSimulationHasBusyIndicatorDefaultErrorCallback) AbstractDMODataManagementStrategy(org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy) ScenarioSimulationModel(org.drools.scenariosimulation.api.model.ScenarioSimulationModel)

Example 2 with AbstractDMODataManagementStrategy

use of org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy in project drools-wb by kiegroup.

the class ScenarioSimulationEditorPresenter method setSettings.

public void setSettings(SettingsView.Presenter presenter) {
    Type modelType = dataManagementStrategy instanceof AbstractDMODataManagementStrategy ? Type.RULE : Type.DMN;
    presenter.setEventBus(eventBus);
    presenter.setScenarioType(modelType, model.getSettings(), path.getFileName());
}
Also used : ScenarioSimulationResourceType(org.drools.workbench.screens.scenariosimulation.client.type.ScenarioSimulationResourceType) FactMappingType(org.drools.scenariosimulation.api.model.FactMappingType) Type(org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type) AbstractDMODataManagementStrategy(org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy)

Example 3 with AbstractDMODataManagementStrategy

use of org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy in project drools-wb by kiegroup.

the class ScenarioSimulationEditorPresenter method setCheatSheet.

public void setCheatSheet(CheatSheetView.Presenter presenter) {
    Type modelType = dataManagementStrategy instanceof AbstractDMODataManagementStrategy ? Type.RULE : Type.DMN;
    presenter.initCheatSheet(modelType);
}
Also used : ScenarioSimulationResourceType(org.drools.workbench.screens.scenariosimulation.client.type.ScenarioSimulationResourceType) FactMappingType(org.drools.scenariosimulation.api.model.FactMappingType) Type(org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type) AbstractDMODataManagementStrategy(org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy)

Aggregations

AbstractDMODataManagementStrategy (org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy)3 FactMappingType (org.drools.scenariosimulation.api.model.FactMappingType)2 Type (org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type)2 ScenarioSimulationResourceType (org.drools.workbench.screens.scenariosimulation.client.type.ScenarioSimulationResourceType)2 ScenarioSimulationModel (org.drools.scenariosimulation.api.model.ScenarioSimulationModel)1 SimulationRunMetadata (org.drools.scenariosimulation.api.model.SimulationRunMetadata)1 ScenarioSimulationHasBusyIndicatorDefaultErrorCallback (org.drools.workbench.screens.scenariosimulation.client.handlers.ScenarioSimulationHasBusyIndicatorDefaultErrorCallback)1