APISonar


org.drools.builder.DecisionTableInputType.CSV

> org > drools > builder > DecisionTableInputType > CSV
org APIs drools APIs builder APIs DecisionTableInputType APIs CSV APIs

Example 1
public void testDecisionTableCsv() {
        DecisionTableConfiguration dtconf = KnowledgeBuilderFactory.newDecisionTableConfiguration();
        dtconf.setInputType(DecisionTableInputType.CSV);

        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add(ResourceFactory.newClassPathResource("sample.csv", getClass()), ResourceType.DTABLE, dtconf);

        if (kbuilder.hasErrors()) {
            throw new RuntimeException("Drools compile errors: " + kbuilder.getErrors().toString());
        }
    }