Hi
Below is the code i use to run the rules in the decision table. I am
inserting the empty even object into the session but i still get the "Cannot
be resolved issues". I have attached my decison table as well. Am new to
DRools, so please help.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
DecisionTableConfiguration dtableconfiguration = KnowledgeBuilderFactory.*
newDecisionTableConfiguration*();
dtableconfiguration.setInputType( DecisionTableInputType.*XLS* );
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.*newKnowledgeBuilder*();
kbuilder.add( ResourceFactory.*newClassPathResource*(
"RFC36877ScenarioDT.xls",
getClass() ),
ResourceType.*DTABLE*,
dtableconfiguration );
*if* ( kbuilder.hasErrors() ) {
System.*err*.print( kbuilder.getErrors() );
*return* -1;
}
KnowledgeBase kbase = KnowledgeBaseFactory.*newKnowledgeBase*();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
// typical decision tables are used *statelessly
*
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
//now create some test data
Input input = *new* Input();
System.*out*.println("creating the event...");
BusinessEvent event = *new* BusinessEvent();
ksession.execute( Arrays.*asList*( *new* Object[]{input, event} ) );
System.*out*.println( "Business events " + event.getEvents());
*return* 0;
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks
Manikandan