[rules-users] 5.6 Decision Table VLookup

2014-06-17 Thread gboro54
Is there a way to have a decision table behave with a vloopup? Basically we
have a metadata column which the user can select from a drop down. This then
drives the values of the action columns. This works except that instead of
the value of the vlookup I see the actual vlookup text(i.e something like
VLOOKUP(F11)). 

Is this possible? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/5-6-Decision-Table-VLookup-tp4030082.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] 5.6 Decision Table VLookup

2014-06-17 Thread gboro54
They are different sheets.  Basically we have a our tables on sheet 1 and
sheet 2 is populated from an import of data from an external datasource to
allow a vlookup of information(so the business user can see the data/and we
can maintain it) 


manstis wrote
 Is the VLOOKUP in the same sheet?
 
 I think there are problems with Apache POI resolving formulas across
 different worksheets (but am guessing based on some other changes we had
 to
 make regarding linked workbooks).
 
 
 On 17 June 2014 16:36, gboro54 lt;

 gboro54@

 gt; wrote:
 
 Is there a way to have a decision table behave with a vloopup? Basically
 we
 have a metadata column which the user can select from a drop down. This
 then
 drives the values of the action columns. This works except that instead
 of
 the value of the vlookup I see the actual vlookup text(i.e something like
 VLOOKUP(F11)).

 Is this possible?



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/5-6-Decision-Table-VLookup-tp4030082.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/5-6-Decision-Table-VLookup-tp4030082p4030084.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] 5.6 Decision Table VLookup

2014-06-17 Thread gboro54

I will work on a test case and create a defect for it. I will see if I can't
get some time to take a look at this myself but will keep you informed about
my status on completing this ticket 


manstis wrote
 That then is indeed a bug.
 
 Can you please raise a DROOLS JIRA and attach a unit test demonstrating
 the
 problem (preferably please submit your unit test as a Pull Request)?
 
 We're always on the look out for community contributions, so if you want
 to
 tackle a fix it would be appreciated; otherwise we'll add the JIRA to the
 list to look at some time.
 
 With kind regards,
 
 Mike
 
 
 
 
 On 17 June 2014 17:25, gboro54 lt;

 gboro54@

 gt; wrote:
 
 They are different sheets.  Basically we have a our tables on sheet 1 and
 sheet 2 is populated from an import of data from an external datasource
 to
 allow a vlookup of information(so the business user can see the data/and
 we
 can maintain it)


 manstis wrote
  Is the VLOOKUP in the same sheet?
 
  I think there are problems with Apache POI resolving formulas across
  different worksheets (but am guessing based on some other changes we
 had
  to
  make regarding linked workbooks).
 
 
  On 17 June 2014 16:36, gboro54 lt;

  gboro54@

  gt; wrote:
 
  Is there a way to have a decision table behave with a vloopup?
 Basically
  we
  have a metadata column which the user can select from a drop down.
 This
  then
  drives the values of the action columns. This works except that
 instead
  of
  the value of the vlookup I see the actual vlookup text(i.e something
 like
  VLOOKUP(F11)).
 
  Is this possible?
 
 
 
  --
  View this message in context:
 
 http://drools.46999.n3.nabble.com/5-6-Decision-Table-VLookup-tp4030082.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
 

  rules-users@.jboss

  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
  ___
  rules-users mailing list

  rules-users@.jboss

  https://lists.jboss.org/mailman/listinfo/rules-users





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/5-6-Decision-Table-VLookup-tp4030082p4030084.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/5-6-Decision-Table-VLookup-tp4030082p4030086.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] Decision Tables and modify

2014-06-11 Thread gboro54
Thanks and your assumption is correct 


manstis wrote
 At the momemt 6.x only supports update columns (select an action and
 ensure the update engine checkbox is ticked).
 
 You can work around this, to get modify( x ) {...}, by using a BRL
 Fragment
 Action column and use a Free Form DRL Fragment entering the modify syntax.
 
 I am modifying Guided Rules, Guided Templates and Guided Decision Tables
 to
 generate modify syntax instead of update at the moment.
 
 It will be in 6.1.Final for sure.
 
 Did you mean this or the XLS variety? (I'd assume modify to already be
 supported as ACTIONs are free format DRL IIRC).
 
 Sent on the move
 On 11 Jun 2014 18:56, gboro54 lt;

 gboro54@

 gt; wrote:
 
 What is the proper way to do modify in a decision table?  I know this is
 a
 very generic question but was wondering if anyone has experience with
 this
 and could offer insight(I have a couple ways I think will work but they
 feel
 a bit hackey)



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Decision-Tables-and-modify-tp4029995.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Decision-Tables-and-modify-tp4029995p4029997.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] @Modifies Inheritance

2014-05-29 Thread gboro54
Curiosity question: Why does the @Modifies not have the @Inherited
annotation, allowing subclasses to inherit a method which may modify
something in the parent? Perhaps I have a misunderstanding of annotations 
in this case but still am just wondering. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Modifies-Inheritance-tp4029757.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] Drools Case Based Reasoning

2014-03-18 Thread gboro54
This sounds like something that could be accomplished with Planner. Is that
the case or am I completely off the mark here? My company is looking at
technologies to do case base planning and since we already use drools for
other business rules figure I would poke around



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.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] Drools Case Based Reasoning

2014-03-18 Thread gboro54
That is correct and that is my thought. My company I feel likes to over
complicate things at times. My thought would be to use drools queries to
handle the searching of previous cases for the solution. Does that seem like
a reasonable approach? 


laune wrote
 CBR as in http://en.wikipedia.org/wiki/Case-based_reasoning?
 
 If the number of identical variables, added with weights, is the
 target function, a simple search strategy should be sufficient for
 finding the best past case.
 
 -W
 
 
 On 18/03/2014, gboro54 lt;

 gboro54@

 gt; wrote:
 This sounds like something that could be accomplished with Planner. Is
 that
 the case or am I completely off the mark here? My company is looking at
 technologies to do case base planning and since we already use drools for
 other business rules figure I would poke around



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784p4028786.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] Drools Case Based Reasoning

2014-03-18 Thread gboro54
Agreed and understood. I am not throwing out any solid conclusions about an
approach. I can also see a case for technical rules. 


laune wrote
 On 18/03/2014, gboro54 lt;

 gboro54@

 gt; wrote:
 That is correct and that is my thought. My company I feel likes to over
 complicate things at times. My thought would be to use drools queries to
 handle the searching of previous cases for the solution. Does that seem
 like
 a reasonable approach?
 
 I'd have to see a few solid use cases before I really pledge my
 reputation. I'm not sure how queries can rescue the day, but I think I
 could come up with a nice set of technical rules (but see 1st
 sentence).
 
 -W
 


 laune wrote
 CBR as in http://en.wikipedia.org/wiki/Case-based_reasoning?

 If the number of identical variables, added with weights, is the
 target function, a simple search strategy should be sufficient for
 finding the best past case.

 -W


 On 18/03/2014, gboro54 lt;

 gboro54@

 gt; wrote:
 This sounds like something that could be accomplished with Planner. Is
 that
 the case or am I completely off the mark here? My company is looking at
 technologies to do case base planning and since we already use drools
 for
 other business rules figure I would poke around



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list


 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784p4028786.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Case-Based-Reasoning-tp4028784p4028788.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] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-26 Thread gboro54
No luck adding ProperReactive to the classes(in the sample project). 


Davide Sottara wrote
 I think I see the problem - though I haven't been able to test it with
 guvnor.
 
 Property Reactivity is resolved at compile time, when the package is
 built.
 
 When you load the DRL, you set PropertyReactive.ALWAYS in the (local)
 KnowledgeBuilder, so it will consider all classes as PR.
 
 However, afaik there is no way to do the same in Guvnor, so its (remote)
 builder will create the Packages as if the classes were NOT
 PropertyReactive.
 
 Could you try to annotate the model classes with @PropertyReactive before
 you load the jar in guvnor?
 
 Davide
 
 
 On 02/25/2014 11:53 PM, gboro54 wrote:
 test-drools.zip
 lt;http://drools.46999.n3.nabble.com/file/n4028329/test-drools.zipgt;  

 Here is a sample project which shows the issue. You can build the project
 as
 the fact model and upload the drl into guvnor



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028329.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028335.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] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-26 Thread gboro54
For number 2 it is a fair to claim that the beans the rules do not live in
the same package. Thanks again for the assistance 


Davide Sottara wrote
 Ok, so I have to test it.
 There could be two possible failure points:
 
 1) The compiler should see the annotations and create the internal
 data structures, tracking the fact that the classes are @PR
 2) The data structures are declared in the package of the beans,
 which is not (necessarily) the package where the rules are defined.
 We have to ensure that ALL packages are downloaded from guvnor.
 
 To check #2, it should be enough to ensure that the rules and the
 classes live in the same package
 
 I'll get back to you later
 Davide
 
 
 On 02/26/2014 03:59 PM, gboro54 wrote:
 No luck adding ProperReactive to the classes(in the sample project). 


 Davide Sottara wrote
 I think I see the problem - though I haven't been able to test it with
 guvnor.

 Property Reactivity is resolved at compile time, when the package is
 built.

 When you load the DRL, you set PropertyReactive.ALWAYS in the (local)
 KnowledgeBuilder, so it will consider all classes as PR.

 However, afaik there is no way to do the same in Guvnor, so its (remote)
 builder will create the Packages as if the classes were NOT
 PropertyReactive.

 Could you try to annotate the model classes with @PropertyReactive
 before
 you load the jar in guvnor?

 Davide


 On 02/25/2014 11:53 PM, gboro54 wrote:
 test-drools.zip
 lt;http://drools.46999.n3.nabble.com/file/n4028329/test-drools.zipgt;  

 Here is a sample project which shows the issue. You can build the
 project
 as
 the fact model and upload the drl into guvnor



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028329.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list

 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028335.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028339.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] Source from Snapshot in Guvnor 5.6

2014-02-26 Thread gboro54
Is there a way to download the drl of a snapshot? I know you can see the
rules in the Guvnor(uneditable of course) but is there a way to actual
download the DRL file? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Source-from-Snapshot-in-Guvnor-5-6-tp4028355.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] Source from Snapshot in Guvnor 5.6

2014-02-26 Thread gboro54
How to you specify which snapshot to grab from? I.e you build your pkg then
create a snapshot. I want the source from the specific snapshot as rules may
have changed in the package since the snapshot was built.

I.e the following will let you download the pkg of the snapshot:

http://.../package/com.test/Test


Davide Sottara wrote
 Yes, instead of the URL
 
 http:// ... /packages/ [my pack ] / binary
 
 use
 
 http:// ... /packages/ [my pack ] / source
 
 
 
 
 On 02/26/2014 10:24 PM, gboro54 wrote:
 Is there a way to download the drl of a snapshot? I know you can see the
 rules in the Guvnor(uneditable of course) but is there a way to actual
 download the DRL file? 



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Source-from-Snapshot-in-Guvnor-5-6-tp4028355.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Source-from-Snapshot-in-Guvnor-5-6-tp4028355p4028357.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] Source from Snapshot in Guvnor 5.6

2014-02-26 Thread gboro54
Doing something like 

http://.../package/com.test/Test.drl

shows the drl but it looks like imports are missing(along with globals)


gboro54 wrote
 How to you specify which snapshot to grab from? I.e you build your pkg
 then create a snapshot. I want the source from the specific snapshot as
 rules may have changed in the package since the snapshot was built.
 
 I.e the following will let you download the pkg of the snapshot:
 
 http://.../package/com.test/Test
 Davide Sottara wrote
 Yes, instead of the URL
 
 http:// ... /packages/ [my pack ] / binary
 
 use
 
 http:// ... /packages/ [my pack ] / source
 
 
 
 
 On 02/26/2014 10:24 PM, gboro54 wrote:
 Is there a way to download the drl of a snapshot? I know you can see the
 rules in the Guvnor(uneditable of course) but is there a way to actual
 download the DRL file? 



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Source-from-Snapshot-in-Guvnor-5-6-tp4028355.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Source-from-Snapshot-in-Guvnor-5-6-tp4028355p4028358.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] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-25 Thread gboro54
Also note we are using property reactive listener always. The rules do modify
an object that a bunch of the rules use however the modified property is not
being evaluated(i.e no rule is checking the property at the moment). 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028320.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] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-25 Thread gboro54
Will do. Should have a test in about 20 minutes


Davide Sottara wrote
 Interesting.. this may be a bug in the serialization process, and it may
 affect 6.x too
 Could you please check it with a package that contains a single rule
 using a single
 @propertyReactive class?
 
 On 02/25/2014 09:25 PM, gboro54 wrote:
 Also note we are using property reactive listener always. The rules do
 modify
 an object that a bunch of the rules use however the modified property is
 not
 being evaluated(i.e no rule is checking the property at the moment). 



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028320.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028322.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] Drools 5.6.0.Final PKG vs DRL infinite loop

2014-02-25 Thread gboro54
I created a single rule as follows:

package test
import com.Firm

