[rules-users] Guvnor 5.5 being WIERD
starfish15
pooja.ghosh at accenture.com
Wed Jan 16 06:42:48 EST 2013
Just giving you guys abt the code being used
Rule
1. | rule "Rule One"
2. | dialect "mvel"
3. | when
4. | Class(campaign == 1939506 )
5. | Class1( CUR_FM_EOC_IN == "Y" )
6. | Class1( GRP_TRANSPARENT_IN == "N" )
7. | Class1( LEGAL_LANG_CD != "ES" )
8. | Class( BUSUNIT_01_NO == "39" )
9. | then
10. | Dummy fact1 = new Dummy();
11. | fact1.setAsset_41369( "Access 1" );
12. | insert( fact1 );
13. | end
Code
KnowledgeBase kbase = readKnowledgeBase();
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
final List<Command> cmds = new ArrayList<Command>();
cmds.add(CommandFactory.newInsert(class, "class"));
cmds.add(CommandFactory.newInsert(class1, "class1"));
cmds.add(CommandFactory.newInsert(dum, "dum"));
final ExecutionResults execResult =
ksession.execute(CommandFactory.newBatchExecution(cmds));
Dummy dum1 = (Dummy)execResult.getValue("dum");
System.out.println("Asset Result Rule 0: "+dum1.getAsset_41369());
The Sop gives a blank value. Though the value is being updated in the ACTION
in the rule. What do you think I m missing???
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-5-being-WIERD-tp4021569p4021571.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list