[rules-users] Drools Perm gen grows constantly

2013-11-07 Thread pmander
Fairly new to drools here but we are using it on a standalone application to
do some batch processing. The application is spring based and
single-threaded. I am using a single stateful session that I build around
15,000 rules dynamically on process startup. 

The application then receives a message to process a set of records through
the rules and write out the results. To do this I insert the data as facts
and run a query to get the results. I must then remove all the facts that I
created and also all the object that where created by the rules so that the
session can be used for the next batch of records. 

This works fine and meets our performance requirements. However, after a
time the process fails and upon investigation this is due to the perm gen
space filling up with classes. The heap itself is fine and steady by the
number of classes in the JVM keeps growing. These classes are all
DefaultConsequenceInvokerGenerated classes appear to be created when my new
facts are inserted. 

This is running on a 1.7 oracle JVM and I've tried -XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled but nothing helps. 

So is this expected behaviour? Is there an issue with how I am using drools? 

Any help much appreciated.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Perm-gen-grows-constantly-tp4026673.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] Rule Example

2013-11-07 Thread chakez30
I have some requirements regarding with my final project can someone help me
formulate the rules? Thanks!



--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-Example-tp4026674.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 Example

2013-11-07 Thread Michael Anstis
rule don't ask stupid questions
when
   Request( information == null )
then
   System.out.println(Move along, nothing to see here.);
end


On 7 November 2013 11:10, chakez30 dspecialis...@yahoo.com wrote:

 I have some requirements regarding with my final project can someone help
 me
 formulate the rules? Thanks!



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

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

Re: [rules-users] Rule Example

2013-11-07 Thread chakez30
rule if you have nothing good to say
when
   Response( information == Bully)
then
   System.out.println(Just shut up.);
end



--
View this message in context: 
http://drools.46999.n3.nabble.com/Rule-Example-tp4026674p4026676.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 Example

2013-11-07 Thread Demian Calcaprina
It would be nice if you can put some of your requirements here. So that
people who has similar requirements may benefit for the discussion..

Regards,

Demian


On Thu, Nov 7, 2013 at 8:28 AM, chakez30 dspecialis...@yahoo.com wrote:

 rule if you have nothing good to say
 when
Response( information == Bully)
 then
System.out.println(Just shut up.);
 end



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

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

Re: [rules-users] Creating selection filter for PlanningEntity with 4 planning variables

2013-11-07 Thread maciekpob
We are developing an application whose PlanningEntity has multiple planning
variables, in fact 4.  There are some moves that we do not want to select.
To ensure that the values proposed (moves) for the 4 different variables do
not break a constraint (between them).  We wanted to filter out inacceptable
move configurations instead of using the score function to check the
constraints.

We studied the MoveSelector and SelectorFilter APIs and we implemented a
ChangeMove SelectionFilter as an UnionMoveSelector of ChangeMoves of the
four variables.   The SelectionFilter is written to accept or refuse the
values (of the 4 variables) proposed.

 

However we encounter problems:

-  The same ChangeMove (with same values of the 4 variables)  are
proposed in consecutive moves and hence invocations of SelectionFilter

-  The SelectionFilter rejects the values since it breaks
constraints

Then the we get a warning : “Bailing out of neverEnding selector ({}) to
avoid infinite loop”.

 

Hence we have been unable to implement the SelectionFilter for our purposes. 

Could you advise us?





--
View this message in context: 
http://drools.46999.n3.nabble.com/Creating-selection-filter-for-PlanningEntity-with-4-planning-variables-tp4026575p4026679.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] Creating selection filter for PlanningEntity with 4 planning variables

2013-11-07 Thread Geoffrey De Smet