rule 'test rule'
dialect 'mvel'
no-loop true
when
$firm:Firm( )
then
modify($firm){addToFirmAccumulation(va,1L,false,1)}
end

When I compiled and ran I didn't get the infinite looping like I did before. 
The method addToFirmAccumulation is annotated with @Modifies({
volumeAccumulations }) as it's updating the map



Davide Sottara wrote
 Interesting.. this may be a bug in the serialization process, and it may
 affect 6.x too
 Could you please check it with a package that contains a single rule
 using a single
 @propertyReactive class?
 
 On 02/25/2014 09:25 PM, gboro54 wrote:
 Also note we are using property reactive listener always. The rules do
 modify
 an object that a bunch of the rules use however the modified property is
 not
 being evaluated(i.e no rule is checking the property at the moment). 



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028320.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-6-0-Final-PKG-vs-DRL-infinite-loop-tp4028318p4028323.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] Kie-Workbench install error

2014-02-24 Thread gboro54
I turned off the demo stuff as we really didn't want that in our linux
environment.  As for the example I am not sure. I would start a new thread
and not high-jack an older thread in this case.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840p4028276.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] 5.6.0.cr1 Guvnor Release

2014-02-18 Thread gboro54
Is there a built Guvnor artifact for expert 5.6.0.cr1? Using the 5.5.0
version of Guvnor against the 5.6.1 runtime does not work(as I would
expected). This is only a temporary until we get the knew kie-workbench up
and running with Drools 6. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/5-6-0-cr1-Guvnor-Release-tp4028172.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] 5.6.0.cr1 Guvnor Release

2014-02-18 Thread gboro54
Final works just fine...Thanks!


anjana.ackroyd wrote
 http://downloads.jboss.org/drools/release/
 I dont see a CR1 why not use Final?
 
 
 On Tue, Feb 18, 2014 at 9:26 AM, gboro54 lt;

 gboro54@

 gt; wrote:
 
 Is there a built Guvnor artifact for expert 5.6.0.cr1? Using the 5.5.0
 version of Guvnor against the 5.6.1 runtime does not work(as I would
 expected). This is only a temporary until we get the knew kie-workbench
 up
 and running with Drools 6.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/5-6-0-cr1-Guvnor-Release-tp4028172.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/5-6-0-cr1-Guvnor-Release-tp4028172p4028176.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] kie-workbench external maven repo

2014-01-28 Thread gboro54
Is there a way to setup the kie workbench to point to an internal maven repo
to pull internal libraries? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/kie-workbench-external-maven-repo-tp4027897.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] Kie-Workbench install error

2014-01-23 Thread gboro54
Hi! I am trying to install the Kie-workbench war to a jboss 7 environment and
get the exception below. I would imagine this is because of firewall and my
company will not open a connection to this repo. My question: is there a way
to have the deployment go through without loading the example projects?

Thanks!

Caused by: java.lang.RuntimeException:
https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open
git-upload-pack
at
org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)
at
org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)
at
org.uberfire.backend.server.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:36)
at
org.uberfire.backend.server.repositories.RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.newRepository(RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.java)
at
org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:182)
at
org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:173)
at
org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.createRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java)
at
org.kie.workbench.drools.backend.server.AppSetup.createRepository(AppSetup.java:274)
at
org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:101)
... 43 more




--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840.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] Kie-Workbench install error

2014-01-23 Thread gboro54
I found that 5 minutes after posting...guess it proves you should read
documentation before posting... Thanks! 


Mark Proctor wrote
 http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html#wb.Installation
 15.1.3. System properties
 
 org.kie.demo: Enables external clone of a demo application from GitHub.
 This System Property takes precedence over org.kie.example. Default: true
 org.kie.example: Enables example structure composed by Repository,
 Organization Unit and Project. Default: false
 Mark
 
 On 23 Jan 2014, at 18:38, gboro54 lt;

 gboro54@

 gt; wrote:
 
 Hi! I am trying to install the Kie-workbench war to a jboss 7 environment
 and
 get the exception below. I would imagine this is because of firewall and
 my
 company will not open a connection to this repo. My question: is there a
 way
 to have the deployment go through without loading the example projects?
 
 Thanks!
 
 Caused by: java.lang.RuntimeException:
 https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open
 git-upload-pack
at
 org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)
at
 org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)
at
 org.uberfire.backend.server.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:36)
at
 org.uberfire.backend.server.repositories.RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.newRepository(RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.java)
at
 org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:182)
at
 org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:173)
at
 org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.createRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java)
at
 org.kie.workbench.drools.backend.server.AppSetup.createRepository(AppSetup.java:274)
at
 org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:101)
... 43 more
 
 
 
 
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840p4027842.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] drools 5.5 property reactive issue

2013-11-25 Thread gboro54
I am seeing a weird pattern(or at least unexpected one) when running drools
5.5 in property reactive mode. I have to rules such as:

rule Rule 1
  when
   $order:Order(orderType==A, orderVolume1000)
  then
  insert(new Charge($order,code1,-.25));
end

rule Rule 2
  when
   $order:Order(orderType==A)
  then
  insert(new Charge($order,code2,-.24));
end

rule Set best price
  when
 $order:Order($id:id, $setCharge:charge)
 $charge:Charge(orderId=$id,$setCharge==null ||
chargeAmount$setCharge.chargeAmount)
  then
 modify($order){setCharge($charge)};
end

If I insert and Order of 1001 I see all 3 activations get created, Rule 2
fires first thus triggering set price rule and the activation of Rule 1 is
cancelled. If I add a @watch(charge) to the end of the rules or set up
salience Rule 1 fires.

Could someone help me understand why the firing of Rule 2 and thus the set
best price rule cause rule 1 to get cancelled without the @watch? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917.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] drools 5.5 property reactive issue

2013-11-25 Thread gboro54
This issue seems to be related to:

http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html
http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html
  




--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026921.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] drools 5.5 property reactive issue

2013-11-25 Thread gboro54
I plan to do an update to 6 early next month(that was planned before this
issue). 

Thanks! 


Mark Proctor wrote
 a lot has been fixed in 5.6 and 6.0. Please either try 5.6.CR1 or
 6.0.FINAL.
 
 Mark
 On 25 Nov 2013, at 15:33, gboro54 lt;

 gboro54@

 gt; wrote:
 
 This issue seems to be related to:
 
 http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html
 lt;http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.htmlgt;
   
 
 
 
 
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026921.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026929.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] Drools 5.5 Property Reactive on Maps

2013-11-14 Thread gboro54
So I have an object with a map like follows:

protected ConcurrentMapString, Double accumulations = new
ConcurrentHashMapString, Double();

I wrote a convince method on the class that will look up the value in the
map and add to it if it exists and 
if not there will put it in the map:

@Modifies({ accumulations  })
public void addToAccumulation(String code, long volume) {
if (accumulations .containsKey(code)) {
Double value = accumulations .get(code) + volume;
accumulations .put(code, value);

} else {
accumulations .putIfAbsent(code, new Double(volume));
}
}

I have a rule to listen on the change of this filed on the object(i.e
accumulations[someCode]!=null) but 
when I modify the object the rule doesn't fire. I have added
@PropertyReactive to the Object and build the kbase as follows:

Properties props = new Properties();
props.setProperty(drools.dialect.java.compiler, JANINO);

KnowledgeBuilderConfiguration config = KnowledgeBuilderFactory
.newKnowledgeBuilderConfiguration(props);
config.setOption(PropertySpecificOption.ALWAYS);


Any insight into why this may not work?




--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-Property-Reactive-on-Maps-tp4026782.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] Drools 5.5 Property Reactive on Maps

2013-11-14 Thread gboro54
So if the property lives in the parent abstract class and that is where the
method existed. If I move the method to the child with the annotation
@Modifies it works. 

Any ideas why putting that in the parent abstract would not be honored?  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-Property-Reactive-on-Maps-tp4026782p4026783.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] Drools 6 workbench and Polymita

2013-11-08 Thread gboro54
I stumbled across this article today:
http://decisionmanagementsolutions.com/blog/2013/10/09/first-look-red-hat-jboss-brms-and-drools-community-project-update/
 

This got me thinking if this integration will be offered in the community
project or will this only be done in the enterprise version? If it is being
done in the open source world is there a place you can take a look at it?  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-6-workbench-and-Polymita-tp4026698.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] Drools 6 workbench and Polymita

2013-11-08 Thread gboro54
Understood. I just haven't read anything about this until that post so I
wasn't sure if that was even related to the work being done for UberFire or
if this was an other project. I guess I phrased the question completely
wrong in that aspect. 




Mark Proctor wrote
 We don’t do hybrid business models - i.e. holding back the best for the
 product. 
 
 Everything will be available in the community.  The product is just a
 hardened, sanitized and long live support branch of what you have in
 community.
 http://blog.athico.com/2011/04/drools-jbpm-community-versus-product.html
 
 Mark
 
 On 8 Nov 2013, at 17:02, gboro54 lt;

 gboro54@

 gt; wrote:
 
 I stumbled across this article today:
 http://decisionmanagementsolutions.com/blog/2013/10/09/first-look-red-hat-jboss-brms-and-drools-community-project-update/
  
 
 This got me thinking if this integration will be offered in the community
 project or will this only be done in the enterprise version? If it is
 being
 done in the open source world is there a place you can take a look at it?  
 
 
 
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-6-workbench-and-Polymita-tp4026698.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-6-workbench-and-Polymita-tp4026698p4026700.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] Drools 6 workbench and Polymita

2013-11-08 Thread gboro54
Thanks for the information Mark! 


Mark Proctor wrote
 Some of it has been migrated to uberfire. Some is still standalone, and
 will be migrated over next year.
 
 Mark
 On 8 Nov 2013, at 18:06, gboro54 lt;

 gboro54@

 gt; wrote:
 
 Understood. I just haven't read anything about this until that post so I
 wasn't sure if that was even related to the work being done for UberFire
 or
 if this was an other project. I guess I phrased the question completely
 wrong in that aspect. 
 
 
 
 
 Mark Proctor wrote
 We don’t do hybrid business models - i.e. holding back the best for the
 product. 
 
 Everything will be available in the community.  The product is just a
 hardened, sanitized and long live support branch of what you have in
 community.
 http://blog.athico.com/2011/04/drools-jbpm-community-versus-product.html
 
 Mark
 
 On 8 Nov 2013, at 17:02, gboro54 lt;
 
 gboro54@
 
 gt; wrote:
 
 I stumbled across this article today:
 http://decisionmanagementsolutions.com/blog/2013/10/09/first-look-red-hat-jboss-brms-and-drools-community-project-update/
  
 
 This got me thinking if this integration will be offered in the
 community
 project or will this only be done in the enterprise version? If it is
 being
 done in the open source world is there a place you can take a look at
 it?  
 
 
 
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-6-workbench-and-Polymita-tp4026698.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 
 
 rules-users@.jboss
 
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list
 
 rules-users@.jboss
 
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 
 
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-6-workbench-and-Polymita-tp4026698p4026700.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-6-workbench-and-Polymita-tp4026698p4026702.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] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
I have rules like the following:

rule Add Baseline to Context if it does not exists exists or not greater
then 0
no-loop true
when
$context:Context($id:id,baselineParticipation==null || 
  
baselineParticipation.baselineRatio==null||baselineParticipation.baselineRatio==0)
then
modify($firm) {setBaselineParticipation(new 
BaselineParticipation($id,new
BigDecimal(0.00485)))};

end

rule Calculate Participation Ratio
no-loop true
when

$context:Context(consolidatdVolume!=null,consolidatdVolume.avgVolume0,
   
volumeAccumulations[total]!=null,volumeAccumulations[total]0,
   
$ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
then
ConcurrentMap calculatedRatios=$firm.getCalculatedRatios();
calculatedRatios.put(fparticipationRatio,new 
BigDecimal($ratio));
modify($firm){setCalculatedRatios(calculatedRatios)};
end

Despite the checks I get the following exception and any insight into why
would be great:

Exception executing consequence for rule Calculate Firm Participation
Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: / by zero
Exception executing consequence for rule Calculate Firm Participation
Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: / by zero
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at 
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
at
com.nasdaq.fq.rms.workflow.processor.rules.PerformanceStatusAssignmentProcessor.doWork(PerformanceStatusAssignmentProcessor.java:156)
at com.ften.ssr.workqueue.WorkItemRunnable.run(WorkItemRunnable.java:48)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ArithmeticException: / by zero
at ConditionEvaluatorda6271cf5a744b6bbdb9c717cae2edb7.evaluate(Unknown
Source)
at
org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
at
org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:154)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
at 
org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
at 
org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:483)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:383)
at
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:337)
at
com.nasdaq.rms.nq.status.Rule_Calculate_Firm_Participation_Ratio_cfb033f33c2b404fb2bff8e1b9af0175.defaultConsequence(Unknown
Source)
at
com.nasdaq.rms.nq.status.Rule_Calculate_Firm_Participation_Ratio_cfb033f33c2b404fb2bff8e1b9af0175DefaultConsequenceInvokerGenerated.evaluate(Unknown
Source)
at
com.nasdaq.rms.nq.status.Rule_Calculate_Firm_Participation_Ratio_cfb033f33c2b404fb2bff8e1b9af0175DefaultConsequenceInvoker.evaluate(Unknown
Source)
at 
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
... 10 more



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-divide-by-0-exception-tp4026582.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] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
So move the math to the rhs? Will that resolve the issues in your opinion? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-divide-by-0-exception-tp4026582p4026586.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] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
Could you expand upon why this is a poor practice? I assumed that if a part
of the pattern doesn't match the expression evaluation is terminated


