Re: [rules-users] How to insert values into drl

2013-12-09 Thread Wolfgang Laun
Can we be sure that the rule fires? (println on the RHS?) -W On 09/12/2013, anjana.ackroyd wrote: > > Thanks. Now when I do a get on Message I get a null value. I was under the > assumption that the drl n.setMessage is setting the value for message > > FactType factType = > runner.buildFactType

Re: [rules-users] How to insert values into drl

2013-12-09 Thread anjana.ackroyd
Thanks. Now when I do a get on Message I get a null value. I was under the assumption that the drl n.setMessage is setting the value for message FactType factType = runner.buildFactType("org.drools.test","NumberCompare") ; Object nc = factType.newInstance(); factType.set( nc,

Re: [rules-users] How to insert values into drl

2013-12-09 Thread anjana.ackroyd
Thanks. Now when I do a get on Message I get a null value. I was under the assumption that the drl n.setMessage is setting the value for message FactType factType = runner.buildFactType("org.drools.test","NumberCompare") ; Object nc = factType.newInstance(); factType.set( nc, "nu

Re: [rules-users] How to insert values into drl

2013-12-08 Thread Wolfgang Laun
You'll have to something like FactType factType = kieContainer.getKieBase().getFactType( packagename, "NumberCompare" ); Now you may Object nc = factType.newInstance(); factType.set( nc, "numberone", Integer.valueOf( 42 ) ); ... kieSession.insert( nc ); Of course, declaring and in

Re: [rules-users] How to insert values into drl

2013-12-08 Thread Michael Anstis
You need to use kiesession.insert( object ). Sent on the move On 8 Dec 2013 20:52, "anjana.ackroyd" wrote: > Hi, > I am new to drools and trying to figure out how to get this simple example > working. > I have intellij IDE . > I am trying to compare two numbers using drools 6.x and dont know how