On 07-11-13 16:21, maciekpob wrote:
 We are developing an application whose PlanningEntity has multiple planning
 variables, in fact 4.  There are some moves that we do not want to select.
 To ensure that the values proposed (moves) for the 4 different variables do
 not break a constraint (between them).  We wanted to filter out inacceptable
 move configurations instead of using the score function to check the
 constraints.

 We studied the MoveSelector and SelectorFilter APIs and we implemented a
 ChangeMove SelectionFilter as an UnionMoveSelector of ChangeMoves of the
 four variables.   The SelectionFilter is written to accept or refuse the
 values (of the 4 variables) proposed.

   

 However we encounter problems:

 -  The same ChangeMove (with same values of the 4 variables)  are
 proposed in consecutive moves and hence invocations of SelectionFilter
A) First, see what happens if you put on the unionMoveSelector 
cacheType=PHASE (or STEP).
By using a cacheType != JIT you guarantee that the same ChangeMove 
cannot be selected twice.

I would expect you to go out of memory in that case.
If that's not the case - then see C).

B) Next, see what happens if you put the cacheType=PHASE (or STEP) on 
every changeMove, but not in unionMoveSelector.
This probably fixes the problem and might be your favorite way to do things.
But I want to know why you're getting the bailout, so do figure that out 
and reply :)

 -  The SelectionFilter rejects the values since it breaks
 constraints

 Then the we get a warning : “Bailing out of neverEnding selector ({}) to
 avoid infinite loop”.
C) Bailout is normally almost impossible to occur. Let me explain bailout.
Bailout only applies with filtering for cacheType=JIT, because JIT 
selectors are neverEnding.
Bailout happens if it's has selected (size * 10) moves (so if there are 
1 million possible moves, it must have selected 10 million moves)
AND not a single one of them was accepted by the filter.

Given the fact that it keeps selecting the same move - and that move is 
not accepted, that might explain this though.
So the real question is why does it keep selecting the same move? Is 
there only 1 move?


PS: what version are you using?
I remember fixing a bailout related problem in one of the CR's. Make 
sure you're using 6.0.0.CR5 or higher.
   

 Hence we have been unable to implement the SelectionFilter for our purposes.

 Could you advise us?








 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Creating-selection-filter-for-PlanningEntity-with-4-planning-variables-tp4026575p4026679.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.

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

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

Re: [rules-users] Optaplanner JAXB

2013-11-07 Thread Geoffrey De Smet

  
  
No, because the *Config classes aren't annotated with JAXB
annotations.
There's a open discussion if we want to migrate from XStream to
JAXB, so we can offer an XSD of the solver config.

Also note, that these 2 things are completely distinct:
1) read a solver configuration from XML
2) read a solution dataset from XML (~ProblemIO)

For 2), you can very easily replace XStreamProblemIO with a
JaxbProblemIO (which should be easy to write).

On 07-11-13 17:59, Jugu Dannie wrote:


  The optaplanner uses XStream for reading the solver
configuration from XML. For using JAXB instead, is it sufficient
to have custom implementation of XMLSolverFactory and
SolverConfig?
  
  
  
  
  ___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


  

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

[rules-users] lock-on-active

2013-11-07 Thread Stephen Masters
Hi folks,

According to the user guide, lock-on-active “inhibits additional activations of 
all rules with this flag set within the same rule flow or agenda group”.

I was doing a little testing of some rules earlier today, and noticed that 
lock-on-active seems to change behaviour when applied to rules which don’t have 
an agenda-group or rules flow-group defined. It also seemed to have a slightly 
inconsistent effect, although that may just be me not realising what it’s 
supposed to do.

There doesn’t appear to be any documentation of what the attribute means when a 
rule is not part of a rule flow or agenda group. So I was wondering whether 
perhaps there is an expected/official behaviour, which is just not documented. 
Or is lock-on-active without a rule flow or agenda group an error? In which 
case is there a reason why it doesn’t cause a compilation error when the 
knowledge base is built?

Yours curiously...

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


Re: [rules-users] lock-on-active

