[jboss-jira] [JBoss JIRA] Created: (JBRULES-658) Unable to invoke global variable Service from an embedded Function()
James DePaul (JIRA)
jira-events at lists.jboss.org
Fri Feb 9 15:13:30 EST 2007
Unable to invoke global variable Service from an embedded Function()
--------------------------------------------------------------------
Key: JBRULES-658
URL: http://jira.jboss.com/jira/browse/JBRULES-658
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Environment: Windows
Reporter: James DePaul
Assigned To: Mark Proctor
Priority: Minor
Trying to invoke a service referenced in a global variable works when invoked from the <consequence> block, but NOT from the function imbeded in the Rule definition - see code sample below:
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 DOES NOT 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);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list