Re: [rules-users] Local Variable

2012-10-08 Thread joy
Hi 

If am declaring a map as global variable. global java.util.Map map
In the "then" part of rule 1  am putting a key n value into map
Is it possible to get the value using the key from the "then" part of rule
2?

Do i want to update,insert like any thing on global variable? 
or 
How is it possible for rule engine to identify the changes in global
variable tht shud be reflected on other rule!


Regards 
joy



--
View this message in context: 
http://drools.46999.n3.nabble.com/Local-Variable-tp4020144p4020173.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] rule infinitely loops, appears to be depending on naming on variable

2012-10-08 Thread Davide Sottara
The only danger is with generated code, where you don't have full control
over the final number of attributes. I would assume that, in those cases,
one should avoid @propertyReactive altogether if there 
is a danger of exceeding the threshold? A warning would be ignored in an
automatic developement
process, potentially ending in loops where @pR is not kicking in as expected
:(
This is just for clarity, I do agree on the fact that huge bean classes
should be used with care
Davide



--
View this message in context: 
http://drools.46999.n3.nabble.com/rule-infinitely-loops-appears-to-be-depending-on-naming-on-variable-tp4020158p4020172.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] com.google.protobuf.MessageOrBuilder

2012-10-08 Thread gboro54
I am trying to deploy an application onto JBoss 7.1 running drools 5.4 and I
am getting the following error. Any thoughts?


java.lang.ClassNotFoundException: com.google.protobuf.MessageOrBuilder from
[Module "deployment.fbms.ear.fbms-service.jar:main" from Service Module
Loader]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 26 more



--
View this message in context: 
http://drools.46999.n3.nabble.com/com-google-protobuf-MessageOrBuilder-tp4020171.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] All the values from one list must be present in other

2012-10-08 Thread Suvek
I have drilled into similar problem but its bit different...

I have  a CompanyTaxPayer
CompanyTaxPayer has a CountryDetails Map
CountryDetail has Branches Map
Branch has Employee Map
if the EmployeeType is "Direct" employee then company has to pay tax on
their behalf

I have another list of registered taxpayers (individuals). 

I need to get the list of all the employees (EmployeeDetails have some
personal details) for the CompanyTaxPayer who are not registered as
individual taxpayers (also have personal details). 

what is the best way of achieving this?



--
View this message in context: 
http://drools.46999.n3.nabble.com/All-the-values-from-one-list-must-be-present-in-other-tp4019276p4020170.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] rule infinitely loops, appears to be depending on naming on variable

2012-10-08 Thread Mark Proctor
Btw JVM JIT won't unroll the loop. It can only do this when the same instance 
is used repeatedly in the same method. If the instance used in the method 
changes on each invocation, as ours does, it's not possible for JIT to unroll 
the loop.

Mark
On 8 Oct 2012, at 15:21, Mario Fusco  wrote:

> In my opinion to have a Java Bean (or a DRL type declaration that is exactly
> the same for what regards this issue) with more than 20 fields is a code
> smell and however something very hard to maintain. I must admit that I've
> been tempted to use an int as bitmask when I developed that feature, but in
> the end I decided to go with a long thinking that in this way I could be
> sure to cover everybody's needs. Evidently I was wrong.
> 
> That said I will experiment developing a custom made BitSet to check if I
> can address this issue without paying a performance penalty. Indeed I
> wouldn't like to have a performance loss (together with an higher memory
> occupation) for something that I still consider an extreme edge case. So
> what I will do in the short term will be to just disable the property
> reactive feature for types with more than 64 fields and emit a compilation
> warning when this happens.
> 
> Mario
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/rule-infinitely-loops-appears-to-be-depending-on-naming-on-variable-tp4020158p4020166.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Hibernate query and .RDL file

2012-10-08 Thread Joaquin
Hi, I'm a new member of this forum, and a new user of Drools.I need to apply
a rule to the result of a sql query, my persistence layer is managed by
Hibernate.I read this  article

 
I read this article. You took a lot of doubts and I think it can work all
integrated with Spring IoC. I only have a problem and do not know how to
solve. Taking as an example the query of this article, if I wanted to go to
run-time, the age of the query parameter in the file. DRL as I do?Can anyone
help me?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-query-and-RDL-file-tp4020168.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] rule infinitely loops, appears to be depending on naming on variable

2012-10-08 Thread Mario Fusco
In my opinion to have a Java Bean (or a DRL type declaration that is exactly
the same for what regards this issue) with more than 20 fields is a code
smell and however something very hard to maintain. I must admit that I've
been tempted to use an int as bitmask when I developed that feature, but in
the end I decided to go with a long thinking that in this way I could be
sure to cover everybody's needs. Evidently I was wrong.

That said I will experiment developing a custom made BitSet to check if I
can address this issue without paying a performance penalty. Indeed I
wouldn't like to have a performance loss (together with an higher memory
occupation) for something that I still consider an extreme edge case. So
what I will do in the short term will be to just disable the property
reactive feature for types with more than 64 fields and emit a compilation
warning when this happens.

Mario



--
View this message in context: 
http://drools.46999.n3.nabble.com/rule-infinitely-loops-appears-to-be-depending-on-naming-on-variable-tp4020158p4020166.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] empty cell in excel makes the LHS missing in the rule

2012-10-08 Thread Michael Anstis
Hi,

This is by design, however not perhaps ideal:
https://bugzilla.redhat.com/show_bug.cgi?id=853466

With kind regards,

Mike

On 8 October 2012 08:41, himansu.nayak  wrote:

> Hi,
> i am using drools 5.4.0 and currently facing a typical problem. when ever
> any cell for LHS in the spreadsheet is blank. when the rules is compiled
> using the spreadsheet, the LHS for the empty cell get completely missed.
> drools don't even consider it as a empty string. The only workaround i
> found
> is to fill all empty cell with N/A and then merging the cells, which looks
> like a patch work.
>
> Any other way thru with i can tell drools to treat empty cells as empty
> string?
>
>
>
> -
> Thanks...
> Himansu
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/empty-cell-in-excel-makes-the-LHS-missing-in-the-rule-tp4020164.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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] empty cell in excel makes the LHS missing in the rule

2012-10-08 Thread himansu.nayak
Hi,
i am using drools 5.4.0 and currently facing a typical problem. when ever
any cell for LHS in the spreadsheet is blank. when the rules is compiled
using the spreadsheet, the LHS for the empty cell get completely missed.
drools don't even consider it as a empty string. The only workaround i found
is to fill all empty cell with N/A and then merging the cells, which looks
like a patch work.

Any other way thru with i can tell drools to treat empty cells as empty
string?



-
Thanks...
Himansu
--
View this message in context: 
http://drools.46999.n3.nabble.com/empty-cell-in-excel-makes-the-LHS-missing-in-the-rule-tp4020164.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