|
|
Sponsor |
[drools-interest] Drools--more than one parameter--URGENT pls: msg#00014java.drools.user
Hi, I'm using Drools2-Beta11. I've a requirement where in I want to pass 2 parameters and use one in condition, and the other in consequence. The rule is like this: <rule name="675hyry_If"> <parameter identifier="DPObject"> <java:class type="DPObject"/> </parameter> <parameter identifier="TB"> <java:class type="TB"/> </parameter> <condition> <java:condition>(DPObject.getRegime().equals("34"))</java:condition> </condition> <consequence> <java:consequence> TB.setTotTax(100); </java:consequence> </consequence> </rule> I called the assertObject as workingMemory.assertObject(obj1); //Here obj1 is the object of type DPObject. But this is not working. The system giving the follwing error trace: org.drools.spi.ConsequenceException: null : Sourced file: <Inline eval of: tb.se tTotTax(100); > : Attempt to invoke method: setTotTax() on undefined variable or class name: tb : Sourced file: <Inline eval of: tb.setTotTax(100); > : Attempt to invoke method: setTotTax() on undefined variable or class name: tb at org.drools.semantics.java.BlockConsequence.invoke(BlockConsequence.ja va:141) at org.drools.reteoo.impl.AgendaItem.fire(AgendaItem.java:139) at org.drools.reteoo.impl.AgendaImpl.fireNextItem(AgendaImpl.java:309) at org.drools.WorkingMemory.fireAgenda(WorkingMemory.java:165) at org.drools.WorkingMemory.assertObject(WorkingMemory.java:186) at ExecutorFrame.executeRuleEngine(ExecutorFrame.java:244) at ExecutorFrame.button1_ActionPerformed(ExecutorFrame.java:186) at ExecutorFrame.access$100(ExecutorFrame.java:31) at ExecutorFrame$2.actionPerformed(ExecutorFrame.java:123) at java.awt.Button.processActionEvent(Button.java:382) at java.awt.Button.processEvent(Button.java:350) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) Nested exception was: Sourced file: <Inline eval of: tb.setTotTax(100); > : Attempt to invoke method: setTotTax() on undefined variable or class name: tb : at Line: 1 : in file: <Inl ine eval of: tb.setTotTax(100); > : tb .setTotTax ( 100 ) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.drools.semantics.java.Interp.evaluate(Interp.java:124) at org.drools.semantics.java.BlockConsequence.invoke(BlockConsequence.ja va:137) at org.drools.reteoo.impl.AgendaItem.fire(AgendaItem.java:139) at org.drools.reteoo.impl.AgendaImpl.fireNextItem(AgendaImpl.java:309) at org.drools.WorkingMemory.fireAgenda(WorkingMemory.java:165) at org.drools.WorkingMemory.assertObject(WorkingMemory.java:186) at ExecutorFrame.executeRuleEngine(ExecutorFrame.java:244) at ExecutorFrame.button1_ActionPerformed(ExecutorFrame.java:186) at ExecutorFrame.access$100(ExecutorFrame.java:31) at ExecutorFrame$2.actionPerformed(ExecutorFrame.java:123) at java.awt.Button.processActionEvent(Button.java:382) at java.awt.Button.processEvent(Button.java:350) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh read.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) If anybody knows the answer, pls let me know. Regards, Padmaja _______________________________________________ drools-interest mailing list drools-interest@xxxxxxxxxxxxxxxxxx http://lists.codehaus.org/mailman/listinfo/drools-interest .
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [drools-interest] Drools 2.0-beta-13 and a GUI, bob mcwhirter |
|---|---|
| Next by Date: | [drools-interest] Problem with: unknown tag 'rules' in namespace 'http://drools.org./rules, Jon Finanger |
| Previous by Thread: | [drools-interest] Drools 2.0-beta-13 and a GUI, bob mcwhirter |
| Next by Thread: | [drools-interest] Problem with: unknown tag 'rules' in namespace 'http://drools.org./rules, Jon Finanger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|