laune wrote
 I can anticipate the answer where OP says that there is a constraint
 restricting argVolume to  0. However, I don't think that independent
 constraints such as we see them in this rule are evaluated as if they
 were in a single logical expression, with Java semantics.
 
 The seductive possibility of binding to a half-baked expression (i.e.,
 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
 should be discarded. This value can safely be computed on the RHS
 where the denominator's  value being !=0 is asserted.
 
 -W
 
 On 01/11/2013, Stephen Masters lt;

 stephen.masters@

 gt; wrote:
 Divide by zero exceptions usually occur when you try to divide by zero.

 So … first question … is consolidatdVolume.avgVolume ever zero?


 On 1 Nov 2013, at 16:17, gboro54 lt;

 gboro54@

 gt; wrote:

 I have rules like the following:

 rule Add Baseline to Context if it does not exists exists or not
 greater
 then 0
 no-loop true
 when
 $context:Context($id:id,baselineParticipation==null ||
 
 baselineParticipation.baselineRatio==null||baselineParticipation.baselineRatio==0)
 then
 modify($firm) {setBaselineParticipation(new
 BaselineParticipation($id,new
 BigDecimal(0.00485)))};
 
 end

 rule Calculate Participation Ratio
 no-loop true
 when
 
 $context:Context(consolidatdVolume!=null,consolidatdVolume.avgVolume0,
   
 volumeAccumulations[total]!=null,volumeAccumulations[total]0,
   
 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
 then
 ConcurrentMap calculatedRatios=$firm.getCalculatedRatios();
 calculatedRatios.put(fparticipationRatio,new 
 BigDecimal($ratio));
 modify($firm){setCalculatedRatios(calculatedRatios)};
 end

 Despite the checks I get the following exception and any insight into
 why
 would be great:

 Exception executing consequence for rule Calculate Firm Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: / by
 zero
 Exception executing consequence for rule Calculate Firm Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: / by
 zero
 at
 org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
 at
 org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
 at
 org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
 at
 org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
 at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
 at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
 at
 org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
 at
 com.nasdaq.fq.rms.workflow.processor.rules.PerformanceStatusAssignmentProcessor.doWork(PerformanceStatusAssignmentProcessor.java:156)
 at
 com.ften.ssr.workqueue.WorkItemRunnable.run(WorkItemRunnable.java:48)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:724)
 Caused by: java.lang.ArithmeticException: / by zero
 at ConditionEvaluatorda6271cf5a744b6bbdb9c717cae2edb7.evaluate(Unknown
 Source)
 at
 org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
 at
 org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
 at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:154)
 at
 org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
 at
 org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
 at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
 at
 org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
 at
 org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
 at
 org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
 at
 org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
 at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:483)
 at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:383)
 at
 org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:337)
 at
 com.nasdaq.rms.nq.status.Rule_Calculate_Firm_Participation_Ratio_cfb033f33c2b404fb2bff8e1b9af0175.defaultConsequence(Unknown
 Source

Re: [rules-users] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
I changed the rules to the following so I will test and see:

rule Add Baseline to Context if it does not exists exists or not greater
then 0 
no-loop true 
when 
$context:Context($id:id,baselineParticipation==null || 
  
baselineParticipation.baselineRatio==null||baselineParticipation.baselineRatio==0)
 
then 
modify($firm) {setBaselineParticipation(new
BaselineParticipation($id,new BigDecimal(0.00485)))}; 

end 

rule Calculate Participation Ratio 
no-loop true 
when 
   
$context:Context(consolidatdVolume!=null,consolidatdVolume.avgVolume!=0, 
  
volumeAccumulations[total]!=null,volumeAccumulations[total]!=0, 
  
$total:volumeAccumulations[total],$avg:consolidatdVolume.avgVolume) 
then 
ConcurrentMap calculatedRatios=$firm.getCalculatedRatios(); 
calculatedRatios.put(participationRatio,new
BigDecimal($total/$avg)); 
modify($firm){setCalculatedRatios(calculatedRatios)}; 
end 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-divide-by-0-exception-tp4026582p4026589.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] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
Agreed. In this case it is possible to move to the RHS...but I have to ask
what if I need to use the math as part of a constraint. Is it not safe to
assume the divisor is 0 even if I do the check? That seems like an issue as
I do have cases which this will be required


Stephen Masters wrote
 Given that you don’t seem to using the result as a constraint, then I
 can’t see any benefit to it being on the LHS. So yes, It would be better
 on the RHS.
 
 Steve
 
 
 On 1 Nov 2013, at 17:58, Wolfgang Laun lt;

 wolfgang.laun@

 gt; wrote:
 
 I can anticipate the answer where OP says that there is a constraint
 restricting argVolume to  0. However, I don't think that independent
 constraints such as we see them in this rule are evaluated as if they
 were in a single logical expression, with Java semantics.
 
 The seductive possibility of binding to a half-baked expression (i.e.,
 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
 should be discarded. This value can safely be computed on the RHS
 where the denominator's  value being !=0 is asserted.
 
 -W
 
 On 01/11/2013, Stephen Masters lt;

 stephen.masters@

 gt; wrote:
 Divide by zero exceptions usually occur when you try to divide by zero.
 
 So … first question … is consolidatdVolume.avgVolume ever zero?
 
 
 On 1 Nov 2013, at 16:17, gboro54 lt;

 gboro54@

 gt; wrote:
 
 I have rules like the following:
 
 rule Add Baseline to Context if it does not exists exists or not
 greater
 then 0
no-loop true
when
$context:Context($id:id,baselineParticipation==null ||

 baselineParticipation.baselineRatio==null||baselineParticipation.baselineRatio==0)
then
modify($firm) {setBaselineParticipation(new
 BaselineParticipation($id,new
 BigDecimal(0.00485)))};

 end
 
 rule Calculate Participation Ratio
no-loop true
when

 $context:Context(consolidatdVolume!=null,consolidatdVolume.avgVolume0,
  
 volumeAccumulations[total]!=null,volumeAccumulations[total]0,
  
 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
then
ConcurrentMap calculatedRatios=$firm.getCalculatedRatios();
calculatedRatios.put(fparticipationRatio,new 
 BigDecimal($ratio));
modify($firm){setCalculatedRatios(calculatedRatios)};
 end
 
 Despite the checks I get the following exception and any insight into
 why
 would be great:
 
 Exception executing consequence for rule Calculate Firm Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: / by
 zero
 Exception executing consequence for rule Calculate Firm Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: / by
 zero
at
 org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at
 org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
at
 org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at
 org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
at
 org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
at
 com.nasdaq.fq.rms.workflow.processor.rules.PerformanceStatusAssignmentProcessor.doWork(PerformanceStatusAssignmentProcessor.java:156)
at
 com.ften.ssr.workqueue.WorkItemRunnable.run(WorkItemRunnable.java:48)
at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
 Caused by: java.lang.ArithmeticException: / by zero
at ConditionEvaluatorda6271cf5a744b6bbdb9c717cae2edb7.evaluate(Unknown
 Source)
at
 org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
at
 org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:154)
at
 org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
 org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
at
 org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at
 org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
at
 org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
at
 org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
at org.drools.common.NamedEntryPoint.update

Re: [rules-users] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
I made an assumption(thus why I am asking) for future cases I will use the 
separator to handle such cases as I would assume saying something like this
would work:

Object(a0  b0  a/b  100)


laune wrote
 I haven't read a statement yet that says that, in Drools, LHS terms,
 separated by a comma (!) must be executed in the order they are
 written, or that the C/Java semantics for logical expression
 evaluation is applied.
 
 -W
 
 
 On 01/11/2013, gboro54 lt;

 gboro54@

 gt; wrote:
 Could you expand upon why this is a poor practice? I assumed that if a
 part
 of the pattern doesn't match the expression evaluation is terminated


 laune wrote
 I can anticipate the answer where OP says that there is a constraint
 restricting argVolume to  0. However, I don't think that independent
 constraints such as we see them in this rule are evaluated as if they
 were in a single logical expression, with Java semantics.

 The seductive possibility of binding to a half-baked expression (i.e.,
 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
 should be discarded. This value can safely be computed on the RHS
 where the denominator's  value being !=0 is asserted.

 -W

 On 01/11/2013, Stephen Masters lt;

 stephen.masters@

 gt; wrote:
 Divide by zero exceptions usually occur when you try to divide by zero.

 So … first question … is consolidatdVolume.avgVolume ever zero?


 On 1 Nov 2013, at 16:17, gboro54 lt;

 gboro54@

 gt; wrote:

 I have rules like the following:

 rule Add Baseline to Context if it does not exists exists or not
 greater
 then 0
   no-loop true
   when
   $context:Context($id:id,baselineParticipation==null ||
   
 baselineParticipation.baselineRatio==null||baselineParticipation.baselineRatio==0)
   then
   modify($firm) {setBaselineParticipation(new
 BaselineParticipation($id,new
 BigDecimal(0.00485)))};
   
 end

 rule Calculate Participation Ratio
   no-loop true
   when
   
 $context:Context(consolidatdVolume!=null,consolidatdVolume.avgVolume0,
   
 volumeAccumulations[total]!=null,volumeAccumulations[total]0,
   
 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
   then
   ConcurrentMap calculatedRatios=$firm.getCalculatedRatios();
   calculatedRatios.put(fparticipationRatio,new 
 BigDecimal($ratio));
   modify($firm){setCalculatedRatios(calculatedRatios)};
 end

 Despite the checks I get the following exception and any insight into
 why
 would be great:

 Exception executing consequence for rule Calculate Firm Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: /
 by
 zero
 Exception executing consequence for rule Calculate Firm Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: /
 by
 zero
   at
 org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
   at
 org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
   at
 org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
   at
 org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
   at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
   at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
   at
 org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
   at
 com.nasdaq.fq.rms.workflow.processor.rules.PerformanceStatusAssignmentProcessor.doWork(PerformanceStatusAssignmentProcessor.java:156)
   at
 com.ften.ssr.workqueue.WorkItemRunnable.run(WorkItemRunnable.java:48)
   at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)
 Caused by: java.lang.ArithmeticException: / by zero
   at
 ConditionEvaluatorda6271cf5a744b6bbdb9c717cae2edb7.evaluate(Unknown
 Source)
   at
 org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
   at
 org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
   at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:154)
   at
 org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
   at
 org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
   at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
   at
 org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
   at
 org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:432)
   at
 org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
   at
 org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265

Re: [rules-users] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
Another question(on error interpretation) the stack trace seems to indicate
an issue with the consequence and not the condition. Should it be assumed
that seeing such errors could indicate an issue on either side of the rule?  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-divide-by-0-exception-tp4026582p4026594.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] Drools 5.5 divide by 0 exception

2013-11-01 Thread gboro54
$firm should be $context...To post the rule in the public sphere I had to
modify some variables(legal company issues :-) ). The same goes for the rule
name(my replacement of text is not very good).

I understand Wolfgang's point...I just made a poor assumption(something as
someone who has used drools for several years I shouldn't have done...every
once and a while I guess I get a brain fart)


