java - What would possibly be wrong with the following decision table? -


decision table

public class testdecisiontable {     public static void main(string[] args)     {      try{          kieservices ks = kieservices.factory.get();          kiecontainer kcontainer = ks.getkieclasspathcontainer();          kiesession ksession = kcontainer.newkiesession("ksession-dtables");           screens s1 = new screens();          s1.setdeliverychannel("y");          s1.setusepointsappl("y");          s1.setcontactdetails("y");          s1.setriskscore("y");          s1.setreasoncode(100);          s1.setcurrentscreen(303);          ksession.insert(s1);           screens s2 = new screens();           s2.setdeliverychannel("y");          s2.setusepointsappl("y");          s2.setcontactdetails("y");          s2.setriskscore("y");          s2.setreasoncode(101);          s2.setcurrentscreen(303);          ksession.insert(s2);               screens s3 = new screens();          s3.setdeliverychannel("y");          s3.setusepointsappl("y");          s3.setcontactdetails("y");          s3.setriskscore("y");          s3.setreasoncode(102);          s3.setcurrentscreen(303);          ksession.insert(s3);           ksession.fireallrules();       }      catch (throwable t) {          t.printstacktrace();      }      } } 

i implementing decision table 1 rule now. getting "mismatch input '==' in rule "screens_11"],text=parser returned null package]]" error. stack trace:

java.lang.runtimeexception: error while creating kiebase[message [id=1, level=error, path=sample.xls, line=8, column=0    text=[err 102] line 8:16 mismatched input '==' in rule "screens_11"], message [id=2, level=error, path=sample.xls, line=0, column=0    text=parser returned null package]]     @ org.drools.compiler.kie.builder.impl.kiecontainerimpl.getkiebase(kiecontainerimpl.java:450)     @ org.drools.compiler.kie.builder.impl.kiecontainerimpl.newkiesession(kiecontainerimpl.java:604)     @ org.drools.compiler.kie.builder.impl.kiecontainerimpl.newkiesession(kiecontainerimpl.java:575)     @ com.sample.testdecisiontable.main(testdecisiontable.java:15) 

any appreciated.

edit: added text generated spreadsheet

=== begin generated drl === package com.sample; //generated decision table import com.sample.screens; // rule values @ c11, header @ c6 rule "screens_11"     when         var:screens(deliverychannel == "y")         usepointsappl == "y"         contactdetails == "y"         riskscore == "y"         reasoncode == 100         currentscreen == 303             var.setnextscreen(306);         system.out.println(var.getnextscreen()); end  // rule values @ c12, header @ c6 rule "screens_12"     when         var:screens(deliverychannel == "y")         usepointsappl == "y"         contactdetails == "y"         riskscore == "y"         reasoncode == 100         currentscreen == 303             var.setnextscreen(306);     system.out.println(var.getnextscreen()); end   === end generated drl === 

row 8 has joined cells. don't join beyond constraint columns.

try code , report full output.

private void testspreadsheet(){   file dtf = new file( dtpath );   inputstream is;   try {     = new fileinputstream( dtf );     spreadsheetcompiler sscomp = new spreadsheetcompiler();     string s = sscomp.compile( is, inputtype.xls );     system.out.println( "=== begin generated drl ===" );     system.out.println( s );     system.out.println( "=== end generated drl ===" );   } catch (ioexception e) {     // todo auto-generated catch block     e.printstacktrace();   } } 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -