@Test public void testOtherwiseEmptyValue() throws Exception { addRow(1, "John", false); addRow(2, "", false); addRow(3, null, true); model.setData(data); String source = service.getSource(path, model); assertTrue("Expected: name not in ( \"John\", \"\" )", source.contains("$p : Person( name not in ( \"John\", \"\" )")); }
@Override public String getSource(final Path path, final GuidedDecisionTable52 model) throws SourceGenerationFailedException { try { final String dslr = GuidedDTDRLPersistence.getInstance().marshal(model); final Expander expander = getDSLExpander(path); final String drl = expander.expand(dslr); return drl; } catch (Exception e) { throw new SourceGenerationFailedException(e.getMessage()); } }
GuidedDecisionTableSourceService extends BaseSourceService<GuidedDecisionTable52> { @Override public String getSource(final Path path, final GuidedDecisionTable52 model) throws SourceGenerationFailedException { try { final String dslr = GuidedDTDRLPersistence.getInstance().marshal(model); final Expander expander = getDSLExpander(path); final String drl = expander.expand(dslr); return drl; } catch (Exception e) { throw new SourceGenerationFailedException(e.getMessage()); } } }
GuidedDecisionTableSourceService extends BaseSourceService<GuidedDecisionTable52> { @Override public String getSource(final Path path, final GuidedDecisionTable52 model) throws SourceGenerationFailedException { try { final String dslr = GuidedDTDRLPersistence.getInstance().marshal(model); final Expander expander = getDSLExpander(path); final String drl = expander.expand(dslr); return drl; } catch (Exception e) { throw new SourceGenerationFailedException(e.getMessage()); } } @Inject  GuidedDecisionTableSourceService(final GuidedDTableResourceTypeDefinition resourceType,
                                            final GuidedDecisionTableEditorService guidedDecisionTableEditorService,
                                            final @Named("ioStrategy") IOService ioService,
                                            final FileDiscoveryService fileDiscoveryService,
                                            final KieModuleService moduleService); }
GuidedDecisionTableSourceService extends BaseSourceService<GuidedDecisionTable52> { @Override public String getSource(final Path path, final GuidedDecisionTable52 model) throws SourceGenerationFailedException { try { final String dslr = GuidedDTDRLPersistence.getInstance().marshal(model); final Expander expander = getDSLExpander(path); final String drl = expander.expand(dslr); return drl; } catch (Exception e) { throw new SourceGenerationFailedException(e.getMessage()); } } @Inject  GuidedDecisionTableSourceService(final GuidedDTableResourceTypeDefinition resourceType,
                                            final GuidedDecisionTableEditorService guidedDecisionTableEditorService,
                                            final @Named("ioStrategy") IOService ioService,
                                            final FileDiscoveryService fileDiscoveryService,
                                            final KieModuleService moduleService); @Override String getPattern(); @Override String getSource(final Path path,
                            final GuidedDecisionTable52 model); @Override String getSource(final Path path); }
GuidedDecisionTableSourceService extends BaseSourceService<GuidedDecisionTable52> { @Override public String getSource(final Path path, final GuidedDecisionTable52 model) throws SourceGenerationFailedException { try { final String dslr = GuidedDTDRLPersistence.getInstance().marshal(model); final Expander expander = getDSLExpander(path); final String drl = expander.expand(dslr); return drl; } catch (Exception e) { throw new SourceGenerationFailedException(e.getMessage()); } } @Inject  GuidedDecisionTableSourceService(final GuidedDTableResourceTypeDefinition resourceType,
                                            final GuidedDecisionTableEditorService guidedDecisionTableEditorService,
                                            final @Named("ioStrategy") IOService ioService,
                                            final FileDiscoveryService fileDiscoveryService,
                                            final KieModuleService moduleService); @Override String getPattern(); @Override String getSource(final Path path,
                            final GuidedDecisionTable52 model); @Override String getSource(final Path path);  }