Davide Sottara wrote
 Am I wrong or these are not the (only) rules that are being run?
 
 1) The exception is thrown as the consequence of a rule called
 
 com.nasdaq.rms.nq.status.Rule_Calculate_Firm_Participation_Ratio_cfb033f33c2b404fb2bff8e1b9af0175
 
 Rule Calculate Firm Participation Ratio, which is not shown.
 
 2) The Rule Add baseline to context... modifies a $firm which is not
 bound anywhere
 in that rule..
 
 3) Looking at the stack trace, the consequence happens in a MVEL
 Constraint, which
 is in an Alpha Node immediately after an ObjectTypeNode. This usually
 means that
 the failing constraint is the first in the pattern, which is not the
 case in your
 Calculate  Participation Ratio.
 (to Wolfgang's point: it is not mandatory, since and is commutative,
 but this is what
 usually happens in practice)
 
 You also have multiple threads... is that avgVolume computed using an
 accumulate
 somewhere? I wonder if there are critical races.
 
 On 11/01/2013 11:17 AM, gboro54 wrote:
 Agreed. In this case it is possible to move to the RHS...but I have to
 ask
 what if I need to use the math as part of a constraint. Is it not safe to
 assume the divisor is 0 even if I do the check? That seems like an issue
 as
 I do have cases which this will be required


 Stephen Masters wrote
 Given that you don’t seem to using the result as a constraint, then I
 can’t see any benefit to it being on the LHS. So yes, It would be better
 on the RHS.

 Steve


 On 1 Nov 2013, at 17:58, Wolfgang Laun lt;
 wolfgang.laun@
 gt; wrote:

 I can anticipate the answer where OP says that there is a constraint
 restricting argVolume to  0. However, I don't think that independent
 constraints such as we see them in this rule are evaluated as if they
 were in a single logical expression, with Java semantics.

 The seductive possibility of binding to a half-baked expression (i.e.,
 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
 should be discarded. This value can safely be computed on the RHS
 where the denominator's  value being !=0 is asserted.

 -W

 On 01/11/2013, Stephen Masters lt;
 stephen.masters@
 gt; wrote:
 Divide by zero exceptions usually occur when you try to divide by
 zero.

 So … first question … is consolidatdVolume.avgVolume ever zero?


 On 1 Nov 2013, at 16:17, gboro54 lt;
 gboro54@
 gt; wrote:
 I have rules like the following:

 rule Add Baseline to Context if it does not exists exists or not
 greater
 then 0
  no-loop true
  when
  $context:Context($id:id,baselineParticipation==null ||
  
 baselineParticipation.baselineRatio==null||baselineParticipation.baselineRatio==0)
  then
  modify($firm) {setBaselineParticipation(new
 BaselineParticipation($id,new
 BigDecimal(0.00485)))};
  
 end

 rule Calculate Participation Ratio
  no-loop true
  when
  
 $context:Context(consolidatdVolume!=null,consolidatdVolume.avgVolume0,

 volumeAccumulations[total]!=null,volumeAccumulations[total]0,

 $ratio:(volumeAccumulations[total]/consolidatdVolume.avgVolume))
  then
  ConcurrentMap calculatedRatios=$firm.getCalculatedRatios();
  calculatedRatios.put(fparticipationRatio,new 
 BigDecimal($ratio));
  modify($firm){setCalculatedRatios(calculatedRatios)};
 end

 Despite the checks I get the following exception and any insight into
 why
 would be great:

 Exception executing consequence for rule Calculate Firm
 Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: /
 by
 zero
 Exception executing consequence for rule Calculate Firm
 Participation
 Ratio in com.nasdaq.rms.nq.status: java.lang.ArithmeticException: /
 by
 zero
  at
 org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
  at
 org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
  at
 org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
  at
 org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
  at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
  at
 org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
  at
 org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
  at
 com.nasdaq.fq.rms.workflow.processor.rules.PerformanceStatusAssignmentProcessor.doWork(PerformanceStatusAssignmentProcessor.java:156)
  at
 com.ften.ssr.workqueue.WorkItemRunnable.run(WorkItemRunnable.java

[rules-users] Guvnor 5.5 convert excel decision table to web error

2013-10-23 Thread gboro54
In guvnor 5.5, when trying to convert an excel based decision table to a web
based one, using the convert button, we get the following exception:

.drools.guvnor.client.rpc.AssetService.convertAsset(java.lang.String,java.lang.String)
throws com.google.gwt.user.client.rpc.SerializationException' threw an
unexpected exception: java.lang.IndexOutOfBoundsException: Index: 8, Size: 4
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
[gwt-servlet-2.4.0.jar:]
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
[gwt-servlet-2.4.0.jar:]
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
[gwt-servlet-2.4.0.jar:]
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
[gwt-servlet-2.4.0.jar:]
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
[gwt-servlet-2.4.0.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
[solder-impl-3.1.1.Final.jar:3.1.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
[solder-impl-3.1.1.Final.jar:3.1.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: java.lang.IndexOutOfBoundsException: Index: 8, Size: 4
at java.util.ArrayList.addAll(ArrayList.java:497) [rt.jar:1.6.0_31]
at
org.drools.guvnor.server.converters.decisiontable.builders.GuidedDecisionTableLHSBuilder.addPatternColumn(GuidedDecisionTableLHSBuilder.java:293)
[classes:]
at
org.drools.guvnor.server.converters.decisiontable.builders.GuidedDecisionTableLHSBuilder.populateDecisionTable(GuidedDecisionTableLHSBuilder.java:168)
[classes:]
at
org.drools.guvnor.server.converters.decisiontable.GuidedDecisionTableGeneratorListener.populateDecisionTable(GuidedDecisionTableGeneratorListener.java:244)
[classes:]
at
org.drools.guvnor.server.converters.decisiontable.GuidedDecisionTableGeneratorListener.finishRuleTable(GuidedDecisionTableGeneratorListener.java:233)
[classes:]
at

Re: [rules-users] Guvnor 5.5 convert excel decision table to web error

2013-10-23 Thread gboro54
Created Jira: https://issues.jboss.org/browse/GUVNOR-2057 


manstis wrote
 Can you please raise a JIRA for Guvnor and attach a XLS file demonstrating
 the bug.
 
 Thanks
 
 Sent on the move
 On 23 Oct 2013 15:59, gboro54 lt;

 gboro54@

 gt; wrote:
 
 In guvnor 5.5, when trying to convert an excel based decision table to a
 web
 based one, using the convert button, we get the following exception:


 .drools.guvnor.client.rpc.AssetService.convertAsset(java.lang.String,java.lang.String)
 throws com.google.gwt.user.client.rpc.SerializationException' threw an
 unexpected exception: java.lang.IndexOutOfBoundsException: Index: 8,
 Size:
 4
 at
 com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
 [gwt-servlet-2.4.0.jar:]
 at
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
 [gwt-servlet-2.4.0.jar:]
 at

 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
 [gwt-servlet-2.4.0.jar:]
 at

 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
 [gwt-servlet-2.4.0.jar:]
 at

 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
 [gwt-servlet-2.4.0.jar:]
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
 [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
 [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
 at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
 [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
 at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
 [solder-impl-3.1.1.Final.jar:3.1.1.Final]
 at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
 [solder-impl-3.1.1.Final.jar:3.1.1.Final]
 at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
 [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
 at

 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 [jbossweb-7.0.13.Final.jar:]
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
 [jbossweb-7.0.13.Final.jar:]
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
 [jbossweb-7.0.13.Final.jar:]
 at

 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
 [jbossweb-7.0.13.Final.jar:]
 at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
 [jbossweb-7.0.13.Final.jar:]
 at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
 Caused by: java.lang.IndexOutOfBoundsException: Index: 8, Size: 4
 at java.util.ArrayList.addAll(ArrayList.java:497)
 [rt.jar:1.6.0_31]
 at

 org.drools.guvnor.server.converters.decisiontable.builders.GuidedDecisionTableLHSBuilder.addPatternColumn(GuidedDecisionTableLHSBuilder.java:293)
 [classes:]
 at

 org.drools.guvnor.server.converters.decisiontable.builders.GuidedDecisionTableLHSBuilder.populateDecisionTable(GuidedDecisionTableLHSBuilder.java:168)
 [classes

[rules-users] Drools Multi level map access(Drools 5.5)

2013-10-07 Thread gboro54
I have a map that contains a map(MapString, Maplt;String,Object). I know
you get to the first map via mapField[key] but how do you then access the
object in the second map? 

I have tried mapField[parentKey][childKey] and
mapField[parentKey].[childKey]. I also  tried binding the parent map to
a variable and accessing but still to no luck.

Thanks!



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Multi-level-map-access-Drools-5-5-tp4026284.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] Drools Multi level map access(Drools 5.5)

2013-10-07 Thread gboro54
That is what I thought but just wanted to confirm that there was no other
way. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Multi-level-map-access-Drools-5-5-tp4026284p4026290.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] Reevaluate rules on collect

2013-09-30 Thread gboro54
I have the following three rules:

rule Create Acct Context
when
$Acct:Acct()
not (exists(AcctContext(Acct ==$Acct)))
then
insert(new AcctContext($Acct));
end

rule Add Acct Statuses to AcctContext
no-loop true
when
$AcctContext:AcctContext($Acct:Acct)
$AcctStatuses : List()
from collect ( 
AcctPerformanceStatus(acctId==$Acct.id))
then
modify($AcctContext) {addAllAcctStatuses($AcctStatuses) };
end

rule Test
when
AcctContext(getAcctStatus(Test1)!=null)
then
System.out.println(Good!);
end

I would expect that after the first 2 rules fire, that my 3rd rule would
fire if the data is there successfully(which I have done in my unit test).
However the 3rd rule never fires. Any thoughts into how to accomplish this?
We are using drools 5.5 so perhaps property reactive? These rules are
creating a context/wrapper object to make decision tables easier to
write/manage for our business users.

Thanks!



--
View this message in context: 
http://drools.46999.n3.nabble.com/Reevaluate-rules-on-collect-tp4026194.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] Guvnor 5.5 get available snapshots for package

2013-08-15 Thread gboro54
Looking at the Rest API I don't see a way to get a list of available
snapshots for a given package. Is there a way to do this?  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-5-get-available-snapshots-for-package-tp4025565.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] Guvnor 5.5 get available snapshots for package

2013-08-15 Thread gboro54
Trying to access this via webdav I get a 404 when I hit the following link:

http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/webdav/com.example.package/


Any thoughts? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-5-get-available-snapshots-for-package-tp4025565p4025566.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] Guvnor 5.5 get available snapshots for package

2013-08-15 Thread gboro54
gboro54 wrote
 Trying to access this via webdav I get a 404 when I hit the following
 link:
 
 http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/webdav/com.example.package/
 
 
 Any thoughts?

This seems to be related to https://issues.jboss.org/browse/GUVNOR-1986.
When I try it with a windows remote file I see the stacktrace in the logs
What is the workaround for this or where can I download guvnor 5.6



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-5-get-available-snapshots-for-package-tp4025565p4025567.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] Guvnor 5.5 get available snapshots for package

2013-08-15 Thread gboro54
Here is the stack trace

JAAS authentication failed: javax.security.auth.login.FailedLoginException:
Password Incorrect/Password Required
at
org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270)
[picketbox-4.0.7.Final.jar:4.0.7.Final]
at sun.reflect.GeneratedMethodAccessor494.invoke(Unknown Source)
[:1.6.0_31]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[rt.jar:1.6.0_31]
at java.lang.reflect.Method.invoke(Method.java:597)
[rt.jar:1.6.0_31]
at
javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
[rt.jar:1.6.0_31]
at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
[rt.jar:1.6.0_31]
at
javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
[rt.jar:1.6.0_31]
at java.security.AccessController.doPrivileged(Native Method)
[rt.jar:1.6.0_31]
at
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
[rt.jar:1.6.0_31]
at
javax.security.auth.login.LoginContext.login(LoginContext.java:579)
[rt.jar:1.6.0_31]
at
org.jboss.seam.security.jaas.JaasAuthenticator.authenticate(JaasAuthenticator.java:66)
[seam-security-3.2.0-SNAPSHOT.jar:3.2.0-SNAPSHOT]
at
org.jboss.seam.security.jaas.JaasAuthenticator$Proxy$_$$_WeldClientProxy.authenticate(JaasAuthenticator$Proxy$_$$_WeldClientProxy.java)
[seam-security-3.2.0-SNAPSHOT.jar:3.2.0-SNAPSHOT]
at
org.jboss.seam.security.IdentityImpl.authenticate(IdentityImpl.java:244)
[seam-security-3.2.0-SNAPSHOT.jar:3.1.0.Final]
at org.jboss.seam.security.IdentityImpl.login(IdentityImpl.java:180)
[seam-security-3.2.0-SNAPSHOT.jar:3.1.0.Final]
at
org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.login(IdentityImpl$Proxy$_$$_WeldClientProxy.java)
[seam-security-3.2.0-SNAPSHOT.jar:3.1.0.Final]
at
org.drools.guvnor.server.files.AuthorizationHeaderChecker.loginByHeader(AuthorizationHeaderChecker.java:63)
[guvnor-webapp-core-5.5.0.Final.jar:5.5.0.Final]
at
org.drools.guvnor.server.files.AuthorizationHeaderChecker$Proxy$_$$_WeldClientProxy.loginByHeader(AuthorizationHeaderChecker$Proxy$_$$_WeldClientProxy.java)
[guvnor-webapp-core-5.5.0.Final.jar:5.5.0.Final]
at
org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:68)
[guvnor-webapp-core-5.5.0.Final.jar:5.5.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
[solder-impl-3.1.1.Final.jar:3.1.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
[solder-impl-3.1.1.Final.jar:3.1.1.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.13.Final.jar:]

[rules-users] Drools 5.5 Percentage rules

2013-08-14 Thread gboro54
I am trying to craft rules which deal with percentage of 2 numbers(some
percentages are like .1%).  A rule like the following I can't get to fire
for bigger numbers. Any thoughts on this would be great!

rule 'Added through MPID  0.1% TCV'
when
 billableItem:BillableItem(code in (A,7,8),
isPriceUnderDollar==false)
   
$a:AccountVolumeAccumulation(accountId==$billableItem.accountNumber,accumulationType==Add-All,
((volume * 100.0f)/$consolidatedVolume.volume) .1)
then
$billableItem.setPrice(t);
end

please note that $consolidatedVolume is a global variable(this is static
data)



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-Percentage-rules-tp4025545.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] Drools 5.5 Percentage rules

2013-08-14 Thread gboro54
I am not even sure(I had an issue with integer division vs float thus my
original issue so not sure why I typed for bigger numbers). Additionally it
helps if I that my boundaries are correct(i.e I had a rule that looked for
less then 1.5 and a rule that looked for a value greater then 1.6 so where
does 1.5 fall...stupid me)

As per usual this was user error 


laune wrote
 What do you mean by for bigger numbers?
 -W
 
 On 14 August 2013 18:56, gboro54 lt;

 gboro54@

 gt; wrote:
 I am trying to craft rules which deal with percentage of 2 numbers(some
 percentages are like .1%).  A rule like the following I can't get to fire
 for bigger numbers. Any thoughts on this would be great!

 rule 'Added through MPID  0.1% TCV'
 when
  billableItem:BillableItem(code in (A,7,8),
 isPriceUnderDollar==false)

 $a:AccountVolumeAccumulation(accountId==$billableItem.accountNumber,accumulationType==Add-All,
 ((volume * 100.0f)/$consolidatedVolume.volume) .1)
 then
 $billableItem.setPrice(t);
 end

 please note that $consolidatedVolume is a global variable(this is static
 data)



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-5-Percentage-rules-tp4025545.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-Percentage-rules-tp4025545p4025547.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] Drools 5.5 Decision Tables - Add check without requiring user input

2013-08-05 Thread gboro54
Hi!,

  For a decision table is there a way to have a condition column for which
the user just specifies weather the condition is active or deactivate(i.e
specify true or false) but which they only specify active or not.

Thanks,
Mike




--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-5-Decision-Tables-Add-check-without-requiring-user-input-tp4025346.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] Kagent and Resource Scanning

2013-06-07 Thread gboro54
Any input on this? If not I will just test(was just trying to save the time )



--
View this message in context: 
http://drools.46999.n3.nabble.com/Kagent-and-Resource-Scanning-tp4024141p4024213.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] Kagent and Resource Scanning

2013-06-05 Thread gboro54
The methods ResourceFactory.getResourceChangeNotifierService().start() and
ResourceFactory.getResourceChangeScannerService().start() start the scanning
services in Drools. My question is does this apply to all knowledge agents
within an application or does this need to be done for all kAgents
separately? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Kagent-and-Resource-Scanning-tp4024141.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] KnowledgeBase in drools 6.0.0.beta1

2013-04-19 Thread gboro54
I am evaluating 6.0.0.beta1 and seem to have issues with the KnowledgeBase.
It looks like it is marked with @Deprecated. What is the proper way to build
the KnowledgeBase in 6(as the documentation still refers to this way).

TIA!



--
View this message in context: 
http://drools.46999.n3.nabble.com/KnowledgeBase-in-drools-6-0-0-beta1-tp4023459.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] KnowledgeBase in drools 6.0.0.beta1

2013-04-19 Thread gboro54
Thanks Mark! I will do my best to reverse engineer what is needed from the
examples.  Is there a good place to get information on changes to the drools
syntax(if any) or additional information on the new algorithms implemented(I
know RETE was going bye-bye)? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/KnowledgeBase-in-drools-6-0-0-beta1-tp4023459p4023461.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] Drools and Hadoop

2013-04-11 Thread gboro54
We basically have a batch application which needs to be able to pump through
2 billion records and apply a relatively small ruleset(say a couple hundred
rules). My thought is to look at doing something with Drools and Hadoop but
I am wondering if anyone else has done a large dataset such as this(I have
watched the video on large data drools and it has some good ideas but I am
wondering if there is any other experiences). 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-and-Hadoop-tp4023329.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


[rules-users] Accumulate a on event combinations

2012-10-03 Thread gboro54
We are using expert and fusion to monitor connection events in our system. We
would like to know the most efficient way to know that X number pair of
events have happened in a certain example(i.e eventA and eventB occurred 4
times each in the 5 seconds). What is the most efficient way to do this?  I
don't believe an accumulate would allow a combination of objects but I may
be wrong. Perhaps a live query invoked by a rule?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104.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] Accumulate a on event combinations

2012-10-03 Thread gboro54
I thought it was? Perhaps I worded it wrong. I need to do something similar
to what I stated but the accumulate doesn't want to take the syntax stated
below. Perhaps this is not possible or I am doing something wrong?


laune wrote
 On 03/10/2012, gboro54 lt;

 gboro54@

 gt; wrote:
 Doesn't accumulate have a count by itself? I guess I am trying to figure
 out
 if it is possible to do something like:
 
 Possibly, but that's not what you were asking for in your first post.
 

 rule Raise alarm
 when
Number( intValue 5) from
 accumulate(  $a:EventA( $id:id )
   EventB(eventAId=$id, this after [0s,5s] $a);
 count($a) )
 then
 //do stuff
 end


 laune wrote
 An accumulate with explicitly coded init/action/result lets you
 accumulate
 into
 a custom object that provides exactly the information you want: just
 that there is a matching number of As and Bs, the counts for As and
 Bs, two lists with As and Bs - anything.

 See the Expert doc - there's an example for this sort of thing.

 -W

 On 03/10/2012, gboro54 lt;

 gboro54@

 gt; wrote:
 We are using expert and fusion to monitor connection events in our
 system.
 We
 would like to know the most efficient way to know that X number pair of
 events have happened in a certain example(i.e eventA and eventB
 occurred
 4
 times each in the 5 seconds). What is the most efficient way to do
 this?

 I
 don't believe an accumulate would allow a combination of objects but I
 may
 be wrong. Perhaps a live query invoked by a rule?



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list


 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104p4020107.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104p4020114.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] Accumulate a on event combinations

2012-10-03 Thread gboro54
Understood. Basically EventA is a connection lost event and EventB is a
connection reopened event. In some situations the connection may be try
several times and in this case we want to notify the system of a pulsing
connection. So the ClosedConnectionEvent happens and then if a
OpenConnectionEvent happens within 5 seconds we do nothing(if it's after 5
second we tell the system and a failover would occur).  With that in mind I
feel this will accomplish what I am looking for...thoughts?


rule Pulsing Connection
when
accumulate($close:ConnectionEvent(connectionEventType ==
ConnectionEventType.CLOSE, $closedConnectionId:connectionInformationId) 
and ConnectionEvent(connectionInformationId==
$closedConnectionId,connectionEventType == ConnectionEventType.OPEN, this
after [0s,5s] $close);
$count: count($close); 
$count1)
then
//TODO: Disconnect and go to failover
   
end



laune wrote
 The number of *pairs *of events A, B in the last 5 seconds (according
 to your first post)  is not what you have formulated in  your rule Raise
 alarm.
 This rule (if it were possible to write in this way) appears to count
 EventAs,
 where there is a (== at least one) matching (same id) EventB in the next 5
 seconds, without any limit into the past.
 
 If you are sure that after an EventA there is at most one matching EventB,
 it might simplify matters.
 
 Anyway, make sure to get the requirements right, otherwise it's just
 groping in the dark.
 
 -W
 
 
 On 3 October 2012 19:31, gboro54 lt;

 gboro54@

 gt; wrote:
 
 I thought it was? Perhaps I worded it wrong. I need to do something
 similar
 to what I stated but the accumulate doesn't want to take the syntax
 stated
 below. Perhaps this is not possible or I am doing something wrong?


 laune wrote
  On 03/10/2012, gboro54 lt;

  gboro54@

  gt; wrote:
  Doesn't accumulate have a count by itself? I guess I am trying to
 figure
  out
  if it is possible to do something like:
 
  Possibly, but that's not what you were asking for in your first post.
 
 
  rule Raise alarm
  when
 Number( intValue 5) from
  accumulate(  $a:EventA( $id:id )
EventB(eventAId=$id, this after [0s,5s] $a);
  count($a) )
  then
  //do stuff
  end
 
 
  laune wrote
  An accumulate with explicitly coded init/action/result lets you
  accumulate
  into
  a custom object that provides exactly the information you want: just
  that there is a matching number of As and Bs, the counts for As and
  Bs, two lists with As and Bs - anything.
 
  See the Expert doc - there's an example for this sort of thing.
 
  -W
 
  On 03/10/2012, gboro54 lt;
 
  gboro54@
 
  gt; wrote:
  We are using expert and fusion to monitor connection events in our
  system.
  We
  would like to know the most efficient way to know that X number pair
 of
  events have happened in a certain example(i.e eventA and eventB
  occurred
  4
  times each in the 5 seconds). What is the most efficient way to do
  this?
 
  I
  don't believe an accumulate would allow a combination of objects but
 I
  may
  be wrong. Perhaps a live query invoked by a rule?
 
 
 
  --
  View this message in context:
 
 http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
 
 
  rules-users@.jboss
 
  https://lists.jboss.org/mailman/listinfo/rules-users
 
  ___
  rules-users mailing list
 
  rules-users@.jboss
 
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 
 
  --
  View this message in context:
 
 http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104p4020107.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
 

  rules-users@.jboss

  https://lists.jboss.org/mailman/listinfo/rules-users
 
  ___
  rules-users mailing list

  rules-users@.jboss

  https://lists.jboss.org/mailman/listinfo/rules-users





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104p4020114.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users

 
 ___
 rules-users mailing list

 rules-users@.jboss

 https://lists.jboss.org/mailman/listinfo/rules-users





--
View this message in context: 
http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104p4020116.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users

[rules-users] @expires

2012-10-03 Thread gboro54
Based on testing expiring an event does no remove it from working memory.
What is the best way to manage working memory in the case that after a
period of X seconds you want the event removed? Would you simply write a
rule that would do a retract after a certain window i.e


rule Closed Connection Occured
when
$e:Event(connectionEventType == ConnectionEventType.CLOSE this 
after [20s]
this)
then
retract($e);
end



--
View this message in context: 
http://drools.46999.n3.nabble.com/expires-tp4020117.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] Accumulate a on event combinations

2012-10-03 Thread gboro54
Thanks. I believe you are correct(my threshold is small this is just for some
testing purposes.) I like the idea you have come up with.

Thanks!


Davide Sottara wrote
 What you have written counts how many times a connection to the same
 endpoint (I'm assuming the connectionInformationId represents the target
 endpoint, in some way) has been reopened shortly after being closed. I
 don't know how your connection protocols work, but I could see a perfectly
 legit use case
 where your client connects to your server, closes the connection, then
 hey I forgot something - so it opens (and closes) a new connection. If
 this scenario happens more than once in the lifetime of your monitoring
 system, the rule fires.
 
 I'm not sure that this applies to your usecase, but maybe a better way to
 model the problem would be something like this?
 (please fix the details to match your data structures)
*
 Server( $ep : connectionEP )
*
 accumulate(
   $c : ConnectionEvent( type == CLOSE, target == $ep ) 
*
 over window:time(5m)
*
   and 
   $o : ConnectionEvent( type == OPEN, target == $ep, this after[0,5s] $c
 ),
   $count : count( $c );
   $count  // I'd increase the threshold to 2 or 3... unless you want to
 capture glitches in the connection too
 )
 
 In a nutshell, I would scope the pairs to the context of the same endpoint
 (especially if you can have different connections in parallel!), and I
 would also frame the temporal context within a time window. Is it possible
 that, occasionally, your client forgets somehting and opens two
 (succesful) connections in a row? If this scenario occurred twice in, say,
 a day, the rule you proposed would still fire. 
 
 Best
 Davide





--
View this message in context: 
http://drools.46999.n3.nabble.com/Accumulate-a-on-event-combinations-tp4020104p4020120.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] Drools 5.4 Jitting Error

2012-09-06 Thread gboro54
You are correct from what I have seen...

On Thu, Sep 6, 2012 at 4:41 AM, Caillard, Quentin [via Drools] 
ml-node+s46999n4019621...@n3.nabble.com wrote:

 Sorry, it is a quite old thread. But i am experiencing some jitting error
 with the 5.4.0.Final. If I well understand, the jitting error doesn't stop
 or modify the execution of my rules. Am I right? Can i use this version
 anyway?

 Thanks for your response.

 Regards

 2012/5/17 Mario Fusco [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4019621i=0
 

 I have reported this issue here:
 https://issues.jboss.org/browse/JBRULES-3511
 I have also already fixed it and pushed the fix on the master branch.

 Working on the fix I also found another workaround: even replacing
 feeKeys[1] with feeKeys[1+0] should work. I don't know if this is better
 or
 worse than the former one I suggested, since it is a bit more concise but
 probably also less readable.

 Thanks again for reporting this,
 Mario

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p3999537.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4019621i=1
 https://lists.jboss.org/mailman/listinfo/rules-users




 --




 ___
 rules-users mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4019621i=2
 https://lists.jboss.org/mailman/listinfo/rules-users


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p4019621.html
  To unsubscribe from Drools 5.4 Jitting Error, click 
 herehttp://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3999176code=Z2Jvcm81NEBnbWFpbC5jb218Mzk5OTE3Nnw2NzkwNjAwNTk=
 .
 NAMLhttp://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p4019627.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] Drools 5.4 - Can't catch Exception

2012-08-13 Thread gboro54
I believe this is an issue with the retract in 5.4. I removed all forms of
salience to see if there was a race condition caused by that. Still got the
same exception. I then took it one step more and added agenda groups and set
the order in such a way that the retract rules would be the last popped off
the agenda stack and still the issue arises. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-Can-t-catch-Exception-tp4018981p4019107.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] Drools 5.4 - Can't catch Exception