2013-11-07 Thread Davide Sottara
Lock-on-active was very recently the subject of a bad bug, DROOLS-281,
which has been fixed a few days ago.
This said, all rules that do not have an explicit group set end up in
the MAIN (or DEFAULT, I don't remember)
agenda group and then behave accordingly.
Could you post the Drools version number and some more details on the
example and the unexpected behavior?
Thanks
Davide


On 11/07/2013 03:01 PM, Stephen Masters wrote:
 Hi folks,

 According to the user guide, lock-on-active “inhibits additional activations 
 of all rules with this flag set within the same rule flow or agenda group”.

 I was doing a little testing of some rules earlier today, and noticed that 
 lock-on-active seems to change behaviour when applied to rules which don’t 
 have an agenda-group or rules flow-group defined. It also seemed to have a 
 slightly inconsistent effect, although that may just be me not realising what 
 it’s supposed to do.

 There doesn’t appear to be any documentation of what the attribute means when 
 a rule is not part of a rule flow or agenda group. So I was wondering whether 
 perhaps there is an expected/official behaviour, which is just not 
 documented. Or is lock-on-active without a rule flow or agenda group an 
 error? In which case is there a reason why it doesn’t cause a compilation 
 error when the knowledge base is built?

 Yours curiously...

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


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


Re: [rules-users] lock-on-active

2013-11-07 Thread Stephen Masters
Interesting. It would probably help if the docs made that clear. :)

I’m off to get myself some sleep just now, but I’ll do a push of the repo to 
GitHub tomorrow and point you at the tests.

A summary of the behaviour is that I was seeing multiple activations of a rule, 
which went away when I added “lock-on-active” to that rule. However, that 
didn’t prevent other rules from activating afterwards. Unfortunately in a 
separate test, which added some more rules which would activate first, that 
rule ceased to activate at all. Despite the fact that it was the only rule with 
“lock-on-active” and no rules had an agenda-group attribute.

This is using 5.5. I’ll probably be upgrading to the 5.6 CR tomorrow or at the 
weekend, so I should be able to confirm what happens there.

I came across it because I was experimenting with mechanisms to ensure that a 
rule only activates once. It’s something that I find quite useful in a 
stateless session.

Steve


On 7 Nov 2013, at 22:29, Davide Sottara dso...@gmail.com wrote:

 Lock-on-active was very recently the subject of a bad bug, DROOLS-281,
 which has been fixed a few days ago.
 This said, all rules that do not have an explicit group set end up in
 the MAIN (or DEFAULT, I don't remember)
 agenda group and then behave accordingly.
 Could you post the Drools version number and some more details on the
 example and the unexpected behavior?
 Thanks
 Davide
 
 
 On 11/07/2013 03:01 PM, Stephen Masters wrote:
 Hi folks,
 
 According to the user guide, lock-on-active “inhibits additional activations 
 of all rules with this flag set within the same rule flow or agenda group”.
 
 I was doing a little testing of some rules earlier today, and noticed that 
 lock-on-active seems to change behaviour when applied to rules which don’t 
 have an agenda-group or rules flow-group defined. It also seemed to have a 
 slightly inconsistent effect, although that may just be me not realising 
 what it’s supposed to do.
 
 There doesn’t appear to be any documentation of what the attribute means 
 when a rule is not part of a rule flow or agenda group. So I was wondering 
 whether perhaps there is an expected/official behaviour, which is just not 
 documented. Or is lock-on-active without a rule flow or agenda group an 
 error? In which case is there a reason why it doesn’t cause a compilation 
 error when the knowledge base is built?
 
 Yours curiously...
 
 Steve
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


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


[rules-users] How I18N is built in droolsjbpm workbench projects

2013-11-07 Thread Toshiya Kobayashi
Hello,

To help those who are interested in I18N of droolsjbpm workbench, I have posted 
a wiki page about build tips.

https://community.jboss.org/wiki/HowI18NIsBuiltInDroolsjbpmWorkbenchProjects

Feel free to update the page if you want to correct / add information.

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