Hello! I'm a newbie, but I believe you have to write eval on functions.
__________________________________ Francisco Brum - [EMAIL PROTECTED] Link Consulting - http://www.link.pt/ Tel.: 213 100 031 Av. Duque D'Ávila, 23 4º Esq. 1000-138 Lisboa -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jdepaul Sent: sexta-feira, 9 de Fevereiro de 2007 17:53 To: [email protected] Subject: Re: [rules-users] How to inovke a Service... Thanks for a great example - I was able to invoke myService from the <consequence> block in my rules, but NOT from a Function that I define... is this a limitation, or is there some other syntax when invoking from a function? rule "Shipper Match" salience 90 when shipperGI : GateIn ( customerId == "NISSAN", primaryShipperId == "yellow" ) then myService.sendNotification(shipperGI, Constants.SHIPPER_MATCH); <-- This Works // notifyPartNer(shipperGI, COnstants.SHIPPER_MATCH); <-- This DOESN'T WORK! end // Match found - notify customer function void notifyPartner(GateIn _event, String _action ) { System.out.println("Invoking Service for action = " + _action ); //myService.sendNotification(_event, _action); <-- Never gets to here... crashes... } Edson Tirelli-3 wrote: > >> So, for exaple, you can have a helper class that has the actual code >> to call the service you want and set it as a global for your rulebase. >> Then in the consequence you call this class method with the given >> paramenters. > ... > -- View this message in context: http://www.nabble.com/How-to-inovke-a-Service...-tf3189882.html#a8890381 Sent from the drools - user mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
