Re: [rules-users] Not able to call parameterizied Java method in LHS

2011-09-29 Thread Tinku
I am facing one more issue with calling a method in lhs of the rule .. 

When I call a method as mentioned below ('getValue' is the method in class
'customObject' and 'numberofObjects' is method in class 'AnotherObject') ;
the drl file has problems in saving in eclipse. 
The error says like 'Multiple Markers at this line' 

*** 
rule A 

when 
$B : customObject() 
$C : AnotherObject() 
eval($C.numberofObjects($B.getValue("Database")) > 10) 
then 

end 

Please help me in this regard..


--
View this message in context: 
http://drools.46999.n3.nabble.com/Not-able-to-call-parameterizied-Java-method-in-LHS-tp3372552p3379014.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Not able to call parameterizied Java method in LHS

2011-09-28 Thread Tinku
rhs part worked ok now..

I am facing one more issue with calling a method in lhs of the rule ..

When I call a method as mentioned below ('getValue' is the method in class
'customObject' and 'numberofObjects' is method in class 'AnotherObject') ;
the drl file has problems in saving in eclipse.
The error says like 'Multiple Markers at this line'

***
rule A

when
$B : customObject() 
$C : AnotherObject()
eval($C.numberofObjects($B.getValue("Database")) > 10) 
then

end



--
View this message in context: 
http://drools.46999.n3.nabble.com/Not-able-to-call-parameterizied-Java-method-in-LHS-tp3372552p3376209.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Not able to call parameterizied Java method in LHS

2011-09-27 Thread Tinku
I try to add two java method calls in the RHS of the rule .It doesnot allow
me to save the DRL file in eclipse .It complaints "Multiple Markers at this
line".

However ,commenting one of the method in the RHS works fine ,with-out any
issue..

Could you pls help me in this..

Example :

when 
$B : customObject() 
$C :result()

eval($B.getValue("Database").equals("ORACLE")) 

then 
modify ($C)
{
  callA("UNIX")
  callB("PERL")
}

end 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Not-able-to-call-parameterizied-Java-method-in-LHS-tp3372552p3374183.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Not able to call parameterizied Java method in LHS

2011-09-27 Thread Tinku
There was an issue within the class that was used to insert the facts..Hence
the value was not inserted properly..

The result of the printing the value is now as 'ORACLE'..

Thanks.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Not-able-to-call-parameterizied-Java-method-in-LHS-tp3372552p3372683.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Not able to call parameterizied Java method in LHS

2011-09-27 Thread Tinku
I tried to invoke parameterizied call to the java method and tried to compare
the return parameter from the method in the 'eval' function..The rule is not
getting executed ..

I am not sure if it is unable to invoke the java method and fetch the return
parameter or there is an issue with rule syntax..

Please help me in this regard.

LHS of the rule :
**
import com.customObject

rule A

when
$B : customObject()

eval($B.getValue("Database").equals("ORACLE"))

then

System.out.println("The database object is oracle")

end

--
View this message in context: 
http://drools.46999.n3.nabble.com/Not-able-to-call-parameterizied-Java-method-in-LHS-tp3372552p3372552.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users