[rules-users] Local Variable

Devan Van Reenen devan.vanreenen at gmail.com
Fri Oct 5 12:09:02 EDT 2012


You will be able to set or get a property on an instance of the declared
fact.
On Oct 5, 2012 6:03 PM, "Devan Van Reenen" <devan.vanreenen at gmail.com>
wrote:

> Not sure if this will help. But perhaps you can have a declared fact that
> contains a property/ varIable that you worry about and that you cab use in
> your rules. Not sure if this is best practice though.
> On Oct 5, 2012 1:48 PM, "joy" <Kripa_M01 at infosys.com> wrote:
>
>> Hi
>>
>> i need local variables in drl file.
>> it should hold integer/double value.
>> Setting an integer value to a local variable in some rule and getting that
>> integer value in some other rule
>>
>> when
>>         #some condition01
>> then
>>         local variable=200
>> end
>>
>> when
>>        #some condition02
>> then
>>        local variable =300
>> end
>>
>> when
>>      #some condition03
>> then
>>      emp.salary=localvariable+2000
>> end
>>
>> Anyone plz help me to resolve this.
>>
>> Thank you
>> Joy
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Local-Variable-tp4020144.html
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121005/5abffff5/attachment.html 


More information about the rules-users mailing list