use of org.drools.workbench.screens.guided.dtable.shared.XLSConversionResultMessage in project drools-wb by kiegroup.
the class GuidedDecisionTableEditorViewImpl method showConversionSuccess.
@Override
public void showConversionSuccess(final Set<XLSConversionResultMessage> infoMessages) {
popupListWidget.clear();
popupListWidget.setTitle(GuidedDecisionTableConstants.INSTANCE.TableConvertedSuccessfully());
popupListWidget.addListMessage(MessageType.INFO, GuidedDecisionTableConstants.INSTANCE.TableConvertedSuccessfully());
for (XLSConversionResultMessage infoMessage : infoMessages) {
popupListWidget.addListMessage(MessageType.INFO, ConversionInfoMessageTranslator.translate(infoMessage));
}
popupListWidget.show();
}
use of org.drools.workbench.screens.guided.dtable.shared.XLSConversionResultMessage in project drools-wb by kiegroup.
the class XLSBuilder method build.
public BuildResult build() {
try {
checkHitPolicy();
makeRuleSet();
makeImports();
makeDeclare();
makeTable();
} catch (final UnsupportedOperationException e) {
return new BuildResult(workbook, new XLSConversionResult(e.getMessage()));
} catch (final Exception e) {
return new BuildResult(workbook, new XLSConversionResult(e.toString() + " : " + e.getMessage()));
}
final XLSConversionResult conversionResult = new XLSConversionResult();
for (final XLSConversionResultMessage notification : notifications) {
conversionResult.addInfoMessage(notification);
}
return new BuildResult(workbook, conversionResult);
}
use of org.drools.workbench.screens.guided.dtable.shared.XLSConversionResultMessage in project drools-wb by kiegroup.
the class XLSBuilderTypesTableTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
final String xml = loadResource(XLSBuilderAttributesNegateTest.class.getResourceAsStream("TypesTable.gdst"));
final GuidedDecisionTable52 dtable = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final XLSBuilder.BuildResult buildResult = new XLSBuilder(dtable, makeDMO()).build();
final Workbook workbook = buildResult.getWorkbook();
final Set<XLSConversionResultMessage> infoMessages = buildResult.getConversionResult().getInfoMessages();
assertEquals(2, infoMessages.size());
Assertions.assertThat(infoMessages).hasSize(2).containsOnlyOnce(new XLSConversionResultMessage(XLSConversionResultMessageType.DIALECT_NOT_CONVERTED, "Dialect is not a supported column type in XLS Decision tables. Conversion ignored this column.")).containsOnlyOnce(new XLSConversionResultMessage(XLSConversionResultMessageType.RULE_NAME_NOT_CONVERTED, "Rule Name column conversion is not supported yet. Conversion ignored this column."));
assertEquals(1, workbook.getNumberOfSheets());
sheet = workbook.iterator().next();
}
Aggregations