private void addActivationGroup( final String activationGroupType ) { final AttributeCol52 attributeCol52 = new AttributeCol52(); attributeCol52.setAttribute( GuidedDecisionTable52.ACTIVATION_GROUP_ATTR ); dtable.getAttributeCols() .add( attributeCol52 ); final int columnIndex = dtable.getExpandedColumns() .indexOf( attributeCol52 ); for ( final List<DTCellValue52> row : dtable.getData() ) { row.add( columnIndex, new DTCellValue52( activationGroupType + " " + dtable.getTableName() ) ); } } }
private void createNewDecisionTables(final Path context, final List<Import> imports, final List<GuidedDecisionTable52> dtables, final ConversionResult result) { if (dtables == null || dtables.isEmpty()) { return; } //Create new assets for Guided Decision Tables for (int iCounter = 0; iCounter < dtables.size(); iCounter++) { //Add imports final GuidedDecisionTable52 dtable = dtables.get(iCounter); for (Import item : imports) { dtable.getImports().addImport(new org.kie.soup.project.datamodel.imports.Import(item.getClassName())); } //Make new resource final String assetName = makeNewAssetName(dtable.getTableName(), guidedDTableType); guidedDecisionTableService.create(context, assetName, dtable, "Converted from XLS Decision Table"); result.addMessage("Created Guided Decision Table '" + assetName + "'", ConversionMessageType.INFO); } }
rm.name = getName(dt.getTableName(), num);
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
@Test public void testBackwardsCompatibility() throws Exception { String xml = loadResource("ExistingDecisionTable.xml"); GuidedDecisionTable52 dt_ = GuidedDTXMLPersistence.getInstance().unmarshal(xml); assertNotNull(dt_); assertEquals("blah", dt_.getTableName()); assertEquals(1, dt_.getMetadataCols().size()); assertEquals(1, dt_.getAttributeCols().size()); assertEquals(2, dt_.getActionCols().size()); assertEquals(1, dt_.getConditions().size()); assertEquals(1, dt_.getConditions().get(0).getChildColumns().size()); assertTrue(dt_.getActionCols().get(1) instanceof ActionSetFieldCol52); ActionSetFieldCol52 asf = (ActionSetFieldCol52) dt_.getActionCols().get(1); assertEquals("foo", asf.getFactField()); assertEquals(false, asf.isUpdate()); }
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
assertNotNull(dt_); assertEquals("blah", dt_.getTableName()); assertEquals(1, dt_.getMetadataCols().size());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat());
caption.setText(model.getTableName()); caption.setX(captionWidth / 2); caption.setY(HEADER_CAPTION_HEIGHT / 2);
caption.setText(model.getTableName()); caption.setX(captionWidth / 2); caption.setY(HEADER_CAPTION_HEIGHT / 2);