2012-08-01 Thread gboro54
So I keep getting the exceptions below. I have surrounded the fireAllRules
with a try catch throwable block to try and debug this but I never seem to
be able to catch it.  This only happens in the first couple 100 invocations
of the fireAllRules then never happens again(sometimes it never happens at
all). Is there a way to handle this exception or prevent it from happening?
I am assuming that this is occurring do to an activation being evaluated
after the OrderSideContext is retracted from working memory. Anyone else run
into a similar issue?

TIA
-Mike



07:48:35,377 ERROR [stderr] (Thread-118) Exception in thread Thread-118
java.lang.RuntimeException: unable to invoke method:
com.billing.domain.context.OrderSideContext.getPrimarySide: target of method
is null
07:48:35,377 ERROR [stderr] (Thread-118)at
org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:66)
07:48:35,377 ERROR [stderr] (Thread-118)at
org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37)
07:48:35,378 ERROR [stderr] (Thread-118)at
org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
07:48:35,378 ERROR [stderr] (Thread-118)at
org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:107)
07:48:35,378 ERROR [stderr] (Thread-118)at
org.mvel2.ast.Or.getReducedValueAccelerated(Or.java:34)
07:48:35,378 ERROR [stderr] (Thread-118)at
org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
07:48:35,378 ERROR [stderr] (Thread-118)at
org.mvel2.ast.Substatement.getReducedValueAccelerated(Substatement.java:44)
07:48:35,378 ERROR [stderr] (Thread-118)at
org.mvel2.ast.And.getReducedValueAccelerated(And.java:34)
07:48:35,378 ERROR [stderr] (Thread-118)at
org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
07:48:35,379 ERROR [stderr] (Thread-118)at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
07:48:35,379 ERROR [stderr] (Thread-118)at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
07:48:35,379 ERROR [stderr] (Thread-118)at
org.mvel2.MVEL.executeExpression(MVEL.java:930)
07:48:35,379 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:70)
07:48:35,379 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConditionEvaluator.ensureBranchEvaluation(MvelConditionEvaluator.java:113)
07:48:35,379 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:106)
07:48:35,380 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:90)
07:48:35,380 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:82)
07:48:35,380 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:214)
07:48:35,380 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41)
07:48:35,380 ERROR [stderr] (Thread-118)at
org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201)
07:48:35,381 ERROR [stderr] (Thread-118)at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
07:48:35,381 ERROR [stderr] (Thread-118)at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
07:48:35,381 ERROR [stderr] (Thread-118)at
java.lang.Thread.run(Thread.java:662)
07:48:35,381 ERROR [stderr] (Thread-118) Caused by:
java.lang.NullPointerException
07:48:35,381 ERROR [stderr] (Thread-118)at
sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source)
07:48:35,381 ERROR [stderr] (Thread-118)at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
07:48:35,382 ERROR [stderr] (Thread-118)at
java.lang.reflect.Method.invoke(Method.java:597)
07:48:35,382 ERROR [stderr] (Thread-118)at
org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:40)
07:48:35,382 ERROR [stderr] (Thread-118)... 22 more
07:48:35,856 ERROR [stderr] (Thread-132) Exception in thread Thread-132
java.lang.RuntimeException: unable to invoke method:
com.billing.domain.context.OrderSideContext.getPrimarySide: target of method
is null
07:48:35,856 ERROR [stderr] (Thread-132)at
org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:66)
07:48:35,857 ERROR [stderr] (Thread-132)at
org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37)
07:48:35,857 ERROR [stderr] (Thread-132)at
org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
07:48:35,857 ERROR [stderr] 

Re: [rules-users] fire a rule only once (for the time being)

2012-08-01 Thread gboro54
I don't think it would be outrageous to build a stateful session per user.
The expensive part is building the knowledge base. Session creation is
cheap. 


slyfox wrote
 
 been thinking about this a lot.  I know the real solution is to use
 logical inserts but I'm wondering how it would work in my case.
 
 The problem is that I may have several users with similar rules.  Again,
 its a financial app so if a user wants to know if a price breaks a certain
 threshold, say low for the day, ideally when that low is broken the fact
 should be removed.  However if I do that, would other user's rules ever
 fire (assuming they are looking for the same criteria)?
 
 Would it be outrageous to create one session per user?  Is this a lot of
 overhead?
 




--
View this message in context: 
http://drools.46999.n3.nabble.com/fire-a-rule-only-once-for-the-time-being-tp4018887p4018982.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] MVEL optimizer error

2012-07-24 Thread gboro54
Any thoughts on this at all?



--
View this message in context: 
http://drools.46999.n3.nabble.com/MVEL-optimizer-error-tp4018714p4018877.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] MVEL optimizer error

2012-07-18 Thread gboro54
I was able to reproduce this error locally by updating my version of java to
1.6_31(thought I had but I didn't) The stack trace doesn't give me any
information really to go off of. I have around 150 rules of which a dozen
will retract the object OrderSideContext. Is there a way to get a better
trace to figure out which rule may be causing this? After a retract I
thought all other activations on the agenda for the tuple should be
cancelled. Is this a wrong assertion? 


TIA


gboro54 wrote
 
 I am having an issue with an optimizer stack trace on my linux QA box that
 I can't seem to reproduce on my windows development box.  The stack trace
 is:
 
 13:01:50,188 ERROR [stderr] (Thread-123) Exception in thread Thread-123
 java.lang.RuntimeException: unable to invoke method:
 com.billing.domain.context.OrderSideContext.getPrimarySide: target of
 method is null
 13:01:50,188 ERROR [stderr] (Thread-123)at
 org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:66)
 13:01:50,189 ERROR [stderr] (Thread-123)at
 org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37)
 13:01:50,189 ERROR [stderr] (Thread-123)at
 org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
 13:01:50,189 ERROR [stderr] (Thread-123)at
 org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:107)
 13:01:50,189 ERROR [stderr] (Thread-123)at
 org.mvel2.ast.And.getReducedValueAccelerated(And.java:34)
 13:01:50,189 ERROR [stderr] (Thread-123)at
 org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
 13:01:50,190 ERROR [stderr] (Thread-123)at
 org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
 13:01:50,190 ERROR [stderr] (Thread-123)at
 org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
 13:01:50,190 ERROR [stderr] (Thread-123)at
 org.mvel2.MVEL.executeExpression(MVEL.java:930)
 13:01:50,190 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:70)
 13:01:50,190 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConditionEvaluator.ensureBranchEvaluation(MvelConditionEvaluator.java:113)
 13:01:50,191 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:106)
 13:01:50,191 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:90)
 13:01:50,191 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:82)
 13:01:50,191 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:214)
 13:01:50,191 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41)
 13:01:50,192 ERROR [stderr] (Thread-123)at
 org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201)
 13:01:50,192 ERROR [stderr] (Thread-123)at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 13:01:50,192 ERROR [stderr] (Thread-123)at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 13:01:50,192 ERROR [stderr] (Thread-123)at
 java.lang.Thread.run(Thread.java:662)
 13:01:50,192 ERROR [stderr] (Thread-123) Caused by:
 java.lang.NullPointerException
 13:01:50,193 ERROR [stderr] (Thread-123)at
 sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
 13:01:50,193 ERROR [stderr] (Thread-123)at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 13:01:50,193 ERROR [stderr] (Thread-123)at
 java.lang.reflect.Method.invoke(Method.java:597)
 13:01:50,193 ERROR [stderr] (Thread-123)at
 org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:40)
 13:01:50,193 ERROR [stderr] (Thread-123)... 19 more
 
 
 
 We are using a CENTOS with Java 1.6._31 and drools 5.4.
 
 Thanks
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/MVEL-optimizer-error-tp4018714p4018759.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] MVEL optimizer error

2012-07-16 Thread gboro54
I am having an issue with an optimizer stack trace on my linux QA box that I
can't seem to reproduce on my windows development box.  The stack trace is:

13:01:50,188 ERROR [stderr] (Thread-123) Exception in thread Thread-123
java.lang.RuntimeException: unable to invoke method:
com.billing.domain.context.OrderSideContext.getPrimarySide: target of method
is null
13:01:50,188 ERROR [stderr] (Thread-123)at
org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:66)
13:01:50,189 ERROR [stderr] (Thread-123)at
org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37)
13:01:50,189 ERROR [stderr] (Thread-123)at
org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
13:01:50,189 ERROR [stderr] (Thread-123)at
org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:107)
13:01:50,189 ERROR [stderr] (Thread-123)at
org.mvel2.ast.And.getReducedValueAccelerated(And.java:34)
13:01:50,189 ERROR [stderr] (Thread-123)at
org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
13:01:50,190 ERROR [stderr] (Thread-123)at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
13:01:50,190 ERROR [stderr] (Thread-123)at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
13:01:50,190 ERROR [stderr] (Thread-123)at
org.mvel2.MVEL.executeExpression(MVEL.java:930)
13:01:50,190 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:70)
13:01:50,190 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConditionEvaluator.ensureBranchEvaluation(MvelConditionEvaluator.java:113)
13:01:50,191 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:106)
13:01:50,191 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:90)
13:01:50,191 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:82)
13:01:50,191 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:214)
13:01:50,191 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41)
13:01:50,192 ERROR [stderr] (Thread-123)at
org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201)
13:01:50,192 ERROR [stderr] (Thread-123)at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
13:01:50,192 ERROR [stderr] (Thread-123)at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
13:01:50,192 ERROR [stderr] (Thread-123)at
java.lang.Thread.run(Thread.java:662)
13:01:50,192 ERROR [stderr] (Thread-123) Caused by:
java.lang.NullPointerException
13:01:50,193 ERROR [stderr] (Thread-123)at
sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
13:01:50,193 ERROR [stderr] (Thread-123)at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
13:01:50,193 ERROR [stderr] (Thread-123)at
java.lang.reflect.Method.invoke(Method.java:597)
13:01:50,193 ERROR [stderr] (Thread-123)at
org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:40)
13:01:50,193 ERROR [stderr] (Thread-123)... 19 more



We are using a CENTOS with Java 1.6._31 and drools 5.4.

Thanks

--
View this message in context: 
http://drools.46999.n3.nabble.com/MVEL-optimizer-error-tp4018714.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] Drools 5.4 DSLR Stack Overflow

2012-07-09 Thread gboro54
We recently upgraded to drools 5.4 and are getting the following exception
when trying to compile our dsl and dslrs. Could this be related to our JVM
version(1.6.0_12)?

Caused by: java.lang.StackOverflowError
at java.util.regex.Pattern$Loop.match(Pattern.java:4275) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_12]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_12]
at 

Re: [rules-users] Drools 5.4 DSLR Stack Overflow

2012-07-09 Thread gboro54
We are not running solaris we are on Centos with a Sun JVM. However I believe
the issue is the same and am working on upgrading the JVM on our boxes.


Mario Fusco wrote
 
 I think this is definitively related with the version of the JVM you're
 using. Exactly the same problem has been already reported on a JVM running
 on Solaris ( https://issues.jboss.org/browse/JBRULES-3534 ) and fixed by
 this commit:
 https://github.com/droolsjbpm/drools/commit/caf0d24f53f263e06af17ffcb2f7240cc2d38431
 
 The fix will be available with the 5.4.1, but I am pretty sure that
 updating your JVM (unless you are not on Solaris too) will work for you.
 
 Mario
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-DSLR-Stack-Overflow-tp4018553p4018555.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] Drools 5.4 DSLR Stack Overflow

2012-07-09 Thread gboro54
Even after updating to 1.6.0_31 we still get the following:

Caused by: java.lang.StackOverflowError
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$Loop.match(Pattern.java:4295) 
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
[rt.jar:1.6.0_31]
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)

Re: [rules-users] Drools 5.4 DSLR Stack Overflow

2012-07-09 Thread gboro54
Thanks for the insight. I do have several lines of comments in this format so
perhaps I will try and just change them all over to // for simplification as
a test of this theory..


laune wrote
 
 The Pattern comments in org.drools.lang.dsl.DefaultExpander (defined
 in line 63) is vulnerable when used against strings containing '/*'
 followed by multiple repetitions of '*' alternating with other
 characters before being terminated with '*/'. The pattern
 
 (?:/\\*(?:[^*]|(?:\\*+[^*/]))*\\*+/)
 
 isn't best practice, but it shouldn't cause a stack overflow.
 
 The much simpler pattern
/\\*.*?\\*/
 would serve the same purpose while not causing a stack overflow.
 
 Tested with javac 1.6.0_23
 -W
 
 On 09/07/2012, gboro54 lt;gboro54@gt; wrote:
 Even after updating to 1.6.0_31 we still get the following:

 Caused by: java.lang.StackOverflowError
  at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
 [rt.jar:1.6.0_31]
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-DSLR-Stack-Overflow-tp4018553p4018563.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] Multiple DSL files with Eclipse IDE

2012-06-07 Thread gboro54
I would like to add more then one DSL file to a DSLR file. I understand that
semantically the knowledge base will allow this but is there away to allow
eclipse the ability to view the DRL when multiple DSLs are being used? I
found JBRULES-1615 but I am not sure if this was actually resolved or just
closed. 

Thanks
-Mike

--
View this message in context: 
http://drools.46999.n3.nabble.com/Multiple-DSL-files-with-Eclipse-IDE-tp4017797.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] modify keyword cancels activation unexpectedly

2012-06-06 Thread gboro54
I am using drools 5.4 and am running into a weird issue with using modify
keyword. I have have two rules, both are similar in conditions(one rule
catches 2 additional cases to modify the object with a generic message).
Weather I add the checks for each rule into the into the generic rule or
have a condition checking the object for the more specific messages to be
added, the modify keyword seems to ignore this. In the case where the
conditions are added to the generic rule independent the activation is
cancelled. Any thoughts? I do have property reactive on...

--
View this message in context: 
http://drools.46999.n3.nabble.com/modify-keyword-cancels-activation-unexpectedly-tp4017772.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] modify keyword cancels activation unexpectedly

2012-06-06 Thread gboro54
Thanks for the insightI was able to figure it out with have the generic
rule listen for modifications to a certain property. The problem was that
the method being invoked by the other more specific rules was using a
convince method to modify the field so I needed to annotate the method with
the @Modifies method.  


laune wrote
 
 On 06/06/2012, gboro54 lt;gboro54@gt; wrote:
 I am using drools 5.4 and am running into a weird issue with using modify
 keyword. I have have two rules, both are similar in conditions(one rule
 catches 2 additional cases to modify the object with a generic message).
 Weather I add the checks for each rule into the into the generic rule or
 have a condition checking the object for the more specific messages to be
 added, the modify keyword seems to ignore this. In the case where the
 conditions are added to the generic rule independent the activation is
 cancelled. Any thoughts?
 
 Yes: post more,  or nothing at all.
 -W
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/modify-keyword-cancels-activation-unexpectedly-tp4017772p4017775.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] modify keyword cancels activation unexpectedly

2012-06-06 Thread gboro54
Sorry for that. You are correct more information should have been provided to
allow for help. Usually I am better at this but hurried myself a little this
morning


gboro54 wrote
 
 Thanks for the insightI was able to figure it out with have the
 generic rule listen for modifications to a certain property. The problem
 was that the method being invoked by the other more specific rules was
 using a convince method to modify the field so I needed to annotate the
 method with the @Modifies method.  
 
 
 laune wrote
 
 On 06/06/2012, gboro54 lt;gboro54@gt; wrote:
 I am using drools 5.4 and am running into a weird issue with using
 modify
 keyword. I have have two rules, both are similar in conditions(one rule
 catches 2 additional cases to modify the object with a generic message).
 Weather I add the checks for each rule into the into the generic rule or
 have a condition checking the object for the more specific messages to
 be
 added, the modify keyword seems to ignore this. In the case where the
 conditions are added to the generic rule independent the activation is
 cancelled. Any thoughts?
 
 Yes: post more,  or nothing at all.
 -W
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/modify-keyword-cancels-activation-unexpectedly-tp4017772p401.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] Drools 5.4 Jitting Error

2012-05-17 Thread gboro54
I just updated to Drools 5.4 and I am not getting the following error on all
my map accessors:


10:41:12,997 ERROR [stderr] (Thread-169) Exception in thread Thread-169
java.lang.RuntimeException: Exception jitting: feeKeys[1] == null

10:41:12,998 ERROR [stderr] (Thread-169)at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:219)

10:41:12,999 ERROR [stderr] (Thread-169)at
org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41)

10:41:13,000 ERROR [stderr] (Thread-169)at
org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201)

10:41:13,000 ERROR [stderr] (Thread-169)at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

10:41:13,001 ERROR [stderr] (Thread-169)at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

10:41:13,002 ERROR [stderr] (Thread-169)at
java.lang.Thread.run(Thread.java:662)

10:41:13,002 ERROR [stderr] (Thread-169) Caused by: java.lang.VerifyError:
(class: ConditionEvaluator51817e9f4a7542c5b295be7d674f854c, method: evaluate
signature:
(Ljava/lang/Object;Lorg/drools/common/InternalWorkingMemory;Lorg/drools/reteoo/LeftTuple;)Z)
Expecting to find object/array on stack

10:41:13,004 ERROR [stderr] (Thread-169)at
java.lang.Class.getDeclaredConstructors0(Native Method)

10:41:13,004 ERROR [stderr] (Thread-169)at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

10:41:13,005 ERROR [stderr] (Thread-169)at
java.lang.Class.getConstructor0(Class.java:2699)

10:41:13,005 ERROR [stderr] (Thread-169)at
java.lang.Class.getConstructor(Class.java:1657)

10:41:13,006 ERROR [stderr] (Thread-169)at
org.drools.rule.builder.dialect.asm.ClassGenerator.newInstance(ClassGenerator.java:173)

10:41:13,006 ERROR [stderr] (Thread-169)at
org.drools.rule.constraint.ASMConditionEvaluatorJitter.jitEvaluator(ASMConditionEvaluatorJitter.java:53)

10:41:13,007 ERROR [stderr] (Thread-169)at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:217)

10:41:13,008 ERROR [stderr] (Thread-169)... 5 more



Could anyone indicate how to fix this?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176.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] Drools 5.4 Jitting Error

2012-05-17 Thread gboro54

rule Rule1 trade
no-loop true
when

$tsc:TradeSideContext(trade!=null,primarySide!=null,contraSide!=null)
$trade:Trade($tradeDate:tradeDate, tradeSource == O) from 
$tsc.trade
$ps:TradeSide(capacity.capacityCode == CapacityCode.CUSTOMER) 
from
$tsc.primarySide
$cs:TradeSide(capacity.capacityCode == CapacityCode.CUSTOMER) 
from
$tsc.contraSide
$ft:FeeType(feeKeys[0] == DefaultFeeTypeComponent.RULE_1_SCH, 
feeKeys[1]
== null) from $tsc.baseFee

then

$ft.appendKeyValue(DefaultFeeTypeComponent.RULE_1_ELG);
events.select(new
GenericBillingEvent(BillingEventType.BASE_FEE_EVENT)).fire($tsc);retract($tsc);
end

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p3999199.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] Drools 5.4 Jitting Error

2012-05-17 Thread gboro54
It looks like the rule executes(based on my unit test the proper element is
placed in the list) and it always seems to happen on the my last execution.
In addition I have noticed that the evaluations seem to be handled on other
threads. Is this correct behavior? 



gboro54 wrote
 
 rule Rule1 trade
   no-loop true
   when
   
 $tsc:TradeSideContext(trade!=null,primarySide!=null,contraSide!=null)
   $trade:Trade($tradeDate:tradeDate, tradeSource == O) from 
 $tsc.trade
   $ps:TradeSide(capacity.capacityCode == CapacityCode.CUSTOMER) 
 from
 $tsc.primarySide
   $cs:TradeSide(capacity.capacityCode == CapacityCode.CUSTOMER) 
 from
 $tsc.contraSide
   $ft:FeeType(feeKeys[0] == DefaultFeeTypeComponent.RULE_1_SCH, 
 feeKeys[1]
 == null) from $tsc.baseFee
 
   then
 
   $ft.appendKeyValue(DefaultFeeTypeComponent.RULE_1_ELG);
   events.select(new
 GenericBillingEvent(BillingEventType.BASE_FEE_EVENT)).fire($tsc);retract($tsc);
 end
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p3999228.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] Drools 5.4 Jitting Error

2012-05-17 Thread gboro54
Mario,

  That is what i expected(just wanted to verify). Let me know if any
additional information is needed...


Mario Fusco wrote
 
 In Drools 5.4 we added an optimization that JITs constraints (i.e. compile
 them in bytecode) after they have been evaluated for a given amount of
 times (currently 20). Moreover it is not true that constraints'
 evaluations is made in threads different from the main one. Instead it is
 that jitting process mentioned above that is performed in a different
 threads, so until the optimized version of the constraint isn't ready, the
 main thread isn't blocked but can continue to use the non-jitted one. The
 error you are experiencing is generated during the optimization process
 and that is why you see it happens in different thread. 
 
 I will try to reproduce the issue you found just now.
 Thank you for reporting this.
 
 Mario
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p3999350.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] Drools 5.4 Jitting Error

2012-05-17 Thread gboro54
Thanks Mario! That seems to have resolved the issue. I look forward to your
fix. 


Mario Fusco wrote
 
 Ok, I've been able to reproduce your issue. I'll fix it asap and keep you
 updated on how I am progressing.
 The only (ugly) workaround I could find at the moment is to replace
 feeKeys[1] with feeKeys[new Integer(1)]. 
 Let me know if it works for you.
 
 Mario
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p3999487.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] Multiple DRL for one Package

2012-05-11 Thread gboro54
I have created multiple DRLs declaring the same packaged(logical separation
of rules). When I compile this knowledge base with all the files does the
rete tree get built as if all the rules were in the same file or does each
file get it's own built tree? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Multiple-DRL-for-one-Package-tp3979955.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] Knowledge Base and Multiple Sessions

2012-05-11 Thread gboro54
I did run the test and your assessment is accurate. Sessions using different
knowledge bases to not perform any better. For the most part each thread is
running a separate rule box, however there is one set of rules which all
messages must go through (millions) while the others will have a very small
subset sent to them based on what the first set determined...


Vincent Legendre wrote
 
 I would say no.
 I think that every session has its own RETE nodes filled with its own
 facts. 
 May be the different RETE instances share some evaluators (or at least
 generated dynamic classes that represent nodes) so it could use a bit less
 memory than recreating the same kbase again and again (which can affect
 PermGenSpace on some jvm where GC is not good at purging the permgen).
 But the real perf hit should be due to using multiple Thread in a single
 jvm : if you add too much threads, gc, swap and so on can become long.
 
 To test that may be you can test with using the same kbase for all
 session, and test the same with creating a new kbase for each session, and
 then compare the perfs (ignoring objects creation of course) ...
 ... and post the results back here :)
 
 My own experience of usage of multi-thread with rules is for chaining
 multiple rule box having distinct kbase, so I never tried that.
 
 
 - Mail original -
 De: gboro54 lt;gboro54@gt;
 À: rules-users@.jboss
 Envoyé: Jeudi 10 Mai 2012 19:12:28
 Objet: [rules-users] Knowledge Base and Multiple Sessions
 
 If you have multiple sessions running on different threads against the
 same
 knowledge base, is there any performance hit during evaluation? 
 
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Knowledge-Base-and-Multiple-Sessions-tp3977702.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Knowledge-Base-and-Multiple-Sessions-tp3977702p3980427.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] StatefulKnowledge Session with BatchExecutor

2012-05-11 Thread gboro54
Is there ever a case to use the batch executor with a stateful knowledge
session? Would it be better to insert a large number of records using the
insert or is it better to insert 1 at a time?  

--
View this message in context: 
http://drools.46999.n3.nabble.com/StatefulKnowledge-Session-with-BatchExecutor-tp3980706.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] Knowledge Base and Multiple Sessions

2012-05-10 Thread gboro54
If you have multiple sessions running on different threads against the same
knowledge base, is there any performance hit during evaluation? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Knowledge-Base-and-Multiple-Sessions-tp3977702.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] agenda-groups

2012-05-08 Thread gboro54
I am not currently using agenda-groups. I believe my issue right now is one
of thread safety. A little background: I currently have a thread pulling
messages from a database running on the main thread. In several other
threads, I have drools session being fired every so often. It appears that
there may be a some type of deadlock caused by invoking fireAllRules on one
thread, while another is trying to insert. I am working through right now to
debug the issue. Has anyone else experienced this issue?


Vincent Legendre wrote
 
 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.
 
 Not sure to understand that (note that I am not english native ...)
 
 I see activations created for the facts but they are never fired.  Any
 thoughts on why this may happen?
 
 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus ... 
 Add a first rule that set the focus, or set auto-focus for all your low
 salience rules, or don't set agenda group for them (their group will be
 the MAIN group).
 
 The session is run on a separate thread with fireAllRules called every
 1/2
 second. I have tried syncronizing inserts on the session so that thread
 would not be in the middle of firing when new facts come in but that does
 not seem to do anything
 
 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things in
 that session. 
 insert (or update or retract) will wake up the session.
 
 Of course, one day, you have to call halt() on your session to get out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.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] agenda-groups

2012-05-08 Thread gboro54
What do you recommend?  firUntilHalt seems to get locked out after
sometime... I am running out of ideas and have posted this question before.
I believe we talked about periodically using fireAllRules on a separate
thread.


laune wrote
 
 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.
 
 -W
 
 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now is
 one
 of thread safety. A little background: I currently have a thread pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules on
 one
 thread, while another is trying to insert. I am working through right now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired.  Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your low
 salience rules, or don't set agenda group for them (their group will be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called every
 1/2
 second. I have tried syncronizing inserts on the session so that thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things
 in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.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] agenda-groups

2012-05-08 Thread gboro54
 object
 */
public synchronized void addGlobal(String identifier, Object value) {
if (!running) {
logger.warn(Inserting objects into non-running rules 
session);
}
this.session.setGlobal(identifier, value);

}

/**
 * *Description: * Shutdown the thread the currently running drools
 * session. If set to shutdown in safe mode, object filters will be 
used to
 * determine if any of the filtered objects exists in the session. If 
any
do
 * that the session will stay active until all are removed.
 * 
 * @param safeMode
 *- Weather the session should wait until all facts are 
removed
 *from the running session(Determined by provided object
 *filters)
 */
public synchronized boolean shutDown(boolean safeMode) {

if (logger.isDebugEnabled()) {
logger.debug(Ending session...);

}
if (!safeMode) {
running = false;
} else {
while (!safeToShutDown()) {

}
running = false;
}

return true;

}

/**
 * *Description: * Log all activity of the running drools session. This
 * information is written to an XML formated file in the given file
location
 * and by the file name.***WARNING** Session logging will slow 
performance
 * of the rule session.*
 * 
 * @param fileLocation
 *- The location to output the file to. The location must
exists
 *on disk.
 * @param fileName
 *- The name of the file to write to. If the file does not
 *exists the file will be created.
 */
public synchronized void turnSessionAuditLogOn(String fileLocation,
String fileName) {
sessionLogger = new WorkingMemoryFileLogger(this.session);
if (fileLocation == null || fileLocation.isEmpty()) {
sessionLogger.setFileName(fileName + 
this.runningThreadName);
} else {
sessionLogger.setFileName(fileLocation + / + fileName
+ this.runningThreadName);
}

}

/**
 * *Description: * Using the given object filters determine if there
 * are still objects in the session that we care about before shutting
down;
 * 
 * @return boolean - is the session safe to shut down
 */
private synchronized boolean safeToShutDown() {
boolean safeToShutDown = true;

if (this.filters != null) {
for (ObjectFilter of : this.filters) {
if (this.session.getFactHandles(of).size()  0) 
{
safeToShutDown = false;
break;
}
}
}

return safeToShutDown;
}

}





laune wrote
 
 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.
 
 -W
 
 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now is
 one
 of thread safety. A little background: I currently have a thread pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules on
 one
 thread, while another is trying to insert. I am working through right now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired.  Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your low
 salience rules, or don't set agenda group for them (their group will be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called every
 1/2
 second. I have tried syncronizing inserts on the session so that thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate

Re: [rules-users] agenda-groups

2012-05-08 Thread gboro54
The point is to be able to stream a large volume of messages into the rule
session without tying up that thread. In addition I don't want there to be
millions of messages in a session at a given point, thus the point of
executing the rules on a different thread while inserting facts from
another. 


laune wrote
 
 What about executing insert(s) followed by fireAllRules() in one thread?
 -W
 
 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 What do you recommend?  firUntilHalt seems to get locked out after
 sometime... I am running out of ideas and have posted this question
 before.
 I believe we talked about periodically using fireAllRules on a separate
 thread.


 laune wrote

 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.

 -W

 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now is
 one
 of thread safety. A little background: I currently have a thread
 pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules on
 one
 thread, while another is trying to insert. I am working through right
 now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired. 
 Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your
 low
 salience rules, or don't set agenda group for them (their group will
 be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called
 every
 1/2
 second. I have tried syncronizing inserts on the session so that
 thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert things
 in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get
 out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971305.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] agenda-groups

2012-05-08 Thread gboro54
Perhaps a blocking queue which has facts put on from other threads, the
thread then inserts x number of facts and fires the rule set?


gboro54 wrote
 
 The point is to be able to stream a large volume of messages into the rule
 session without tying up that thread. In addition I don't want there to be
 millions of messages in a session at a given point, thus the point of
 executing the rules on a different thread while inserting facts from
 another. 
 
 
 laune wrote
 
 What about executing insert(s) followed by fireAllRules() in one thread?
 -W
 
 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 What do you recommend?  firUntilHalt seems to get locked out after
 sometime... I am running out of ideas and have posted this question
 before.
 I believe we talked about periodically using fireAllRules on a separate
 thread.


 laune wrote

 Periodically calling fireAllRules() in a thread running parallel to the
 one(s)
 doing insertions doesn't make sense to me.

 -W

 On 08/05/2012, gboro54 lt;gboro54@gt; wrote:
 I am not currently using agenda-groups. I believe my issue right now
 is
 one
 of thread safety. A little background: I currently have a thread
 pulling
 messages from a database running on the main thread. In several other
 threads, I have drools session being fired every so often. It appears
 that
 there may be a some type of deadlock caused by invoking fireAllRules
 on
 one
 thread, while another is trying to insert. I am working through right
 now
 to
 debug the issue. Has anyone else experienced this issue?


 Vincent Legendre wrote

 I am having an issue where I have a catch all
 retraction rule setup as the lowest salience.

 Not sure to understand that (note that I am not english native ...)

 I see activations created for the facts but they are never fired. 
 Any
 thoughts on why this may happen?

 Send some rules. Activations never fired is just too vague to have a
 single answer.
 If you use agenda groups, may be that the group is simply not on
 focus
 ...

 Add a first rule that set the focus, or set auto-focus for all your
 low
 salience rules, or don't set agenda group for them (their group will
 be
 the MAIN group).

 The session is run on a separate thread with fireAllRules called
 every
 1/2
 second. I have tried syncronizing inserts on the session so that
 thread
 would not be in the middle of firing when new facts come in but that
 does
 not seem to do anything

 Why not using fireUntilHalt instead ?
 Run your session.fireUntilHalt in a separate thread, and insert
 things
 in
 that session.
 insert (or update or retract) will wake up the session.

 Of course, one day, you have to call halt() on your session to get
 out.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971245.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971415.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] agenda-groups

2012-05-07 Thread gboro54
If you specify agenda-groups on rules, then in the rule set have rules which
will set focus onto that agenda-group does the group of rules only use the
facts which cause the group to be pushed to the stack or does it evaluate
all objects in working memory? 

--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541.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] agenda-groups

2012-05-07 Thread gboro54
This is what I figured. I am having an issue where I have a catch all
retraction rule setup as the lowest salience. I see activations created for
the facts but they are never fired.  Any thoughts on why this may happen?
The session is run on a separate thread with fireAllRules called every 1/2
second. I have tried syncronizing inserts on the session so that thread
would not be in the middle of firing when new facts come in but that does
not seem to do anything


Vincent Legendre wrote
 
 It reminds me some discussion here about rule base partitionning ...
 
 I am not part of dev team, but I am quite sure that agenda-group (as for
 ruleflow groups) behaves just like any other agenda filter.
 All candidates rules are added to the agenda (so yes, taking all facts in
 account, ie evaluate the whole RETE network), but only some (those with
 the current group) can be executed.
 
 The big difference with a basic agenda filter is relative to which is the
 next current group method :
   - agenda-group : once the agenda has no more rules of this group, the
 current group is popped thus the previous current group become the new
 current one (if stack is empty, go back to MAIN group)
   - ruleflow-group : once the agenda has no more rules of this group, the
 ruleflow is used to set the next current group
 
 
 
 - Mail original -
 De: gboro54 lt;gboro54@gt;
 À: rules-users@.jboss
 Envoyé: Lundi 7 Mai 2012 15:30:48
 Objet: [rules-users] agenda-groups
 
 If you specify agenda-groups on rules, then in the rule set have rules
 which
 will set focus onto that agenda-group does the group of rules only use the
 facts which cause the group to be pushed to the stack or does it evaluate
 all objects in working memory? 
 
 --
 View this message in context:
 http://drools.46999.n3.nabble.com/agenda-groups-tp3968541.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3968650.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] Does Drools have a Rules Authoring engine?

2012-05-02 Thread gboro54
Rule authoring in Drools can be done in 2 ways: with the Eclipse or Guvnor. I
am not sure what you mean by a Rules Authoring Engine though. What
requirements to you have for rule authoring? Are business users or developer
authoring rules?


vsm wrote
 
 Drools is a Business Rules Management Engine. I wanted to know if Drools
 has any front-end application that does Rules Authoring?
 
 If yes, then let me know some additional details about it.
 If not, then any suggestions on which Rules Authoring engine would be a
 good alternative with Drools?
 
 Thanks in advance!
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Does-Drools-have-a-Rules-Authoring-engine-tp3955207p3955537.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] Drools 5.3 Salience

2012-05-02 Thread gboro54
I know using salience is not the best way to order rules but some of our
rules do have a higher priority then others. Since we are writing the rules
using a DSL I have created set set of Priority levels which set the
salience. One of these levels set salience to 0(default value). Is there any
harm in putting this on every rule with no priority for consistence when
reading the rules.

TIA

--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-3-Salience-tp3955545.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] Drools 5.3 Salience

2012-05-02 Thread gboro54
That is what I figured ...just wanted a second opinion. 


Mark Proctor wrote
 
 On 02/05/2012 18:09, gboro54 wrote:
 I know using salience is not the best way to order rules but some of our
 rules do have a higher priority then others. Since we are writing the
 rules
 using a DSL I have created set set of Priority levels which set the
 salience. One of these levels set salience to 0(default value). Is there
 any
 harm in putting this on every rule with no priority for consistence when
 reading the rules.
 There is no performance impact from this. All rules have a salience 
 value, whether you assign it or not, it just defaults to 0.
 
 Mark

 TIA

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Drools-5-3-Salience-tp3955545.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-5-3-Salience-tp3955545p3956857.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] Prevent DSL From replacing certain parts of text

2012-05-01 Thread gboro54
I am utilizing a dsl with a dslr. In my DSL I have a condition work Customer
which maps to a string value. Is there way to prevent the dsl from replacing
this work in certain cases? For example
ruleT1
   when
  Object(value==Customer Help)
   then
  ...
end

When I run the DSL obviously Customer will be replaced. Any thoughts on a
way to prevent this?(I know I could change on of the values from lower to
upper case and it would work but I am hoping for another way)

--
View this message in context: 
http://drools.46999.n3.nabble.com/Prevent-DSL-From-replacing-certain-parts-of-text-tp3953109.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 to load facts with pagination

2012-05-01 Thread gboro54
Not sure if I am right but I believe he has a memory restriction which forces
him not to be able to load a full result set from a query and then feed this
objects into the engine as facts. Unless you have some complicated logic I
would probably do the loading logic outside of the rules. Feed X number of
your objects into your session, fire the rules in the session, then dispose
of the session and start all over for the next X objects. 


laune wrote
 
 Chances are high that you aren't asking the right question but based
 on the meagre information you provide I can't even propose a better
 question.
 
 Consider not only loading but also unloading.
 
 Does the logic for loading the next bunch of facts warrant rules?
 
 -W
 
 
 On 30/04/2012, mariofox lt;mariofox@gt; wrote:
 Hi.

 I'm running drools in a project with millions of facts to process. My
 memory
 doesn't allow me to load all of my facts, so I have to load N objects at
 once, then start over with next N objects, and so on.

 Is it a good idea to let Drools to manage Pagination? I mean, create
 rules
 in Drools with the purpose of loading facts?, or should I have to do this
 by
 executing a Drools session from java in a loop?. My main goal is
 performance.

 Thanks!

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rule-to-load-facts-with-pagination-tp3951591.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-to-load-facts-with-pagination-tp3951591p3953288.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] modify, retract, setFocus and Salience

2012-04-27 Thread gboro54
I will take a stab at answering this:
-Modify and Retract will cause the tree to be re-evaluated for the current
facts in memory. This may cause new activations or cancellations to occur.
Be forewarned that a rule that modifies a fact may cause a continuous loop
if the conditions for that rule are always satisfied. If you wish to not
have this behavior look at no-loop

-Salience: Can be useful but I have found that using a controller fact to
order execution is more efficient. The problem with Salience is that it can
cause your tree to become to linear thus the behavior of the rules engine is
more like a bunch of if statements rather then being able to match patterns
and fire. I do use salience for some rules but try not to over do it

-setFocus: I don't have anything wrong with this. This allows you to
segments your rules into agenda groups.

I am sure someone else on here can add more. 
-Mike


aps4u wrote
 
 will these conditions make any trouble? waiting for a reply..
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/modify-retract-setFocus-and-Salience-tp3942799p3944319.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] Contains an object

2012-04-26 Thread gboro54
Is there a way to use contains with an object? i.e

obj:Object(collection contains SubObject(string=TST,int=1))


I know you could do a from but we are writing a DSL and it would be great if
I could accomplish something like this above

TIA!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Contains-an-object-tp3941334p3941334.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] Contains an object

2012-04-26 Thread gboro54
I guess I could also have a method on my main object that takes parameters
and just do a not null check...


gboro54 wrote
 
 Is there a way to use contains with an object? i.e
 
 obj:Object(collection contains SubObject(string=TST,int=1))
 
 
 I know you could do a from but we are writing a DSL and it would be great
 if I could accomplish something like this above
 
 TIA!
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Contains-an-object-tp3941334p3941343.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


  1   2   >