[rules-users] Red Hat Job Opening - Software Sustaining Engineer

2014-10-23 Thread Mark Proctor
We are looking to hire someone to help improve the quality of BRMS and BPMS 
platforms. These are the productised versions of the Drools and jBPM open 
source projects.

The role will involve improving our test coverage, diagnosis problems, creating 
reproducers for problems as well as helping fix them. You’ll also be 
responsible for helping to setup and maintain our continue integration 
environment to help streamline the various aspects involved in getting timely 
high quality releases out.

So if you love Drools and jBPM, and want to help make them even better and even 
more robust - then this is the job for you :)

The role is remote, so you can be based almost anywhere.

URL to apply now 
http://jobs.redhat.com/jobs/descriptions/software-engineer-brno-jihomoravsky-kraj-czech-republic-job-1-4759718

Mark




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

Re: [rules-users] setup Guvnor in Mac

2014-10-07 Thread Mark Proctor
What the installation and setup video here http://drools.org/learn/video.html

Mark
On 6 Oct 2014, at 15:02, gopu.shres...@wellsfargo.com wrote:

 
 I am newbie and want to implement Guvnor, I don't find any great steps wise 
 instruction to setup Guvnor in mac. Can anybody help me out?
 
 
 ___
 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] Inconsistent behaviour of insertLogical in rules having from pattern

2014-08-28 Thread Mark Proctor
This list is now closed.

Please use the google group:
https://groups.google.com/forum/#!forum/drools-usage

Are the auto-responders informing people that the list is closed working?

Mark

On 28 Aug 2014, at 14:31, Vincent LEGENDRE vincent.legen...@eurodecision.com 
wrote:

 Forgot to say : using drools 5.6.FINAL
 
 De: Vincent LEGENDRE vincent.legen...@eurodecision.com
 À: Rules Users List rules-users@lists.jboss.org
 Envoyé: Jeudi 28 Août 2014 15:28:49
 Objet: [rules-users] Inconsistent behaviour of insertLogical in rules having 
 from pattern
 
 Hi all,
 
 It is 2 days I am fighting with a strange behaviour of insertLogical in rules 
 having from pattern in conditions : it works the first time, and not after ...
 
 -
 Here is my use-case (simplified) :
 
 I have a class that represent a Flight. A Flight has a start/end datetime and 
 is associated with a Airplane and a list of Crew :
 class Flight {
 String airplaneId;
 ListString crewIds;
 Date start;
 Date end;
 }
 
 I want to maintain an alert list that contains all overlaps for each airplane 
 and each crew. So I have rules like:
 
 rule Overlap Airplane
when
   $f1 : Flight($airplaneId : airplaneId)
   $f2 : Flight(this != $1, airplaneId == $airplaneId, ... and periods 
 intersecting ... )
then
   insertLogical(new Alert(...));
 end
 
 rule Overlap Crews
when
   $f1 : Flight()
   $crew : String from $f1.getCrewIds()
   $f2 : Flight(this != $1, eval($f2.getCrewIds().contains($crew)) , ... 
 and periods intersecting ... )
then
   insertLogical(new Alert(...));
 end
 
 
 -
 Ok. So what I do to test all that stuff :
   - create a new session
   - add a first single Flight -- no alerts at all, normal
   - add a second Flight insersecting the first one with same airplane and 
 same crews list -- 3 new alerts inserted (one for airplane, one for each 
 crew) : normal
   - remove this second Flight -- the 3 preivous alerts are retracted : still 
 ok
   - re-add this second Flight -- only the 'airplane' rule triggers, I only 
 get one new alert insteads of the previous same 3  The alerts not 
 inserted correspond to the rule having 'from' in it
 
 
 -
 To test that it is the source of the problem, I add a new explicit 
 association object that I insert in WM :
 class CrewAffectation {
 String idCrew;
 String idFlight;
 }
 
 For each inserted Flight, I also insert corresponding new CrewAffectation 
 objects. (in case of retract, I retract them of course).
 I change the last rule to something like :
 
 rule Overlap Crews
when
   $f1 : Flight($id1 : id
   $f2 : Flight(this != $1, $id2 : id, ... and periods intersecting ... )
 $crewAff1 : CrewAffectation($idCrew : idCrew, idFlight== $id1)
 $crewAff2 : CrewAffectation(idCrew == $idCrew, idFlight== $id2)   
 then
   insertLogical(new Alert(...));
 end
 And with this 'no-from' approach, everything is working as expected.
 
 -
 In addition, I suspect the truth maintenance system to have leaks, and 
 notably in the source kBase.
 Why ? Because I was facing problems by reusing the same kBase to generate 
 multiples kSessions : The first session created reacted well, while all the 
 folowing not.
 And it was in fact the same problem as the one described here : usage of from 
 and insertLogical in the same rule.
 The first created session adds and retract my 3 alerts, the second created 
 session only adds the airplane alert.
 
 With using the explicit association object, I can reuse my kBase and 
 everything is working well.
 
 -
 Does someone already faced the problem ?
 Does it looks like a real bug to dev team or am I doing something wrong (but 
 as it work once, I guess it is a bug) ?
 
 
 Vincent
 
 
 ___
 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

Re: [rules-users] Kie-Spring Integration

2014-08-25 Thread Mark Proctor
This list is now closed. This list has also moved to Google Groups:
http://drools.org/community/forum.html
https://groups.google.com/forum/#!forum/drools-usage

Mark
On 25 Aug 2014, at 21:26, gribeiro geovanny.ribe...@gmail.com wrote:

 Just reinforcing my question:
 
 I need load rules (.drl files) from a network storage (outside the
 classpath), therefore Maven is not an option for me. Is there a way to do
 that using Kie-Spring or I´ll have to do it programmatically ?
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Kie-Spring-Integration-tp4030717p4030719.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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

[rules-users] Moved to Google Groups

2014-08-21 Thread Mark Proctor
Just a reminder this list has moved to Google Groups:
http://drools.org/community/forum.html
https://groups.google.com/forum/#!forum/drools-usage

Mark

On 20 Aug 2014, at 22:27, Stephen Masters stephen.mast...@me.com wrote:

 May be worth checking what class/interface your bean is. In the code that 
 works, you are casting it to StatelessKieSession, but I suspect that the 
 object which was injected was a KieSession.
 
 Steve
 
 
 
 On 19 Aug 2014, at 15:17, Ged Byrne ged.by...@gmail.com wrote:
 
 Hi Matt,
 
 This may be a problem with Spring rather than KIE.
 
 Take a look at the following:
   * https://jira.spring.io/browse/SPR-9786
   * 
 http://www.javabeat.net/annotation-based-bean-wiring-autowired-in-spring-framework/
 
 Regards, 
 
 
 Ged
 
 
 
 On 16 August 2014 18:56, mattmadhavan mmadha...@facs.org wrote:
 Hello,
 I have the following kie-spring xml definition to test my custom evaluater.
 
 
 
 I am not able to inject neither the *IN_LIST_KBase *nor the
 /IN_LIST_KSession/ in my test class as follows:
 
 
 
 But i am able to look it up via the applicationContext as follows:
 
 
 I am bit confused! Any ideas please?
 
 Thanks in advance!
 
 Matt'M
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Kie-spring-Issues-Not-able-to-autowire-sessions-tp4030663.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users 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] Moved to Google Groups

2014-08-21 Thread Mark Proctor
Just a reminder this list has moved to Google Groups:
http://drools.org/community/forum.html
https://groups.google.com/forum/#!forum/drools-usage

Mark
On 18 Aug 2014, at 12:36, Jean-Christophe Fortier jfort...@adacel.com wrote:

 Hi,
 I'm trying to use the verifier with my rules on drools 5.6 and I got an 
 exception : org.drools.verifier.visitor.UnknownDescriptionException: Descr ( 
 class org.drools.lang.descr.MVELExprDescr ) is unknown to drools verifier. I 
 checked in the source code and this type of descriptor is indeed not handled 
 yet. Do you know if it's fixed in 6.1?
  
 There is also this JIRA that could be useful 
 https://issues.jboss.org/browse/JBRULES-3641
  
 Please let me know of any development.
  
 Thx
  
 Jean-Christophe Fortier
 Concepteur de logiciel
 Software Developer
 first make it work, then make it better
   

 image001.png
  
 895 rue De La Gauchetière Ouest, Suite 300, C.P. 48,
 Montréal (Quebec), H3B 4G1
  
 Tel: 514-636-6365 x.5387
 Fax: 514-636-23626
  
 ___
 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] Moved to google groups

2014-08-21 Thread Mark Proctor
OptaPlanner now has it’s own google groups for discussions:
http://www.optaplanner.org/community/forum.html

Please use the correct group, to reduce the noise to signal ratio. 

Also just a reminder this list has also moved to Google Groups:
http://drools.org/community/forum.html
https://groups.google.com/forum/#!forum/drools-usage

Mark


On 20 Aug 2014, at 22:42, paavanm paavan.mat...@clairvoyantsoft.com wrote:

 I have a relatively simple question. How do I have OptaPlanner use my own
 initialized solution as a starting point instead of having a construction
 heuristic create one? Does this have to be done with a custom SolverPhase?
 
 A little more detail on what I'm trying to do: I am scheduling a series of
 classes and related activities on a calendar. Let's say I have some class
 BA101 that occurs several times a week (these classes are immovable
 entities). There are homeworks, exams etc. associated with these classes
 which I need to schedule. E.g. on Feb 1st, a homework might be due, or on
 Mar 1st, there might be an exam. So I need to schedule time to do the
 homework or time to study for the exam. My initial solution for this would
 be very simple: I would schedule the homework/study time at the same time of
 the class itself, and let optaplanner move it around till it meets my hard 
 soft constraints.
 
 However, when I tried to do that (i.e. give my homework/study tasks an
 actual start time instead of just leaving the start time as null),
 OptaPlanner fell right through without actually making any moves to find the
 best score. How do I do this? This is my config at the moment, pretty basic
 (tried this with  without the construction heuristic; same result):
 
 ?xml version=1.0 encoding=UTF-8?
 solver
 
 
 
 solutionClasscom.copilot.optaplanner.domain.ActivityScheduler/solutionClass
 
 planningEntityClasscom.copilot.optaplanner.domain.Activity/planningEntityClass
 
 
scoreDirectorFactory
scoreDefinitionTypeHARD_SOFT/scoreDefinitionType
 
 simpleScoreCalculatorClasscom.copilot.optaplanner.solver.score.ActivitySchedulingSimpleScoreCalculator/simpleScoreCalculatorClass
/scoreDirectorFactory
 
 
termination
maximumSecondsSpend10/maximumSecondsSpend
/termination
 
constructionHeuristic
constructionHeuristicTypeFIRST_FIT/constructionHeuristicType
/constructionHeuristic
 
localSearch
acceptor
entityTabuSize7/entityTabuSize
/acceptor
forager
acceptedCountLimit1000/acceptedCountLimit
/forager
/localSearch
 
 /solver
 
 Thanks for any assistance.
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Starting-optaplanner-with-your-own-initialized-solution-tp4030697.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] javax.jcr.ReferentialIntegrityException Error while Saving the Rule in Guvnor 5.1.1

2014-08-19 Thread Mark Proctor
Have you tried upgrading to 5.6? It’s unlikely anyone will know what that error 
is below, especially as we’ve moved on from JCR now.

Mark
On 18 Aug 2014, at 13:16, LaKhI ReDdY!!! reddy.laks...@gmail.com 
wrote:

 Hi ,
 
 
 
 I am getting the following error while saving the Rule in Guvnor 5.1.1. Could 
 you please provide suggestions/inputs to resolve the below issue ?  I am 
 using Oracle DB.
 
 
 
 
 
 ERROR 18-08 12:31:22,129 (VersionableItem.java:checkout:637) Error 
 occured while checking out the asset
 
 javax.jcr.ReferentialIntegrityException: Target node 
 298106d4-8786-46ba-b3a3-e9f42d93ac81 of REFERENCE property does not exist
 
 at 
 org.apache.jackrabbit.core.state.SharedItemStateManager$Update.checkReferentialIntegrity(SharedItemStateManager.java:1056)
 
 at 
 org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:574)
 
 at 
 org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1110)
 
 at 
 org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1140)
 
 at 
 org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:351)
 
 at 
 org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
 
 at 
 org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
 
 at 
 org.apache.jackrabbit.core.version.VersionManagerImplBase$WriteOperation.save(VersionManagerImplBase.java:463)
 
 at 
 org.apache.jackrabbit.core.version.VersionManagerImplBase.checkoutCheckin(VersionManagerImplBase.java:209)
 
 
 
 
 
 
 
 Regards,
 
 Reddy
 
 ___
 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] Drools Mailing List migration to Google Groups

2014-08-19 Thread Mark Proctor
Drools community member,

The Drools team are moving the rules-usesrs and rules-dev list to Google 
Groups. This will allow users to have a combined email and web access to the 
group.
New Forum Information : http://drools.org/community/forum.html (click link to 
view)

The rules-users mailing list has become high volume and it seems natural to 
split the group into those asking for help with setup, configuration, 
installation and administration and those who are asking for help with 
authoring and executing of rules. For this reason rules-users will be split 
into two groups - drools-setup and drools-usage.  

Drools Setup - https://groups.google.com/forum/#!forum/drools-setup (click link 
to subscribe)
Drools Usage - https://groups.google.com/forum/#!forum/drools-usage (click link 
to subscribe)

The rules-dev mailing list will move to drools-development. 

Drools Development - https://groups.google.com/forum/#!forum/drools-development 
(click link to subscribe)

Google Groups limits the number of invitations, so we were unable to send 
invitations. For this reason you will need to manually subscribe. 

The Drools Team___
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 Decision Table PermGen space OutOfMemoryError

2014-08-17 Thread Mark Proctor

On 17 Aug 2014, at 01:42, Jan Rose u...@comcast.net wrote:

 Mark, thanks for responding.   Do you have a recommendation as to how much I 
 should 
 increase the perm gen space?  
The more rules, the more permgen space. So there is no recommendation, other 
than “enough”.
  Also, is there anything else I can do to run my decision tables more 
 efficiently?
You can try using the MVEL dialect for your decision table - this uses 
reflection based executions, instead of code and uses less perm gen, in return 
for using more heap.
http://lists.jboss.org/pipermail/rules-users/2011-November/022912.html

Mark
 
 Jan
 
 
 try increasing your perm gen space.
  Mark On 16 Aug 2014, at 04:11, Jan Rose ufos at comcast.net wrote:  
 Would like some advice regarding using Decision Tables in DROOLS 5.6.0 Final. 
  We have decision tables with over 12,000 rows. 
  It is a basic ‘look-up’ table with 3 conditions and 2 actions. 
  The conditions are, for example: Company = X Dept = X Class = X then value = 
 X and log X.
  When I reduced the number of rows to approx. 500 . .. it works.  I have set 
 the max memory in the JVM to 2 gigs. 
  We have tried compiling the decision tables using the spreadsheet compiler 
 as well as the decision table compiler.  
 Below is the error when using the decision table compiler. 
  However, we get the same PermGen space error with the spreadsheet compiler. 
   
 Obviously, we need to be able to have more than 500 rows in our decision 
 table(s). Any advice would be appreciated.   
 Aug 14, 2014 6:33:09 PM com.macys.test.rules.engine.AttribDecisionTbl main  
 INFO: found file:c:\attribute-data.xls  Aug 14, 2014 6:33:10 PM 
 com.macys.test.test_drools.RuleRunner loadRules INFO: Loading file: 
 log-rules.drl  Aug 14, 2014 6:33:10 PM com.macys.test.test_drools.RuleRunner 
 loadRuleFile  INFO: found rule file:log-rules.drl  Aug 14, 2014 6:33:11 PM 
 com.macys.test.test_drools.RuleRunner loadRules  INFO: Loading file: 
 AttributeRules-MDSLife-V1.xls Aug 14, 2014 6:33:11 PM 
 com.macys.test.test_drools.RuleRunner loadExcelRules  INFO: found 
 file:AttributeRules-MDSLife-V1.xls  Exception in thread main 
 java.lang.OutOfMemoryError: PermGen space  at 
 java.lang.ClassLoader.defineClass1(Native Method)  at 
 java.lang.ClassLoader.defineClass(ClassLoader.java:800)  at 
 org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:624)
   at 
 org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
  at 
 org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
   at 
 org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) 
  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)  at 
 org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:434) 
  at 
 org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:429) 
  at 
 org.drools.rule.JavaDialectRuntimeData.onBeforeExecute(JavaDialectRuntimeData.java:257)
   at 
 org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:139)
   at org.drools.compiler.PackageBuilder.reloadAll(PackageBuilder.java:1202) 
  at 
 org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:951)  
 at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:938)  
 at 
 org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:451)
   at 
 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:715)
   at 
 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
   at 
 com.macys.test.test_drools.RuleRunner.loadExcelRules(RuleRunner.java:161)  
 at com.macys.test.test_drools.RuleRunner.loadRules(RuleRunner.java:53)  at 
 com.macys.test.test_drools.RuleRunner.runStatelessRules(RuleRunner.java:217) 
  at 
 com.macys.test.rules.engine.AttribDecisionTbl.main(AttribDecisionTbl.java:99) 
   ___  rules-users mailing 
 list  rules-users at lists.jboss.org  
 https://lists.jboss.org/mailman/listinfo/rules-users -- next part 
 -- An HTML attachment was scrubbed... URL: 
 http://lists.jboss.org/pipermail/rules-users/attachments/20140816/e86011b7/attachment-0001.html
 
 
 Sent from my iPad
 ___
 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] DROOLS 5.6.0 Final Decision Table PermGen space OutOfMemoryError

2014-08-16 Thread Mark Proctor
try increasing your perm gen space.

Mark
On 16 Aug 2014, at 04:11, Jan Rose u...@comcast.net wrote:

 Would like some advice regarding using Decision Tables in DROOLS 5.6.0 Final. 
  We have decision tables with over 12,000 rows.   It is a basic ‘look-up’ 
 table with 3 conditions and 2 actions.  The conditions are, for example:   
 Company = X Dept = X   Class = X then value = X and log X.   When I reduced 
 the number of rows to approx. 500 . .. it works.
 I have set the max memory in the JVM to 2 gigs.   We have tried compiling the 
 decision tables using the spreadsheet compiler as well as the decision table 
 compiler.
 Below is the error when using the decision table compiler.   However, we get 
 the same PermGen space error with the spreadsheet compiler.
  
 Obviously, we need to be able to have more than 500 rows in our decision 
 table(s).Any advice would be appreciated.
  
 Aug 14, 2014 6:33:09 PM com.macys.test.rules.engine.AttribDecisionTbl main 
 INFO: found file:c:\attribute-data.xls 
 Aug 14, 2014 6:33:10 PM com.macys.test.test_drools.RuleRunner loadRules 
 INFO: Loading file: log-rules.drl 
 Aug 14, 2014 6:33:10 PM com.macys.test.test_drools.RuleRunner loadRuleFile 
 INFO: found rule file:log-rules.drl 
 Aug 14, 2014 6:33:11 PM com.macys.test.test_drools.RuleRunner loadRules 
 INFO: Loading file: AttributeRules-MDSLife-V1.xls 
 Aug 14, 2014 6:33:11 PM com.macys.test.test_drools.RuleRunner loadExcelRules 
 INFO: found file:AttributeRules-MDSLife-V1.xls 
 Exception in thread main java.lang.OutOfMemoryError: PermGen space 
 at java.lang.ClassLoader.defineClass1(Native Method) 
 at java.lang.ClassLoader.defineClass(ClassLoader.java:800) 
 at 
 org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.fastFindClass(JavaDialectRuntimeData.java:624)
  
 at 
 org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:254)
  
 at 
 org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
  
 at 
 org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) 
 at java.lang.ClassLoader.loadClass(ClassLoader.java:358) 
 at 
 org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:434) 
 at 
 org.drools.rule.JavaDialectRuntimeData.wire(JavaDialectRuntimeData.java:429) 
 at 
 org.drools.rule.JavaDialectRuntimeData.onBeforeExecute(JavaDialectRuntimeData.java:257)
  
 at 
 org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:139)
  
 at 
 org.drools.compiler.PackageBuilder.reloadAll(PackageBuilder.java:1202) 
 at 
 org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:951) 
 at 
 org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:938) 
 at 
 org.drools.compiler.PackageBuilder.addPackageFromDecisionTable(PackageBuilder.java:451)
  
 at 
 org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:715)
  
 at 
 org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
  
 at 
 com.macys.test.test_drools.RuleRunner.loadExcelRules(RuleRunner.java:161) 
 at 
 com.macys.test.test_drools.RuleRunner.loadRules(RuleRunner.java:53) 
 at 
 com.macys.test.test_drools.RuleRunner.runStatelessRules(RuleRunner.java:217) 
 at 
 com.macys.test.rules.engine.AttribDecisionTbl.main(AttribDecisionTbl.java:99) 
 
 
 ___
 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] Starnge problem with AbstractKieModule while testing, ignores classes folfer

2014-08-13 Thread Mark Proctor
As i mentioned it’s probably a bug, our path searching does not take into 
account there might be two path roots. You’ll need to submit a self contained 
unit test.
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

One work around is to put all your DRLs into one jar, and use that as a 
dependency. Then the paths are merged.

Mark
On 13 Aug 2014, at 17:57, mattmadhavan mmadha...@facs.org wrote:

 Hi Mark,
 This definitely seems to be a problem. I placed my  spring k-module file
 called *kmodule-spring-breast.xml * under src/mail/resouces/META-INF folder,
 I am still getting the error.
 
 But I am referencing the kmodule-spring-breast.xml from a Spring Test file.
 
 Its looking for the .DRL file in the test-classes -ONLY-. Its becoming a
 real pain.
 
 Any suggestions please?
 
 Thanks in advance!
 
 Matt
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Starnge-problem-with-AbstractKieModule-while-testing-ignores-classes-folfer-tp4030641p4030649.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] Sequential and Decision Tables

2014-08-12 Thread Mark Proctor
sounds like you need to use ruleflow/agenda groups. To sequence when each 
worksheet is evaluated.

Mark
On 12 Aug 2014, at 16:14, sjrcgtek steve.cg...@gmail.com wrote:

 Thanks.  It appears that LoadOrder is just within a worksheet, so in my case
 I would need salience defined explicitly in each sheet if I want to control
 order across sheets.  I did not realize, however, that the salience values
 within a sheet could all be the same as then I will fall back to LoadOrder
 within that sheet. 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Sequential-and-Decision-Tables-tp4030631p4030637.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] Annotation @PropertyReactive not works

2014-08-12 Thread Mark Proctor

On 12 Aug 2014, at 15:04, David Moros Claramunt davidmo...@gmail.com wrote:

 I can't make the minimal self contained unit test, but my biggest problem is 
 that the scenarios test in Guvnor fails if classes model are annotated with 
 @PropertyReactive, If I remove this annotation It works fine
Please attest open a JIRA, with as much information as you can - so we can 
avoid losing information on potential bugs.
 
 I don't know that occurs, but I will solve it with any workaround
 
 Thanks a lot to all,
 David Moros
 
 
 
 2014-08-11 15:39 GMT+02:00 Mark Proctor mproc...@codehaus.org:
 You’ll need to submit a self contained minimal unit test, as a pull request.
 http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html
 
 https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/PropertyReactivityTest.java
 
 
 On 11 Aug 2014, at 14:02, David Moros Claramunt davidmo...@gmail.com wrote:
 
 you need exactly?
 model? rules? scenario? log?
 
 I use 5.6.0.Final version
 
 
 2014-08-11 14:56 GMT+02:00 Michael Anstis michael.ans...@gmail.com:
 The problem does not appear to be within Guvnor as such; that just uses the 
 underlying Drools engine.
 
 Can you provide a standalone unit test demonstrating the issue?
 
 
 On 11 August 2014 13:53, David Moros Claramunt davidmo...@gmail.com wrote:
 thanks, it works
 
 I have put the sufix .drl at package URL and works
 
 But now, i have the same problem executing the scenarios test from Guvnor, 
 do you know if issue is in 5.6.0.Final version and patched in later versions?
 
 Thnaks,
 
 
 2014-08-08 15:26 GMT+02:00 Davide Sottara dso...@gmail.com:
 If I remember correctly this is a known issue. Unfortunately drools 5.6 is 
 final and can't be patched. Downloading the source drl rather than the 
 compiled pkg could be a workaround.
 
 Please let me know if it works
 
 Sent via the ASUS PadFone X, an ATT 4G LTE smartphone
 
 
  Original Message 
 From:davidmoros davidmo...@gmail.com
 Sent:Fri, 08 Aug 2014 05:03:29 -0500
 To:rules-users@lists.jboss.org
 Subject:[rules-users] Annotation @PropertyReactive not works
 
 I'm developing a system rules with drools, how any novice I found the problem
 of infinite loops, in unitary test I resolved with annotation
 @PropertyReactive and all works fine, until I uploaded my model and rules to
 Guvnor.
 Now I have developed a webservice that download the PKG from Guvnor, with
 change-set and seems that the annotation @PropertyReactive not works because
 of the same rule is reevaluated constantly although the consecuences the
 rule not change the value of attributes of LHS of rule, and infinite loops
 appears
 The error only occurs when I download the PKG from Guvnor, if I refer the
 file DRL directly all woks fine
 
 Can anybody help me? 
 
 I use 5.6.0.Final Version for Drools and Guvnor, Guvnor and my webservice
 are deployed in Tomcat 
 
 Thanks in advance
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Annotation-PropertyReactive-not-works-tp4030602.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users 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 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

Re: [rules-users] Starnge problem with AbstractKieModule while testing, ignores classes folfer

2014-08-12 Thread Mark Proctor
The logic for what’s going on can be found here:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java

Typically the code is looking for the kmodule.xml in a META-INF. When it finds 
it, it goes the root of that. There isn’t any logic to handle dual roots. I’m 
assuming you put the kmodule.xml in the test/resources/META-INF folder?

What we might be able to do is see if there parent is “target” and if there is 
a child classes and test-classes and treat it as a special case.

Mark

On 12 Aug 2014, at 20:38, mattmadhavan mmadha...@facs.org wrote:

 Hello,
 While unit testing some of my DRL files I notice that, *AbstractKieModule *
 does not look at main classpath. It only checks for the target\test-classes
 and not target\classes folder at all!
 
 I see the following warning on the coonsole!
 
 *2014-08-12 14:15:25,426 [AbstractKieModule] [main] WARN  No files found for
 KieBase BREAST_MASTRT_KBase, searching folder
 \working\MeasureMesh\org.facs.ncdb.measuresmesh\target\test-classes
 *
 
 /My configuration is:/
 
 
 
 My .drl files arr in the package org..x.rules.breast.MASTRT of the
 traget/classes folder, but its not loaded!
 
 Any ideas please?
 
 Thanks
 Matt'M
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Starnge-problem-with-AbstractKieModule-while-testing-ignores-classes-folfer-tp4030641.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] Annotation @PropertyReactive not works

2014-08-11 Thread Mark Proctor
You’ll need to submit a self contained minimal unit test, as a pull request.
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/PropertyReactivityTest.java


On 11 Aug 2014, at 14:02, David Moros Claramunt davidmo...@gmail.com wrote:

 you need exactly?
 model? rules? scenario? log?
 
 I use 5.6.0.Final version
 
 
 2014-08-11 14:56 GMT+02:00 Michael Anstis michael.ans...@gmail.com:
 The problem does not appear to be within Guvnor as such; that just uses the 
 underlying Drools engine.
 
 Can you provide a standalone unit test demonstrating the issue?
 
 
 On 11 August 2014 13:53, David Moros Claramunt davidmo...@gmail.com wrote:
 thanks, it works
 
 I have put the sufix .drl at package URL and works
 
 But now, i have the same problem executing the scenarios test from Guvnor, do 
 you know if issue is in 5.6.0.Final version and patched in later versions?
 
 Thnaks,
 
 
 2014-08-08 15:26 GMT+02:00 Davide Sottara dso...@gmail.com:
 If I remember correctly this is a known issue. Unfortunately drools 5.6 is 
 final and can't be patched. Downloading the source drl rather than the 
 compiled pkg could be a workaround.
 
 Please let me know if it works
 
 Sent via the ASUS PadFone X, an ATT 4G LTE smartphone
 
 
  Original Message 
 From:davidmoros davidmo...@gmail.com
 Sent:Fri, 08 Aug 2014 05:03:29 -0500
 To:rules-users@lists.jboss.org
 Subject:[rules-users] Annotation @PropertyReactive not works
 
 I'm developing a system rules with drools, how any novice I found the problem
 of infinite loops, in unitary test I resolved with annotation
 @PropertyReactive and all works fine, until I uploaded my model and rules to
 Guvnor.
 Now I have developed a webservice that download the PKG from Guvnor, with
 change-set and seems that the annotation @PropertyReactive not works because
 of the same rule is reevaluated constantly although the consecuences the
 rule not change the value of attributes of LHS of rule, and infinite loops
 appears
 The error only occurs when I download the PKG from Guvnor, if I refer the
 file DRL directly all woks fine
 
 Can anybody help me? 
 
 I use 5.6.0.Final Version for Drools and Guvnor, Guvnor and my webservice
 are deployed in Tomcat 
 
 Thanks in advance
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Annotation-PropertyReactive-not-works-tp4030602.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users 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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Sequential and Decision Tables

2014-08-11 Thread Mark Proctor
in 6.x you do not necessarily have to set the salience any more. As LoadOrder 
is applied, and rules will be evaluated by the order of position within the 
file.

Mark
On 11 Aug 2014, at 15:30, Michael Anstis michael.ans...@gmail.com wrote:

 The sequential flag controls the rule's salience per XLS worksheet.
 
 Rule's RHS are executed according to their salience values and hence the 
 sequential flag will control the rules RHS execution order. 
 
 See 
 http://docs.jboss.org/drools/release/6.1.0.Final/drools-docs/html/ch06.html#d0e3942
  and 
 http://docs.jboss.org/drools/release/6.1.0.Final/drools-docs/html/DroolsLanguageReferenceChapter.html#d0e6859
  for more information.
 
 If you want to control the execution across multiple Decision Tables you'll 
 need to define the rows salience manually, with the highest priority 
 Decision Table having values higher than the lower priority tables.
 
 
 On 11 August 2014 15:17, sjrcgtek steve.cg...@gmail.com wrote:
 Apologies if this is already answered but I could not find it.
 
 Drools Version 6.1.0.Final
 
 I have three Excel DTs which I would like to fire in order.  The Sequential
 option appears to just order the rules within an excel DT.  I confirmed that
 by printing the resulting rules and see that the generated rules from
 different sheets have the same priority.
 
 I can manually set the PRIORITY in the actual sheets, but that makes
 inserting sheets or even lines in a sheet cumbersome.
 
 Is there a way to tell drools to fire all rules across all DT's
 sequentially?
 
 Thanks.
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Sequential-and-Decision-Tables-tp4030631.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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

Re: [rules-users] kie:module/kie:base Question

2014-08-09 Thread Mark Proctor
Not currently, but we have thought it would be nice to include ant style
resource filters. But we'd want to do more than just name, and allow
meta-data filter too.

No dates for any of this though yet.

Mark


On Fri, Aug 8, 2014 at 9:33 PM, mattmadhavan mmadha...@facs.org wrote:

 Hello,
 Seems like the only option I have for specifying mu.drl files is via
 package
 nmae as follows:


 is there anyway to specify individual .drl files instead of *packeages* ?
 Something lke

  kie:kbase name=drl_kiesample3 source=classpath:rules/mydrl.drl

 Please note that I am trying to specify the actual .drl file.

 I appreciate in advance!

 Thanks
 Matt



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/kie-module-kie-base-Question-tp4030615.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] Mocking Guvnor

2014-08-08 Thread Mark Proctor
the updates just go through kie-ci, I’m assuming you are using this. I think 
you could mock this without Guvnor, by creating a temporary local m2_repo and 
add jars there. kie-ci will pick those up and try and apply them.

Mark


On 8 Aug 2014, at 18:02, san_hegde santhosh.he...@hp.com wrote:

 Actually during functional testing we want to test our service which in turn 
 calls rules and we want to test the service with changing rules.  But we do 
 not want to change the rules in Guvnor rather we want to somehow mock it.  
 Means depending on our tests we want to use different modified rules.  For 
 this if we can mock the session or guvnor or somehow so that we session can 
 return the mocked fact depending on our test.
 
  
 
 Thank you
 
 Santhosh Hegde A
 
  
 
 From: Stephen Masters [via Drools] [mailto:ml-node+[hidden email]] 
 Sent: Friday, August 08, 2014 9:10 PM
 To: Ajekar, Santhosh Hegde (HP-IT)
 Subject: Re: [rules-users] Mocking Guvnor
 
  
 
 Possibly also worth pointing out that inserting a fact and executing a 
 session do not connect to Guvnor anyway?
 
  
 
 Although, as Mike mentions, the simplest approach tends to be to create a 
 service which wraps knowledge base access and mock that. Although you could 
 also mock the session.
 
  
 
 Although, I must admit I’m not sure what question is being asked...
 
  
 
 Steve
 
  
 
  
 
 On 8 Aug 2014, at 13:07, Michael Anstis [hidden email] wrote:
 
 
 
 
 I assume you have a service encapsulating your use of Drools?
 
  
 
 Why not mock this service to use an implementation that returns what you need?
 
  
 
 On 8 August 2014 03:13, san_hegde [hidden email] wrote:
 
 
 Hi ,
 
  
 
 We have requirement where in during functional testing we do not want to 
 connect to Guvnor rather want to mock it. 
 
  
 
 For example mocking could be like this.
 
  
 
 We send Fact object as input during calling 
 knowledgeSession.execute() method and in rule we update the result in that 
 fact object itself. So here can we mock the output fact object, so that 
 during functional testing we no need to connect to Guvnor rather mocked 
 result fact object is returned.
 
  
 
  
 
 Thank you
 
 Santhosh Hegde A
 
  
 
 View this message in context: Mocking Guvnor
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 
 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users
 
  
 
 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 ___ 
 rules-users mailing list 
 [hidden email] 
 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/Mocking-Guvnor-tp4030601p4030608.html
 
 To start a new topic under Drools: User forum, email [hidden email] 
 To unsubscribe from Drools: User forum, click here.
 NAML
 
 
 View this message in context: RE: [rules-users] Mocking Guvnor
 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] Mocking Guvnor

2014-08-08 Thread Mark Proctor
I should add that nothing on the client side of updates actually talks to 
Guvnor at all. It’s all just embedded Maven, interacting via local and remote 
m2 repositories.

It just happens that Guvnor can build and install into a remote m2 repo.

Mark
On 8 Aug 2014, at 18:06, Mark Proctor mproc...@codehaus.org wrote:

 the updates just go through kie-ci, I’m assuming you are using this. I think 
 you could mock this without Guvnor, by creating a temporary local m2_repo and 
 add jars there. kie-ci will pick those up and try and apply them.
 
 Mark
 
 
 On 8 Aug 2014, at 18:02, san_hegde santhosh.he...@hp.com wrote:
 
 Actually during functional testing we want to test our service which in turn 
 calls rules and we want to test the service with changing rules.  But we do 
 not want to change the rules in Guvnor rather we want to somehow mock it.  
 Means depending on our tests we want to use different modified rules.  For 
 this if we can mock the session or guvnor or somehow so that we session can 
 return the mocked fact depending on our test.
 
  
 Thank you
 
 Santhosh Hegde A
 
  
 From: Stephen Masters [via Drools] [mailto:ml-node+[hidden email]] 
 Sent: Friday, August 08, 2014 9:10 PM
 To: Ajekar, Santhosh Hegde (HP-IT)
 Subject: Re: [rules-users] Mocking Guvnor
 
  
 
 Possibly also worth pointing out that inserting a fact and executing a 
 session do not connect to Guvnor anyway?
 
  
 
 Although, as Mike mentions, the simplest approach tends to be to create a 
 service which wraps knowledge base access and mock that. Although you could 
 also mock the session.
 
  
 
 Although, I must admit I’m not sure what question is being asked...
 
  
 
 Steve
 
  
 
  
 
 On 8 Aug 2014, at 13:07, Michael Anstis [hidden email] wrote:
 
 
 
 
 I assume you have a service encapsulating your use of Drools?
 
  
 
 Why not mock this service to use an implementation that returns what you 
 need?
 
  
 
 On 8 August 2014 03:13, san_hegde [hidden email] wrote:
 
 
 Hi ,
 
  
 
 We have requirement where in during functional testing we do not want to 
 connect to Guvnor rather want to mock it. 
 
  
 
 For example mocking could be like this.
 
  
 
 We send Fact object as input during calling 
 knowledgeSession.execute() method and in rule we update the result in that 
 fact object itself. So here can we mock the output fact object, so that 
 during functional testing we no need to connect to Guvnor rather mocked 
 result fact object is returned.
 
  
 
  
 
 Thank you
 
 Santhosh Hegde A
 
  
 
 View this message in context: Mocking Guvnor
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 
 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users
 
  
 
 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 ___ 
 rules-users mailing list 
 [hidden email] 
 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/Mocking-Guvnor-tp4030601p4030608.html
 
 To start a new topic under Drools: User forum, email [hidden email] 
 To unsubscribe from Drools: User forum, click here.
 NAML
 
 
 View this message in context: RE: [rules-users] Mocking Guvnor
 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] RightTupleList NPE with 6.1.0.Final

2014-08-06 Thread Mark Proctor

On 6 Aug 2014, at 10:31, Matteo Mortari matteo.mort...@gmail.com wrote:

 Hi Mario, thank for your response and I can totally understand.
 
 My next question is, please: is it possible to submit a JIRA on jboss.org and 
 keep it confidential ?
 Or at least keep confidential the reproducer?
Not on JIRA, but you can open a jira and then provide a dropbox link to Mario, 
Myself or Edson.
 
 The problem I'm facing, assuming I eventually develop the reproducer, that I 
 seriously doubt my friends would agree in sharing this rulebase on a public 
 domain - on other occasions it was okay to share the rulebase, while on other 
 occasions the rulebase was limited so I translated the rulebase to another 
 domain.
 
 My ultimate goal here would be to reach a compromise where I can deliver you 
 guys of the drools team a precise reproducer, while at the same time keep my 
 friends happy that the rulebase is not actually shared on public domain and 
 kept confidential only for the scope of reproducing the bug.
 
 So my friends questions will likely be:
 1. is there a process to raise a jira on jboss.org with confidential content ?
 2. which terms and conditions, or NDA, do apply in that case?
 
 I've done research on drools documentation, and on jboss and RH website, but 
 couldn't find an answer applying for this case. In other words, I wonder if 
 RH sub. model is the only means to share confidential content, or it is 
 possible also for the opensource version, in order to achieve the compromise 
 I pictured above.
 
 Thanks
 Ciao
 ps: sorry for the rather lengthy email but I wanted to provide a picture of 
 the context :)
 Matteo
 
 
 
 On Tue, Aug 5, 2014 at 7:40 PM, Mario Fusco mario.fu...@gmail.com wrote:
 Hi Matteo,
 
 it's honestly virtually impossible to figure out what's causing that NPE
 just looking at that stack trace. Do you think you could be able to develop
 a reproducer or at least provide us a bit more information?
 
 Thanks,
 Mario
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/rules-users-RightTupleList-NPE-with-6-1-0-Final-tp4030571p4030573.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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

[rules-users] google groups

2014-08-06 Thread Mark Proctor
We are in the final stages for the discussions on lists and forums. We are 
likely to move all lists to google groups, as it provides a unified email list 
and web forum. There will be three resulting groups, instead of the current two.
Drools Setup - installation, configuration, setup and administration
Drools Usage - authoring (drl, decision tables, score cards rule templates, 
scenarios) and running.
Drools Development - documentation and coding of the drools project

Theses current two lists will remain and the email address will continue to 
work for a while. We will attempt to auto-subscribe (i.e. transfer) all 
existing subscribers. rules-dev people will be subscribed to 
drools-development. rules-users will be subscribed to both drools-setup and 
drools-usage - as the current list currently covers both those topics.

If anyone has any feedback, please let us know.

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


Re: [rules-users] Conflict resolution strategy - before vs after Phreak impl

2014-08-05 Thread Mark Proctor
If they are in different files, I recommend that they are in different 
agenda-grounds. They’ll continue to be prioritised in load order, so you’ll 
have two with load order 1, two with load order 2, two with load order 3 etc.

Mark


On 5 Aug 2014, at 19:12, Borris bor...@chaos.org.uk wrote:

 Mark,
 
 This was a really useful post, going into some detail on behaviour and 
 the underlying reasoning for the Drools implementation, especially the 
 6.X stuff. I've removed a whole bunch of salience mess as a result as 
 well, which is always good for code quality.
 
 A question though - if rules in multiple different files become eligble 
 for firing at the same time, is their ordering something that is 
 readily predictable?
 
 Thanks
 
 Borris
 
 On Monday 28/07/2014 17:11, Mark Proctor wrote:
 Phreak is just depth + load order, so it’s not a big change, all it does is 
 remove the degree of arbitrary behaviour you were relying on for 
 performance. Depth in 5x meant rules with the same salience were executed in 
 an arbitrary order, it seems this arbitrary order was not so arbitrary in 
 your case and makes an impact on performance - but as it’s arbitrary the 
 repeatability of this cannot be ensured, even across environments let alone 
 versions. In 6x this is no longer arbitrary, which will allow people more 
 predictability in their rule executions. Load order is also much easier for 
 people to understand and deal with, and often avoids the need to use 
 salience at all - it’s also how people’s brains tend to think.  Rules higher 
 up in the file, fire first. We recommend one “agenda-group” per file, so 
 that it’s easy to keep control of those orders. Salience can still over-ride 
 this; but over time we have further ideas to completely remove the need for 
 salience. This didn’t make much sense in 5x as load order was not preserved 
 between kbase updates, so if you add rules later you lose the load order. In 
 6x we fixed this, so load order is always preserved between versions, an 
 thus adding this enhancement makes sense.
 
 
 
 
 ___
 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] All Drools examples 6.x fail on Mvel dependency error

2014-08-05 Thread Mark Proctor
Those all have unit test, that get run as part of the build. So there must be 
something wrong your side.

Most likely mismatched MVEL versions.

Mark
On 5 Aug 2014, at 22:06, mattmadhavan mmadha...@facs.org wrote:

 This happens even after I added the following dependency
 
   dependency
   groupIdorg.mvel/groupId
   artifactIdmvel2/artifactId
   /dependency
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/All-Drools-examples-6-x-fail-on-Mvel-dependency-error-tp4030576p4030577.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] Drools 6.x and Custom Operators(Evaluators) and Accumulators - Using them as regular functions?

2014-08-05 Thread Mark Proctor
you no longer need to declare custom accumulators, instead they are specified 
via imports. See docs, notice the “import” bit.

http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/DroolsLanguageReferenceChapter.html#d0e6601

7.8.3.7.4.1. Accumulate CE (preferred syntax)
….

The code for the function is very simple, as we could expect, as all the 
dirty integration work is done by the engine. Finally, to use the function in 
the rules, the author can import it using the import accumulate statement:

import accumulate class_name function_name
For instance, if one implements the class some.package.VarianceFunction 
function that implements thevariance function and wants to use it in the rules, 
he would do the following:

Example 7.77. Example of importing and using the custom variance accumulate 
function

import accumulate some.package.VarianceFunction variance

rule Calculate Variance
when
accumulate( Test( $s : score ), $v : variance( $s ) )
then
// the variance of the test scores is $v
end

On 5 Mar 2014, at 23:13, mattmadhavan mmadha...@facs.org wrote:

 Hello,
 I am still suck on Drools 5.4/5.5 since I have issues with Custom
 operators/Evaluators in 5.6.
 
 I am not able to move to Drools 6.x because the spring configuration is
 screwed up. There is no option to configure Custom operator/Evaluators in
 kie-spring.
 
 Looks like I just cannot move to 6.x because most of my rules are highly
 dependent on the Custom operator/evaluator I created!
 
 I am mighty confused.
 
 Any ideas?
 
 Thanks
 Matt
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-6-x-and-Custom-Operators-Evaluators-and-Accumulators-Using-them-as-regular-functions-tp4028543p4028553.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] StackOverflow when serializing KieBase

2014-08-01 Thread Mark Proctor
We will not be able to help you, without a unit test that demonstrates your 
problem.

Mark
On 1 Aug 2014, at 15:38, Federico Bertola federico.bertol...@gmail.com wrote:

 I'll try to investigating a bit (or at least I'll try to make something 
 reproducible). Meanwhile, this is the stack trace. It seems to me that is not 
 the case as https://issues.jboss.org/browse/JBRULES-2335.
 Any help is appreciated.
 
 Federico.
 
 
 On 07/31/2014 01:25 AM, Mark Proctor wrote:
 It should work, there should not be too much recursion. I’d suggest digging 
 deeper to see if you can point us to the references that are suspect.
 
 Mark
 On 30 Jul 2014, at 17:28, Federico Bertola federico.bertol...@gmail.com 
 wrote:
 
 Hi all,
 when I try to serialize a rather large KieBase I constantly get the
 aforementioned error. After a bit of tracking I see that the error seems
 to appear when the KnowledgeBase try to serialize the Rete object.
 I belive this is not an infinite loop because it seems that the graph is
 quite deep and the serializer recursively calls writeExternal in a (sort
 of) depth-first fashion.
 
 Increasing the stack size didn't really help, so I'm asking if there's a
 better way or if I should give up.
 
 Thanks :)
 
 Federico.
 ___
 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
 
 stacktrace.txt___
 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] BuildDeploy - Drools Document

2014-08-01 Thread Mark Proctor
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html
https://github.com/droolsjbpm/droolsjbpm-knowledge/tree/master/kie-docs/

On 1 Aug 2014, at 23:26, Michael Anstis michael.ans...@gmail.com wrote:

 Please submit a pull request for an update to the documentation and we will 
 happily accept it.
 
 Sent on the move
 
 On 1 Aug 2014 23:20, Ricardo sprabak...@gmail.com wrote:
 15.7.4.1. Build  Deploy
 
 Build  Depoy builds the current project and deploys the KJAR into the
 workbench internal Maven repository.
 
 
 
 the above statement from the drools document says deploys into internal
 document but you can deploy to remote maven repo modifying pom.xml. The
 above statement restriction the extended functionality of Build and Deploy.
 
 
 
 -
 with kind regards,
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Build-Deploy-Drools-Document-tp4030554.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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

Re: [rules-users] StackOverflow when serializing KieBase

2014-07-30 Thread Mark Proctor
It should work, there should not be too much recursion. I’d suggest digging 
deeper to see if you can point us to the references that are suspect.

Mark
On 30 Jul 2014, at 17:28, Federico Bertola federico.bertol...@gmail.com wrote:

 Hi all,
 when I try to serialize a rather large KieBase I constantly get the 
 aforementioned error. After a bit of tracking I see that the error seems 
 to appear when the KnowledgeBase try to serialize the Rete object.
 I belive this is not an infinite loop because it seems that the graph is 
 quite deep and the serializer recursively calls writeExternal in a (sort 
 of) depth-first fashion.
 
 Increasing the stack size didn't really help, so I'm asking if there's a 
 better way or if I should give up.
 
 Thanks :)
 
 Federico.
 ___
 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] NPE in LeftTupleSetsImpl.removeUpdate

2014-07-30 Thread Mark Proctor
try 6.1.x, this is being released as we speak:
http://downloads.jboss.org/drools/release/snapshot/6.1.x/

Mark
On 31 Jul 2014, at 02:48, Davide Sottara dso...@gmail.com wrote:

 It has almost certainly been fixed in 6.1
 Davide
 
 On 07/31/2014 03:40 AM, David Zeigler wrote:
 Hi,
 I'm using drools 6.0.1.Final.  I received a NPE in the 
 org.drools.core.common.LeftTupleSetsImpl.removeUpdate() method on line 172, 
 which corresponds to this line for 6.0.1.Final:
 previous.setStagedNext( next );
 
 I see 2 commits in 6.1.0 to address NPEs in this class but I'm not sure if 
 either of those cover this particular NPE.  I'm unable to reproduce this 
 issue with my code after the first occurrence.  Does anyone know if this has 
 been fixed in 6.1.0? Please let me know if I can provide additional info or 
 if I should open a defect in Jira.
 
 Thanks,
 David
 
 Here is the stack trace:
 java.lang.NullPointerException
 at
 org.drools.core.common.LeftTupleSetsImpl.removeUpdate(LeftTupleSetsImpl.java:172)
 at
 org.drools.core.common.LeftTupleSetsImpl.addDelete(LeftTupleSetsImpl.java:84)
 at
 org.drools.core.common.SynchronizedLeftTupleSets.addDelete(SynchronizedLeftTupleSets.java:20)
 at
 org.drools.core.reteoo.LeftInputAdapterNode.doDeleteSegmentMemory(LeftInputAdapterNode.java:339)
 at
 org.drools.core.reteoo.LeftInputAdapterNode.doDeleteObject(LeftInputAdapterNode.java:301)
 at
 org.drools.core.reteoo.LeftInputAdapterNode.retractLeftTuple(LeftInputAdapterNode.java:417)
 at
 org.drools.core.reteoo.ObjectTypeNode.doRetractObject(ObjectTypeNode.java:352)
 at
 org.drools.core.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:335)
 at
 org.drools.core.reteoo.EntryPointNode.retractObject(EntryPointNode.java:395)
 at
 org.drools.core.common.NamedEntryPoint.delete(NamedEntryPoint.java:605)
 at
 org.drools.core.common.AbstractWorkingMemory.delete(AbstractWorkingMemory.java:1184)
 at
 org.drools.core.common.AbstractWorkingMemory.delete(AbstractWorkingMemory.java:1176)
 at
 org.drools.core.impl.StatefulKnowledgeSessionImpl.delete(StatefulKnowledgeSessionImpl.java:316)
 
 
 ___
 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

Re: [rules-users] Deploying drools workbench on weblogic

2014-07-28 Thread Mark Proctor
We haven’t done any testing on Weblogic yet, we in the process of going through 
this now. Any feedback or pointers would be appreciated.

Mark
On 28 Jul 2014, at 11:34, Darshana Rajapaksha (Thailand) 
darshan...@azay.co.th wrote:

 Hi,
 I'm trying to deploy 
 kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war on weblogic 12C and 
 I'm getting different kind of exceptions. When one get fixed another 
 exception. Anybody got success doing this. Below is the latest exception I'm 
 getting when deploying. Any helpful idea is really appreciated. 
 
 Jul 28, 2014 4:30:32 PM ICT Error 
 org.drools.workbench.backend.server.AppSetup BEA-00 Failed to setup 
 Repository 'uf-playground'
 javax.enterprise.inject.CreationException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
 Method)
 at 
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
 at java.lang.Class.newInstance0(Class.java:374)
 at java.lang.Class.newInstance(Class.java:327)
 at 
 org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:344)
 at 
 org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
 at 
 org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173)
 at 
 org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:341)
 at 
 org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33)
 at 
 org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:45)
 at 
 org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:85)
 at 
 org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:125)
 at 
 org.jboss.weld.bean.ManagedBean.createInstance(ManagedBean.java:336)
 at 
 org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:200)
 at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:292)
 at 
 org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103)
 at 
 org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608)
 at 
 org.jboss.weld.bean.AbstractReceiverBean.getReceiver(AbstractReceiverBean.java:77)
 at 
 org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:317)
 at 
 org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307)
 at 
 org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68)
 at 
 org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608)
 at 
 org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:674)
 at 
 org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:136)
 at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:763)
 at 
 org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:772)
 at 
 org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161)
 at 
 com.oracle.injection.provider.weld.WeldInjectionServicesAdapter.aroundInject(WeldInjectionServicesAdapter.java:103)
 at 
 org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)
 at 
 org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157)
 at 
 org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131)
 at 
 org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153)
 at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:293)
 at 
 org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103)
 at 
 org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
 at 
 org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
 at 
 org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.getRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java)
 at 
 org.drools.workbench.backend.server.AppSetup.assertPlayground(AppSetup.java:81)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at 
 org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
 at 
 

Re: [rules-users] Conflict resolution strategy - before vs after Phreak impl

2014-07-28 Thread Mark Proctor
Conflict resolution strategies are “magic” things, it means how a set of rules 
behave cannot be determined from reading the rules alone, and could potentially 
change if someone changes the backend component (possibly without you knowing). 
Our preference is to ensure any execution behaviour is encoded and visible in 
the rules themselves. Over time we’d rather create additional declarative ways 
to do this on the rules themselves, rather than change some magic backend 
component; such as the experimental declarative agenda we’ve added. CRS in 6x 
is different to 5x, it’s now choosing the order or rules to evaluate, where as 
5x the CRS controls the order in which rules are fired. We need to be free to 
change these type of things, without worrying about user compatibility - so 
less we expose to end suers the better; and as mentioned I consider it an 
anti-pattern in ease of rule authoring and maintenance. The only reason why we 
haven’t removed all of the implementations is that there is a degree of 5x 
compatibility in the system still.

Phreak is just depth + load order, so it’s not a big change, all it does is 
remove the degree of arbitrary behaviour you were relying on for performance. 
Depth in 5x meant rules with the same salience were executed in an arbitrary 
order, it seems this arbitrary order was not so arbitrary in your case and 
makes an impact on performance - but as it’s arbitrary the repeatability of 
this cannot be ensured, even across environments let alone versions. In 6x this 
is no longer arbitrary, which will allow people more predictability in their 
rule executions. Load order is also much easier for people to understand and 
deal with, and often avoids the need to use salience at all - it’s also how 
people’s brains tend to think.  Rules higher up in the file, fire first. We 
recommend one “agenda-group” per file, so that it’s easy to keep control of 
those orders. Salience can still over-ride this; but over time we have further 
ideas to completely remove the need for salience. This didn’t make much sense 
in 5x as load order was not preserved between kbase updates, so if you add 
rules later you lose the load order. In 6x we fixed this, so load order is 
always preserved between versions, an thus adding this enhancement makes sense.

So the key takeaway is for future systems it should make them easier to author 
and with more predictable performance results.

You can still run the rete engine if you want, it’s available through 
configuration. Although it would be better to start working with Phreak, so you 
can provide feedback to us, for future improvements.

Mark
On 28 Jul 2014, at 16:31, mikerod mjr4...@gmail.com wrote:

 In version 5.x of Drools I see that it offered configurable conflict resolver
 strategies.  I also read a few different Drools documentation sources that
 discussed varieties of complex conflict resolution strategies.  One source
 discussed a tiered implementation by the name of CompositeConflictResolver -
 which was @ http://legacy.drools.codehaus.org/Conflict+Resolution.
 
 We have been experimenting with uplifting from Drools v5.6.0.Final to a v6.x
 version and we noted a fairly significant performance degradation /(a)/. 
 When digging into some rule logging,
 we found that the issue was that our rule load order was not behaving well
 in terms of conflict resolution.  The wrong rule activations were chosen
 to go first on the agenda, and this
 was causing a lot of unnecessary/redundant movement within the Rete
 network.
 
 After reading through the documentation on conflict resolution strategies
 and noting that it was configurable in Drools v5.x, I started thinking more
 about the importance a conflict resolution strategy on performance.  Digging
 deeper, I believe Drools v5.6.0.Final uses
 `org.drools.core.conflict.DepthConflictResolver` as the default resolver
 (which is not the CompositeConflictResolver mentioned above interestingly). 
 In Drools v6.x (around v6.2.x I believe) with Phreak enabled, there is a
 `org.drools.core.conflict.PhreakConflictResolver` that is used as the
 default resolver.
 
 This raises a few questions:
 
 /1)/ With Phreak enabled, it looks like the conflict resolver is *not*
 configurable anymore.  I believe this is the case due to  these lines
 https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/common/AgendaGroupQueueImpl.java#L68
   
 .  Why was this configuration options removed?

 
 /2)/ The PhreakConflictResolver does not seem to be doing anything very
 sophisticated now.  I gather that it respects salience first, then falls
 back to rule load order.  I found this around  these lines
 https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/conflict/PhreakConflictResolver.java#L52
  
 .  Why was this implementation chosen?  Is it discussed or documented
 anywhere?  Was it determined that this performs better than anything else or
 that there 

Re: [rules-users] gradle and drools

2014-07-24 Thread Mark Proctor
By getting involved and porting the maven plugin to those other build systems:
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark
On 24 Jul 2014, at 14:08, Mercier Jonathan jmerc...@genoscope.cns.fr wrote:

 Dear,
 
 Gradle become day after day more popular. In more spring and hibernate 
 project switch to this tools. So how we can use this tools with drools 
 to get an uniform build system ?
 
 Regards
 ___
 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] Defeasible: NPE: with multiple @Defeasible

2014-07-23 Thread Mark Proctor

On 23 Jul 2014, at 21:58, Borris bor...@chaos.org.uk wrote:

 
 On 22/07/2014 22:44, Mark Proctor wrote:
 Stack trace shows the error:
 org.drools.core.beliefsystem.defeasible.DefeasibleBeliefSet.removeUndefeated(DefeasibleBeliefSet.java:295)
 https://github.com/sotty/drools/blob/master/drools-core/src/main/java/org/drools/core/beliefsystem/defeasible/DefeasibleBeliefSet.java
 
 Maybe have a go fixing it yourself? And submit the fix with a unit test, as 
 a pull request?
 http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html
 
 
 I might well have a go, but there's a whole bunch of learning I need to 
 do before I can submit my first candidate patch. So don't expect 
 something too quickly.
We are available for real time chat on irc, if you need help.
http://drools.jboss.org/irc

Either way best way to start is to submit a compact self contained unit test, 
to show the failure, as a pull request. Don’t forget to @Ignore it, so it won’t 
break our build and we can fix it later:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/beliefsystem/defeasible/DefeasibilityTest.java

Mark
 
 Borris
 
 ___
 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] Drools Applications Google Group

2014-07-22 Thread Mark Proctor
A while back there was a discussion on the volume of posts and the range of 
post discussions. OptaPlanner already has it’s own google group, which has 
helped reduce the volume. There is still the discussion on whether to split 
Drools.

My initial idea is to leave this list for installation, setup, configuration, 
deployment and getting started (hello world won’t run) - this tends to be a 
fairly shallow knowledge area, that new people will need to deal with. Then 
also create a separate google group for those wanting help on writing rule 
applications, that’s authoring (drl, score cards, decision tables etc) and 
running (insert, fireAllRules etc); this would become a deep knowledge area. In 
the google group you would not ask how to install the workbench, or how to 
deploy your app, or how to setup HA etc.

Thoughts?

We are about to do 6.1 final. For this we are revamping the websites, and 
sorting out our communications (lists etc) at the same time.

Mark


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


Re: [rules-users] Drools Applications Google Group

2014-07-22 Thread Mark Proctor
I’m currently setting a google group, won’t touch nabble. It allows welcome 
messages, sticky nodes, and if necessary moderation.

Mark
On 22 Jul 2014, at 18:24, Wolfgang Laun wolfgang.l...@gmail.com wrote:

 As long as Nabble is kept out.
 
 Stackoverflow is, at present, quite reasonable, with a high percentage
 of what I consider as interesting, i.e., the hard core Expert/Fusion
 questions.
 
 Cheers
 Wolfgang
 
 On 22/07/2014, Mark Proctor mproc...@codehaus.org wrote:
 A while back there was a discussion on the volume of posts and the range of
 post discussions. OptaPlanner already has it's own google group, which has
 helped reduce the volume. There is still the discussion on whether to split
 Drools.
 
 My initial idea is to leave this list for installation, setup,
 configuration, deployment and getting started (hello world won't run) - this
 tends to be a fairly shallow knowledge area, that new people will need to
 deal with. Then also create a separate google group for those wanting help
 on writing rule applications, that's authoring (drl, score cards, decision
 tables etc) and running (insert, fireAllRules etc); this would become a deep
 knowledge area. In the google group you would not ask how to install the
 workbench, or how to deploy your app, or how to setup HA etc.
 
 Thoughts?
 
 We are about to do 6.1 final. For this we are revamping the websites, and
 sorting out our communications (lists etc) at the same time.
 
 Mark
 
 


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


Re: [rules-users] Defeasible: NPE: with multiple @Defeasible

2014-07-22 Thread Mark Proctor
Stack trace shows the error:
org.drools.core.beliefsystem.defeasible.DefeasibleBeliefSet.removeUndefeated(DefeasibleBeliefSet.java:295)
https://github.com/sotty/drools/blob/master/drools-core/src/main/java/org/drools/core/beliefsystem/defeasible/DefeasibleBeliefSet.java

Maybe have a go fixing it yourself? And submit the fix with a unit test, as a 
pull request?
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark
On 22 Jul 2014, at 20:40, Borris bor...@chaos.org.uk wrote:

 Hi Davide,
 
 I've got a null pointer exception with defeasible. My test case is:
 
 package com.sample
 
 declare Fact
 fact: String @key
 end
 
 rule init
 when
 then
 System.out.println(inserting initial facts);
 insert( new Fact( one ) );
 insert( new Fact( two ) );
 insert( new Fact( two ) );
 end
 
 rule rule1
 @Defeasible
 enabled true
 when
 Fact( one; )
 then
 System.out.println(one causes wibble);
 insertLogical( new Fact( wibble) );
 end
 
 rule rule2
 @Defeasible
 when
 Fact( two; )
 then
 System.out.println(two causes wibble);
 insertLogical( new Fact( wibble) );
 end
 
 rule rule3
 @Defeater
 @Defeats( rule2 )
 when
 Fact( two; )
 then
 System.out.println(two negates wibble);
 insertLogical( new Fact( wibble), neg );
 end
 
 The output I get is
 
 inserting initial facts
 one causes wibble
 two causes wibble
 two causes wibble
 two negates wibble
 two negates wibble
 Exception executing consequence for rule rule3 in com.sample: 
 java.lang.NullPointerException
 at 
 org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
 at 
 org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1057)
 at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:152)
 at 
 org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:94)
 at 
 org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:964)
 at 
 org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1234)
 at 
 org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1239)
 at 
 org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1212)
 at com.sample.DroolsTest.main(DroolsTest.java:21)
 Caused by: java.lang.NullPointerException
 at 
 org.drools.core.beliefsystem.defeasible.DefeasibleBeliefSet.removeUndefeated(DefeasibleBeliefSet.java:295)
 at 
 org.drools.core.beliefsystem.defeasible.DefeasibleBeliefSet.add(DefeasibleBeliefSet.java:126)
 at 
 org.drools.core.beliefsystem.jtms.JTMSBeliefSystem.insert(JTMSBeliefSystem.java:52)
 at 
 org.drools.core.beliefsystem.defeasible.DefeasibleBeliefSystem.insert(DefeasibleBeliefSystem.java:45)
 at 
 org.drools.core.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:136)
 at 
 org.drools.core.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:107)
 at 
 org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:234)
 at 
 org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1430)
 at 
 org.drools.core.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:275)
 at 
 org.drools.core.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:247)
 at 
 com.sample.Rule_rule32132126114.defaultConsequence(Rule_rule32132126114.java:8)
 at 
 com.sample.Rule_rule32132126114DefaultConsequenceInvokerGenerated.evaluate(Unknown
  
 Source)
 at 
 com.sample.Rule_rule32132126114DefaultConsequenceInvoker.evaluate(Unknown 
 Source)
 at 
 org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1046)
 ... 7 more
 
 
 I believe I am using snapshot 6.1.0.201407170510 but I suspect the 
 precise version doesn't matter too much.
 
 In the above example, if you disable rule1 then the NPE doesn't happen. 
 Only doing one two fact insertion in the init rule likewise means the 
 NPE doesn't happen. I think the issue is something like rule3 does more 
 than one defeat on rule2's scoring on wibble fact, but rule1 still has 
 a say in the continuing existence of the wibble fact.
 
 Should I get a Jira log in and enter these well qualified bugs directly?
 
 Regards,
 
 Borris
 
 
 
 
 
 ___
 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] Question about getObjects() on workspace with defeasible belief system

2014-07-21 Thread Mark Proctor
Easiest thing is to look at the code:
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/beliefsystem/defeasible/DefeasibleBeliefSet.java
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/beliefsystem/defeasible/DefeasibleBeliefSystem.java

And tests:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/beliefsystem/defeasible/DefeasibilityTest.java

As Davide said, this is highly experimental. It’s likely we won’t use a ‘neg’ 
entry point in the future to handle negated facts, but instead provided a meta 
property.

Mark

On 21 Jul 2014, at 23:41, Borris bor...@chaos.org.uk wrote:

 And thanks for the response!
 
 A quick question on your example code before I try it:
 
 On 21/07/2014 21:24, Davide Sottara wrote:
 Notice that negatively asserted facts end up in a negative entry
 point, so you have to look them
 up explicitly:
 InternalFactHandle negHandle = (InternalFactHandle)
 session.getEntryPoint( neg ).getFactHandle( myNegatedObject );
 
 Is myNegatedObject just the set that getObjects() returned or is there 
 another enumeration method I should use? Ie do I Iook for a neg entry 
 point object for each object I get back from ksession.getObjects() or do 
 I need to acquire a collection from another place (as well) if I want to 
 enumerate everything in the workspace for my dumpWorkspace() pretty printer?
 
 Thanks
 
 Borris
 
 ___
 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] Workaround: EventFactHandle retained in memory after FactCount reaches 0 for temporal-based rule

2014-07-13 Thread Mark Proctor
Could you submit a unit test as a pull request?
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Add it to here, and follow existing conventions:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/CepEspTest.java

Mark
On 11 Jul 2014, at 20:38, Kent Anderson kent.ander...@psware.com wrote:

 We have found a workaround that eliminates the leftover event (gone from 
 Working Memory, but not from the JVM memory): 
 
 The rule “forget it ever happened” (seen below) causes the problem.  
 Re-writing it to remove the check for RAISE in the LHS eliminated the memory 
 leak.  Of course, our application requires the check for RAISE, so it can be 
 accomplished by manually querying working memory from the RHS.  It’s ugly, 
 but it resolved the issue.
 
 query existsRaise($id)
   $raise : MyEvent( eventState == EventState.RAISE, eventId == $id )
 end
 
 rule process clear
   no-loop
 when
   $clear : MyEvent(eventState == EventState.CLEAR, $clearId : eventId)
 then
   QueryResults results = kcontext.getKieRuntime().getQueryResults( 
 existsRaise, $clearId );
   if (results.size() == 0) { 
   System.out.println( Forwarding CLEAR( + $clearId + ) ); 
   } else {
   System.out.println(Forgetting RAISE/CLEAR( + $clearId + ));
   for (QueryResultsRow row : results){
   MyEvent raise = (MyEvent) row.get ($raise);
   delete(raise);
   }
   }
   delete($clear);
 end
 
 This appears to be a similar situation to 
 https://issues.jboss.org/browse/DROOLS-498.
 
 
 
 On Jul 10, 2014, at 3:54 PM, Kent Anderson kent.ander...@psware.com wrote:
 
 Correction:  The original post did not include another rule that exists in 
 the stream.  The memory leak does not appear unless both rules are active in 
 the stream.
 
 declare MyEvent 
   @role(event) 
   @timestamp(timestamp) 
 end 
 
 /* If a RAISE is buffered for N seconds, send it out */
 rule forward raise
  no-loop
  duration (3s)
 when
  $raise : MyEvent(eventState == EventState.RAISE, $raiseId : eventId)
 then
  System.out.println(Forwarding RAISE( + $raiseId + ));
  delete($raise);
 end
 
 /* When CLEAR, and buffered, clear them both out */
 rule forget it ever happened
  no-loop
 when
  $clear : MyEvent(eventState == EventState.CLEAR, $clearId : eventId)
  $raise : MyEvent(eventState == EventState.RAISE, eventId == $clearId)
 then
  System.out.println(Forgetting RAISE/CLEAR( + $clearId + ));
  delete($clear);
  delete($raise);
 end
 
 
 On Jul 10, 2014, at 2:50 PM, Kent Anderson kent.ander...@psware.com wrote:
 
 The following rule produces a memory leak in Drools 6.1.0-SNAPSHOT:
 
 (Stream mode)
 
 declare MyEvent 
   @role(event) 
   @timestamp(timestamp) 
 end 
 
 /* If a RAISE is buffered for N seconds, send it out */
 rule forward raise
 no-loop
 duration (3s)
 when
 $raise : MyEvent(eventState == EventState.RAISE, $raiseId : eventId)
 then
 System.out.println(Forwarding RAISE( + $raiseId + ));
 delete($raise);
 end
 
 
 I see the rule fire as expected, printing out the message 3 seconds after 
 the event is added into the session.  While the event is waiting, I see a 
 FactCount of 1 in the session.  After the rule fires, the fact count goes 
 to 0.  However, using JVisualVm, querying the heap dump shows 1 instance of 
 MyEvent, referenced by an EventFactHandle and several other Drools objects.
 
 Is this a bug, or is there a better way to write this rule so Drools’ 
 internals let go of the object after it is no longer a fact?
 
 PastedGraphic-1.png
 
 PastedGraphic-2.png
 ___
 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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Repositories in Kie-Drools

2014-07-07 Thread Mark Proctor
For now you’ll need to setup some manual sync between the two.

Mar
On 7 Jul 2014, at 05:51, Sumit Dhaniya sumitdhan...@gmail.com wrote:

 I want to use a repository hosted on cloud as repository in my kie ide.
 I tried creating a new repo cloning an existing repo but after cloning kie
 ide creates a new repo path at localhost and doesn't uses the cloud repo
 path.
 Can I achieve this or I'll have to find a way to sync two repositories one
 linked to kie and another to cloud repo.
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Repositories-in-Kie-Drools-tp4030254.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] Kie namespace

2014-07-06 Thread Mark Proctor
If you think it’s a bug, you’ll need to write a unit test, and submit as a pull 
request. 
https://github.com/vinodkiran/droolsjbpm-integration/blob/kmodule-spring/kie-spring/src/test/java/org/kie/spring/tests/KieSpringKModuleTest.java
https://github.com/vinodkiran/droolsjbpm-integration/blob/kmodule-spring/kie-spring/src/test/resources/META-INF/kmodule-spring.xml

http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

mark

On 6 Jul 2014, at 09:44, Sumit Dhaniya sumitdhan...@gmail.com wrote:

 Thanks Mark,
 It's still throwing 
 No setter found for property 'kBaseName' in class 
 'org.kie.spring.factorybeans.KSessionFactoryBean'.
 
 
 On Sun, Jul 6, 2014 at 4:23 AM, Mark Proctor [via Drools] [hidden email] 
 wrote:
 It’s in the jar: 
 https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd
 
 
 On 4 Jul 2014, at 22:23, Sumit Dhaniya [hidden email] wrote: 
 
  I'm trying to configure drools in my spring application but I'm struggling 
  to 
  find even schema location for drools. I tried 
  http://drools.org/schema/kie-spring.xsd but it throws error :- 
  
  Referenced file contains errors (http://drools.org/schema/kie-spring.xsd). 
  
  What I need to get it working. Is there any good documentation for 
  spring-integration and performance measures which should be taken. 
  
  
  
  -- 
  View this message in context: 
  http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236.html
  Sent from the Drools: User forum mailing list archive at Nabble.com. 
  ___ 
  rules-users mailing list 
  [hidden email] 
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___ 
 rules-users mailing list 
 [hidden email] 
 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/Kie-namespace-tp4030236p4030240.html
 To unsubscribe from Kie namespace, click here.
 NAML
 
 
 View this message in context: Re: [rules-users] Kie namespace
 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] Kie namespace

2014-07-05 Thread Mark Proctor
It’s in the jar:
https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd


On 4 Jul 2014, at 22:23, Sumit Dhaniya sumitdhan...@gmail.com wrote:

 I'm trying to configure drools in my spring application but I'm struggling to
 find even schema location for drools. I tried
 http://drools.org/schema/kie-spring.xsd but it throws error :-
 
 Referenced file contains errors (http://drools.org/schema/kie-spring.xsd).
 
 What I need to get it working. Is there any good documentation for
 spring-integration and performance measures which should be taken.
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236.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] Drools Session Persistence

2014-06-30 Thread Mark Proctor
You can marshal the sessions manually and save/load the resulting byte[].

Look at the marshaller api in -api javadocs.

Mark
On 1 Jul 2014, at 01:40, calcacuervo calcacue...@gmail.com wrote:

 Hey Guys.
 
 I would like to persist a ksession in drools 6, but not every time I
 interact with the session, as this would impact the performance and we have
 lot of events and facts inserted per second.
 
 Is this possible to manually persisting the session (for example, on
 undeployment), and then, at the app startup load it?
 
 Thanks!
 
 Demian
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-Session-Persistence-tp4030204.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] Equality semantics of logical assertions and stated assertions

2014-06-29 Thread Mark Proctor
The TMS tracks the number of supporting rules for a given fact. When you insert 
something you are typically calling “new”, which always means a new identity. 
If this was done by identity every local insertion would be a different object, 
and thus only ever one supporting rule.

So the most common use case for this is with equality. Where as the most common 
use case for normal working memory is identity. We made the working memory 
identity/equality configurable, as it works the same with the same API. The use 
case for identity with the TMS is less common, but would not be impossible to 
support, but it may require an alternative api, for it to make sense. It’s not 
been done, as no one has asked for it before.

Mark




On 27 Jun 2014, at 17:16, mikerod mjr4...@gmail.com wrote:

 I understand that logical insertions in Drools does not insert two facts that
 are equal according to their #equals implementation (and associated
 #hashCode logic).
 I'm basing this off of my own investigation plus the (well written)
 documentation @
 http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch03.html.
 
 However, normal/stated fact assertions only use identity-based equality
 checks - by default.
 It looks like this can be changed to value-based equality via
 RuleBaseConfiguration.
 
 I have found some related, old Jiras:
 https://issues.jboss.org/browse/JBRULES-266
 https://issues.jboss.org/browse/JBRULES-233
 
 In both cases, Mark Proctor had a final remark, but I wasn't able to
 understand what was really decided and why.
 
 One specific comment @ https://issues.jboss.org/browse/JBRULES-266 is,
 logical assertions are always equality based. Stated facts can now use
 identity and equality - using your configuration settings.
 I have added another configuration setting to dictate how logical over-ride
 works. Does it discard the original fact, or turn it into two stated fact
 handles.
 
 
 What is the reasoning behind only using the value-based equality for logical
 assertions?
 
 Why is it not configurable as stated fact assertions are?
 Also, why is the default behavior of stated fact assertion to be
 identity-based equality?
 
 - I find the inconsistency between the default for normal assertions and the
 (only option) for logical assertion to be a bit confusing/inconsistent.
 
 I'm just looking for an understanding the motivation behind these design
 decisions.
 I have had a lot of performance issues using, primarily, logical assertions
 due to the no duplicate checking being done.
 
 Even the stated assertions do still come with a cost of creating the initial
 FactHandle.
 With deeply nested/complex domain objects, the #equals and #hashCode
 implementations may be quite expensive when executed many times throughout
 rule execution.
 This is especially prominent in accumulators that may later accumulate these
 objects into collections that then are also subject to this equals/hashCode
 penalty.
 I have a related post a while back @
 http://drools.46999.n3.nabble.com/Object-size-impact-on-session-insertion-performance-td4028244.html.
 
 I do not believe it is typical to use complex domain model objects as the
 keys to something like a HashMap.
 One reason (there are more; especially for mutable objects) would be due to
 the performance around having them be hashed and equality checked regularly
 when the
 map is accessed, modified, etc.
 
 The creation of many FactHandle's has shown up in some of my profiling
 performance problems due to this the constructor immediately hashing my
 domain model objects.
 I think the reason the fact handles use this information is for value-based
 equality comparisons - such as the only method used by the Truth Maintenance
 System logical assertions.
 
 I would really appreciate more insight into the motivation for not allowing
 #equals facts to be logically asserted separately into working memory -
 especially since there is a price to pay for the behavior in my case.
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Equality-semantics-of-logical-assertions-and-stated-assertions-tp4030179.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] kbase using kie

2014-06-29 Thread Mark Proctor
Do you really need kie-ci? If not remove it. It’s not needed, unless you want 
maven to resolve dependencies and handle the update process, which you do not.

If you cannot figure out the api, then the alternative route is to simple call 
the mvn plugin via the command line, each time you detect a file change. The 
downside here is it’s heavy as you are not taking advantage of the incremental 
builder.

Mark


On 30 Jun 2014, at 04:50, Chris B sunnyca...@gmail.com wrote:

 I tried that also, but it looks like a very long procedure. I have to include
 kie-ci.jar in the path, and it goes on telling me about maven, ant , plexus,
 aether jars. All runtime exceptions.
 The kie-ci does not specify which version of maven to use, but some the
 files used in one jar are not compatible with plexus or aether..
 Can you recommend an easy way to build it. 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/kbase-using-kie-tp4030187p4030189.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] kbase using kie

2014-06-29 Thread Mark Proctor
Someone on irc wrote a load of helper api’s to simplify the incremental builder 
stuff, I did ask them to write something up for others to benefit from. But i 
haven’t heard anything since. I know they wrote most of them from following the 
unit test I showed you.

Mark
On 30 Jun 2014, at 05:07, Chris B sunnyca...@gmail.com wrote:

 Thanks Mark
 I will try to build it where I am using it.
 Actually the problem was due to my build happening on windows, and app on
 unix.
 I will setup the build on unix itself. 
 Atleast I won't waste time to fix my kmodule.xml :)
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/kbase-using-kie-tp4030187p4030191.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] unsubscribed from the rules-users mailing list

2014-06-23 Thread Mark Proctor
We will be reorganising the lists and forums when the new websites are done, as 
we will be revamping all our communication then.

OptaPlanner and Workbench/UI stuff will move to google groups.  We are hoping 
this will coincide with the 6.1 final. We just wanted to get all of this 
coordinated and done at the same time.

Mark
On 23 Jun 2014, at 11:33, Geoffrey De Smet ge0ffrey.s...@gmail.com wrote:

 Hi Wolfgang,
 
 I just haven't gotten around to split off OptaPlanner dev yet,
 but it's on my TODO list.
 I am just back from holidays, so I won't get to it this week, hopefully 
 next week.
 
 On 23-06-14 11:55, Wolfgang Laun wrote:
 Friends,
 
 this is to let you know that I have done as the subject says.
 
 I'd like to thank all that have contributed for their continuing
 efforts. As for myself: I think that this is a good moment to retire,
 with my rapidly diminishing capability of understanding what's going
 on in Guvnor, Optaplanner and other newfangled extensions. Hitting the
 delete button on some incoming email has been the one thing I've
 managed to do faithfully, and frequently.
 
 Thanks again, and it's been *very* nice meeting you.
 
 Wolfgang
 ___
 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


Re: [rules-users] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Mark Proctor
 I want a query that takes a datum and yields the root nodes for that datum.
Do you mean root node or nodes? Surely there can only be one root? Or do you 
mean you are looking for the leafs?

Mark
On 18 Jun 2014, at 13:31, Borris bor...@chaos.org.uk wrote:

 I'm after a quick bit of help on how to do something that I think should be
 easy but I can't work out how.
 
 I have a Java-side class that essentially is something like
 
 declare Datum
description: String
broader: List Datum
narrower: List Datum
 end
 
 These are arranged in a graph. Root nodes have no items in their broader
 list. I want a query that takes a datum and yields the root nodes for that
 datum. I think this should look something like
 
 query rootDatumsFor( Datum datum, Datum result )
not Datum() from $datum.broader
or
rootDatumsFor( $datum.broader, $result )
 end
 
 but I then get confused. When there are no broader items, I am unclear how
 to assign $datum to $result. And I'm not convinced I'm doing the recursion
 correctly either.
 
 If an experienced Drools author could spend a minute and show me how to do
 this sensibly, I would be very grateful.
 
 
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091.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] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Mark Proctor
It looks like your graph is not in the WM, so you can just iterate the 
references. Here is an example of how to do this. 

@Test
public void testGraphIterationToFindLeafs() {
String drl = import  + Datum.class.getCanonicalName() + ;\n +
 import java.util.List;\n +

 query findLeafs(Datum datum, List results)\n +
 ( eval( datum.getChildren().size() == 0 ) and \n +
   eval( results.add ( datum ) ) )\n +
 or \n +
 ( eval( datum.getChildren().size() != 0 ) and \n +
   child : Datum( ) from datum.children and\n +
   findLeafs( child, results; ) ) \n +
 end\n;

System.out.println( drl );

KnowledgeBase knowledgeBase = loadKnowledgeBaseFromString( drl );
StatefulKnowledgeSession ksession = 
knowledgeBase.newStatefulKnowledgeSession();
ListDatum list = new ArrayListDatum();

Datum d1 = new Datum(d1);
Datum d2 = new Datum(d2);
Datum d3 = new Datum(d3);
Datum d4 = new Datum(d4);
Datum d5 = new Datum(d5);
Datum d6 = new Datum(d6);
Datum d7 = new Datum(d7);

d1.getChildren().add( d2 );
d1.getChildren().add( d3 );

d3.getChildren().add( d4 );
d3.getChildren().add( d5 ) ;
d5.getChildren().add( d6 ) ;
d6.getChildren().add( d7 ) ;

ksession.getQueryResults(findLeafs, d1, list);

System.out.println( list );

}

public static class Datum {
private String description;
private ListDatum children;

public Datum(String description) {
this.description = description;
children = new ArrayListDatum();
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public ListDatum getChildren() {
return children;
}

@Override
public String toString() {
return Datum{ +
   description=' + description + '\'' +
   '}';
}
}

On 18 Jun 2014, at 18:44, Borris bor...@chaos.org.uk wrote:

 Good question. I'm supporting a graph rather than a tree, so theoretically
 there could be more than one node that has no parents. But in my particular
 use case I am constraining the data so that there is never more than one
 root node.
 
 So how to find the root node (singular) from an arbitrary node in the graph
 is my goal.
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091p4030096.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] KieContainer#updateToVersion fails when both versions of a drl file contain an event type declaration for an existing class

2014-06-18 Thread Mark Proctor
Looks like a bug. Please try on 6.1CR1.
http://mvnrepository.com/artifact/org.drools

If it’s not fixed, and yo want it fixed you’ll need to submit a pull request 
with a failing unit test:
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

You can see unit tests for incremental updates here:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java

Please try and add your unit test to that class, in the same format as the 
other tests.

Mark
On 18 Jun 2014, at 20:30, mikedev9000 michael1@gmail.com wrote:

 I am using the latest drools 6.1.0-SNAPSHOT. I have two jars containing
 different versions of a KieModule, and they each contain a drl file with an
 event type declaration for an existing class. If I try to update the
 container from one version to the other, the call to
 KieContainer#updateToVersion returns a Results instance that contains errors
 related to the @timestamp attribute on that event declaration. Here is an
 example of the error message: [Message [id=1, level=ERROR, path=r0.drl,
 line=3, column=0
   text=Error creating field accessors for timestamp field 'mytime' for type
 'FooEvent']].
 
 The following .patch file can be used to add a unit test to the
 IncrementalCompilationTest.java file that demonstrates this problem. 
 
 test_container_update_problem.patch
 http://drools.46999.n3.nabble.com/file/n4030100/test_container_update_problem.patch
   
 
 After applying the patch, and running this unit test, I see the following
 test failure:
 
 
 java.lang.AssertionError: Errors detected on updateToVersion: [Message
 [id=1, level=ERROR, path=r0.drl, line=3, column=0
   text=Error creating field accessors for timestamp field 'mytime' for type
 'FooEvent']]
   at org.junit.Assert.fail(Assert.java:88)
   at org.junit.Assert.assertTrue(Assert.java:41)
   at org.junit.Assert.assertFalse(Assert.java:64)
   at
 org.drools.compiler.integrationtests.IncrementalCompilationTest.testUpdateWithDeclarationPresent(IncrementalCompilationTest.java:95)
 
 
 
 This error makes it nearly impossible for me to rely on and use
 KieContainer#updateToVersion, because I need to allow frequent changes to be
 made to drl files at run time, and I would prefer not to recreate the
 KieContainer, and all of its KieBases and KieSessions on every update.
 
 Is this a known issue? If so, are there plans to fix it before the
 6.1.0.Final release?
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/KieContainer-updateToVersion-fails-when-both-versions-of-a-drl-file-contain-an-event-type-declaratios-tp4030100.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] Adding eval on rule cause it to run in infinite loop

2014-06-12 Thread Mark Proctor
Davide is correct, for our analysis to work, the constraint must not be inside 
an eval, and any constraint that does not start with a field name is internally 
rewritten as an eval.

Mark
On 11 Jun 2014, at 18:48, Davide Sottara dso...@gmail.com wrote:

 I think I know what is happening here.
 I assume your supportFT class is @propertyReactive.
 (btw, you should follow bean conventions and capitalize class names)
 Looking at Rule 1, you don't set the value directly, but you do it through
 a modify. Your rule 2, which checks for the value, uses the function
 containsAny
 rather than the field direclty as in value IN (..).
 At the moment, the engine has no way to realize that the function
 involves the field value - I'm not even sure it is possible in general -
 Property reactivity will ignore the update since, from its perspective, none
 of the fields relevant to the rule has been affected, hence rule 2 will
 not hit.
 If you use eval in the constraint, property reactivity is disabled, so
 the rule
 WILL fire the first time, but now you are vulnerable to infinite loops,
 as if
 you did not have propertyreactive.
 You may have to use the @watch() annotation explicitly to control which
 modifies will cause reevaluations and which ones won't (see the manual
 for this)
 Adding eval everywhere is not a good idea.
 Best,
 Davide
 
 
 
 
 
 On 06/11/2014 01:53 PM, brachi wrote:
 example of rule that doesn't work without eval:
 
 /*rule 1
salience -1
agenda-group agenda1
when
$conclusion: supportFT()
then
  if($conclusion.getValue()==null){
  modify($conclusion) { setValue(new ArrayList())};
  }
  $conclusion.getValue().add(supportedValue);
modify($conclusion) { setValue($conclusion.getValue()) };
 end
 
 
rule 2
salience -2
agenda-group agenda2
when
supportFT(Operators.containsAny(value,new
 String[]{supportedValue,otherValue}))  
  $conclusion: ConclusionFt()
then
  modify($conclusion){setValue(success)};
end*/
 
 rule 2 doesn't hit, works only with eval in rule 2.
 in this example I can add eval, because the Fact Types model is different,
 so the rule doesn't reevaluated.
 because I had this case, I decided to add eval for all constraints, but
 unfortunately I had an infinite loop. 
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Adding-eval-on-rule-cause-it-to-run-in-infinite-loop-tp4029966p4029984.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


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


Re: [rules-users] drools 6 code inner code which serarch kmodule.xml

2014-06-12 Thread Mark Proctor
ClasspathKieProject.discoverKieModules.
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kie/builder/impl/ClasspathKieProject.java

Mark
On 12 Jun 2014, at 08:24, ganeshneelekani ganeshneelek...@gmail.com wrote:

 Hi Team,
 
 please follow below code.
 
   KieServices ks = KieServices.Factory.get();
   KieContainer kContainer = ks.getKieClasspathContainer();
   
   KieSession ksession = 
 kContainer.newKieSession(ksession-rules);
 
 whenever I executed it searched for ksession-rules of kmodule.xml which
 presnt in the path /resouces/META-INF/kmodule.xml.
 
 which of the above code finds that, can any one tell me logic behind it, I
 want to modify this code according to requirement.
 
 Thanks,
 
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/drools-6-code-inner-code-which-serarch-kmodule-xml-tp4030002.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] Are there second-rate fact types?

2014-06-10 Thread Mark Proctor
The feature was more important when we didn’t allow casting,  but people still 
wanted to work with Maps and Lists.
Map( this[key].age  30)

Collections where defaulted to typefalse(false)

Now that we support inline casts, it can be argued that things should always be 
type safe:
Map( this[key]#Person.age  30 )

It’s hard to change this now, without breaking backwards compatability.

The docs don’t say that it’s defaulted to false for collections, only that it’s 
useful for Collections. Someone want to submit a pull request fix for this?

4.7.2.1.2. @typesafe( boolean )

By default all type declarations are compiled with type safety enabled; 
@typesafe( false ) provides a means to override this behaviour by permitting a 
fall-back, to type unsafe evaluation where all constraints are generated as 
MVEL constraints and executed dynamically. This can be important when dealing 
with collections that do not have any generics or mixed type collections.

4.7.5. Non Typesafe Classes

@typesafe( boolean) has been added to type declarations. By default all type 
declarations are compiled with type safety enabled; @typesafe( false ) provides 
a means to override this behaviour by permitting a fall-back, to type unsafe 
evaluation where all constraints are generated as MVEL constraints and executed 
dynamically. This can be important when dealing with collections that do not 
have any generics or mixed type collections.


Mark


On 10 Jun 2014, at 13:45, Davide Sottara dso...@gmail.com wrote:

 java.util.Collections (and descendants) are not @typesafe by default,
 I'll check the reason for that.
 More generally, if a fact is declared as not @typesafe, the runtime
 failure should be more graceful.
 Davide
 
 On 06/10/2014 01:26 PM, Wolfgang Laun wrote:
 Consider:
 
   class Foo { /*...*/ }
 
   rule checkFoo
   when
  Foo( noSuchField  0 )
   then ... end
 
 DRL compilation reports an error (Error: unable to resolve method ...)
 and identifies rule, line and column, which is fine.
 
 Now let's look at:
 
   import java.util.ArrayList;
   rule checkArrayList
   when
  ArrayList( noSuchField  0 )
   then ... end
 
 The same DRL compiler (checked with 5.5.0 and 6.0.0) accepts this, and
 there is a nasty exception thrown at runtime. This is inconvenient,
 since the exception can be thrown by any code inserting an ArrayList
 object, and the faulty rule isn't identified.
 
 Why are certain classes second-rate?
 
 -W
 ___
 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

Re: [rules-users] NullPointerException at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion

2014-06-06 Thread Mark Proctor
We have a number of add/remove rule tests, could you reproduce your problem, 
using the same classes and format as outlined in this test class. Ideally 
adding your reproducer as a single failing test method:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/AddRemoveRulesTest.java

Creating JIRA’s and submitting pull requests.
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark
On 6 Jun 2014, at 09:12, tia rabarijaonadomo...@gmail.com wrote:

 Hello,
 
 I'm trying to add a new rule on the fly like here:
 https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L158
 
 Here is the method to add a rule, once the KieSession is created and
 configured: 
 public void addRule(String rule){
   
   KieServices ks= KieServices.Factory.get();
   ReleaseId rid= ks.newReleaseId(org.kie, businessrules, 
 1.0);
 
   KieFileSystem kfs = ks.newKieFileSystem();
   kfs.generateAndWritePomXML(rid);
   kfs.write(src/main/resources/rule.drl,rule);
   KieBuilder kb = ks.newKieBuilder(kfs).buildAll();
   if( kb.getResults().hasMessages( 
 org.kie.api.builder.Message.Level.ERROR )
 ) {
   for( org.kie.api.builder.Message result : 
 kb.getResults().getMessages() )
 {
   System.err.println(result.getText());
   }
   }   
   InternalKieModule kieModule = (InternalKieModule) 
 ks.getRepository()
   .getKieModule(rid);
   byte[] jar = kieModule.getBytes();
 
   Resource jarRes = ks.getResources().newByteArrayResource(jar);
   ks.getRepository().addKieModule(jarRes);
   kieContainer.updateToVersion(rid);
   }
 
 But when I'm calling this method, I get the error below: 
 java.lang.NullPointerException
   at org.drools.core.util.LinkedList.remove(LinkedList.java:168)
   at
 org.drools.core.phreak.AddRemoveRule.mergeSegment(AddRemoveRule.java:938)
   at
 org.drools.core.phreak.AddRemoveRule.correctSegmentOnSplitOnRemove(AddRemoveRule.java:377)
   at 
 org.drools.core.phreak.AddRemoveRule.removeRule(AddRemoveRule.java:182)
   at
 org.drools.core.reteoo.ReteooBuilder.removeTerminalNode(ReteooBuilder.java:171)
   at 
 org.drools.core.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:165)
   at
 org.drools.core.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:1406)
   at
 org.drools.core.reteoo.ReteooRuleBase.removeObjectsGeneratedFromResource(ReteooRuleBase.java:1652)
   at
 org.drools.compiler.compiler.PackageBuilder.removeObjectsGeneratedFromResource(PackageBuilder.java:3898)
   at
 org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:114)
 
 For the line : kieContainer.updateToVersion(rid);
 
 But if I'm firing the rules once  (kieSession.fireAllRules();) before adding
 the new rule, I don't get the exception O_o
 
 Someone has any idea why ?
 
 thanks!
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/NullPointerException-at-org-drools-compiler-kie-builder-impl-KieContainerImpl-updateToVersion-tp4029894.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] Drools slowness in first calls

2014-06-05 Thread Mark Proctor
On 5 Jun 2014, at 16:48, Gael gael.weil-jour...@prestataire.april.com wrote:

 Hi, 
 
 We are using Drools for a heavy process and we notice some slowness during
 the first calls to kbases (containing about 1500 rules each) using
 StatefulKnowledgeSession. 
 Even if the kbase is loaded, we need to make some fictive calls (fire
 the rules with some facts) until it begins to respond within a reasonable
 time. It's like we need to warm it up.. 
That’s sort of how the JVM works, it takes many thousands of iterations for JIT 
byte code to kick in. There is also some additional byte code generation we do 
on the fly to speed things up - you may also be seeing this.
 
 Any idea about what Drools does during this time? 
 Is there a way to programmatically launch these processing without the need
 to have facts ? 
Not really, this is how the JVM works, likewise the additional byte code 
generation we do.

In 6.x there is an additional one off cost too, in calculating all the node 
memories and segments. This also is done “on the fly”, during the first session.

Mark
 
 Thanks in advance and sorry for my english. 
 
 NB : we use Drools 5.5. 
 
 Regards, 
 Gael
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-slowness-in-first-calls-tp4029887.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] ruleflow-group vs. agenda-group vs. activation-group ?

2014-06-03 Thread Mark Proctor

On 3 Jun 2014, at 13:16, Péter Gergely, Horváth h.pe...@mailbox.hu wrote:

 Hi All,
 
 I've been experimenting with agenda-group and ruleflow-group features and I 
 am now a bit confused. The documentation states that agenda-group and 
 ruleflow-group features have been merged, but I'm not sure how this relates 
 to activation groups.
it doesn’t. That is a separate thing, and unchanged.
 
 ruleflow-groups used to be a rule-flow feature, driven by the .RF file, 
 requiring JBPM engine behind the scenes. Agenda-group work without the 
 presence of JBPM: does it mean we can use the RF file for visualizing the 
 agenda-groups as well?   
All it means is that the rule flow now calls setFocus() when it reaches a 
ruleflow-group.
 
 Could someone please shed some light on the differences between these 
 constructs? Which one is the currently recommended approach (when?) for 
 controlling rule execution flow?
So an ruleflow-group and an agenda-group are now the same thing. RuleFlow is an 
additional thing to orchestrate the calling of the ruleflow/agenda-group.
 
 Thanks,
 Peter
 
 ___
 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] Activation-group ignored when working with events in Drools 6 ?

2014-06-03 Thread Mark Proctor
We’ll look into it, it may already be fixed by this:
https://github.com/sotty/drools/commit/15cfe29d946d7e33520c20b4f3a61bedeeab05cc

Mark
On 3 Jun 2014, at 18:33, kenota unpla...@gmail.com wrote:

 It seems that activation-group rule attribute is ignored when rule works with
 events (@role(event)). Example rule file:
 
 
 declare LocalEvent
@role(event)
 end
 
 rule Rule1
activation-group test
 when
$event : LocalEvent()
 then
System.out.println(I am rule 1  + $event);
 end
 
 rule Rule2
activation-group test
 when
$event : LocalEvent()
 then
System.out.println(I am rule 2  + $event);
 end
 
 
 If i create event and insert it into KieSession both rules are fired, if i
 remove @role(event) line then only one rule is fired.
 
 I am experiencing this behaviour in 6.0.1.Final and 6.1.0.Beta4, but seems
 like everything is working as expected in 5.5.0.Final.
 
 Is that expected behaviour or a bug?
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Activation-group-ignored-when-working-with-events-in-Drools-6-tp4029834.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] Rules storage without Guvnor?

2014-06-02 Thread Mark Proctor

On 2 Jun 2014, at 08:40, Péter Gergely, Horváth h.pe...@mailbox.hu wrote:

 Hello All,
 
 We are evaluating Drools for our use case and would have a question for 
 storing rules files. We are in a relatively constrained environment, where 
 getting Guvnor up and running does not seems to be a valid option. Since we 
 would only need the core repository functionality so that we can separate 
 rule deployment from application deployments (and none of the advanced 
 features like online editing etc), I think it would make more sense to have a 
 light-weight alternative for storing the rule files.
In 6.0 our rules are stored in GIT, it doesn’t get much lighter than that

Our UI is easily customisable if you know how, as it’s all modular, and 
everything is a plugin. So you can hide/disable the parts that you do not want 
available at run time, although at the moment that requires a rebuild.
 
 Being able to pick up rules from an NFS share of from a database CLOB field 
 would be perfectly sufficient for us. I have worked with JBPM4 quite a lot, 
 where the core engine contained support for versioned storage of the process 
 definitions in the database itself [1]. 
I don’t see how this would be better than GIT, and certainly a lot more 
complicated and heavier.
 
 Is there any similar feature in Drools, where the rules can be deployed to 
 e.g. a database or any other repository solution, (without using Guvnor)?
No, I don’t see what value this would have (simply storing a clob). I could 
potentially see value in an indexed/exploded rules stored in a DB for 
refactoring, x-reference, analysis work. But this would be additional to the 
GIT storage, and not instead of.

 I haven't found too much details on this topic, but for me it seems that the 
 only approach would be to have some custom logic, which programmatically 
 checks for rule updates and re-creates the whole knowledgebase on any update.
You can use our Maven plugin for this with GIT. You can poll or add a GIT hook. 
You can look into hudson for automating this.  JGIT doesn’t expose hooks right 
now, so you’d need to use your own GIT (which wouldn’t work with guvnor, 
although you can GIT-Mirror the two).
 I am wondering whether there is any more sophisticated solution in Drools 
 where at least update checking/rule reconfiguration could be delegated to the 
 engine. 
The best way would be to extend the maven plugin to provide this functionality, 
but make sure it’s independent of maven too. If you do this right, we can look 
at integrating it into the main Guvnor codebase.

Mark
 
 Any inputs are appreciated. 
 
 Thanks,
 Peter
 
 [1] 
 http://docs.jboss.com/jbpm/v4/javadocs/org/jbpm/api/RepositoryService.html
  
 ___
 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] Does generated graph rules is build to respect a disjunctive normal form ?

2014-06-02 Thread Mark Proctor
I thought clips did do disjunction normal form? in that all ‘or’s are removed 
from the body of the tree and moved to the root, thus rewriting the logic into 
separate rules? This docs shows an ‘or’ rule is the equivalent of disjunction 
normal form:
http://www.csie.ntu.edu.tw/~sylee/courses/clips/bpg/node5.4.3.html

We do soothing similar to above, and a few other things. This class applies all 
our logic transformations, you may add others:
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/rule/LogicTransformer.java

Mark

On 2 Jun 2014, at 14:37, Mercier Jonathan jmerc...@genoscope.cns.fr wrote:

 Hi,
 
 We use Drools at this time to explore some possibilities. We have an old 
 system, clips based and with clips rules need to be wrote to a 
 disjunctive normal form because they are no internal processing to 
 transform user rule to a disjunctive normal form.
 As  Drools generate a graph (Phreak) i would like to know if this graph 
 try to represent rules as  a disjunctive normal form ?
 if not i would like to know if we should to use disjunctive normal form 
 to write rules ?
 
 It seem disjunctive normal form could allow to do some concurrent 
 computation, i would like to know if drools will use this feature?
 
 thanks
 
 Regards
 ___
 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] Does generated graph rules is build to respect a disjunctive normal form ?

2014-06-02 Thread Mark Proctor

On 2 Jun 2014, at 14:58, Mercier Jonathan jmerc...@genoscope.cns.fr wrote:

 Thanks Mark simple and clear :-)
 
 Did you you have somewhere a roadmap ?
  to know:
- when nearly 6.0.2 will come
6.1 CR should be out this week
- when concurrent approach wil be add
Our new algorithm has been designed for parallel evaluations, and I’d be happy 
to take you through why. However we haven’t yet had the time to actually 
implement the next stage to make it parallel. I’ll happily mentor anyone who 
wants to give this a go.
http://blog.athico.com/2013/11/rip-rete-time-to-get-phreaky.html

The key change to allow parallelisation is that we are goal driven now, instead 
of data driven. And that we colour the network into ‘segments’ to isolate the 
shared areas.

mark
 
 Thanks

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

Re: [rules-users] Abstraction between rules and data model?

2014-06-02 Thread Mark Proctor

On 2 Jun 2014, at 13:59, Horváth Péter Gergely h.pe...@mailbox.hu wrote:

 Hi Davide,
 
 Thanks, I just wanted to get a grasp of the time frame we could expect 
 (whether it is a month or half a year etc.) :) 
We haven’t had much feedback on traits, and the system is still in flux. So we 
cannot give any time frame. At some point there will be a momentum in the 
number of users, that will allow us to have a degree of confidence in it, but 
at the moment we’ve had close to zero feedback from users on this functionality.

But there is nothing to stop you using this now. The only difference is that we 
may or may not change it up until the point we call it “non-experimtal”. It 
won’t make any difference to the execution stability and bugs.
 
 A bit more about our use case: we have a massive old system, with basically 
 all of the logic embedded into Java. We are in the process of refactoring and 
 moving up-to-date Java technologies. We would like to introduce a rule engine 
 so as to extract logic from the core of the application. Since we need to 
 re-structure the whole back-end and persistence layer, we face a challenge 
 with rules: as the object model changes, the rules have to change also, which 
 simply would not be manageable. (Imagine something really crazy/complex here: 
 6-8-... levels of object hierarchy, grown most of the time organically during 
 the last 15 years.) Deferring the introduction of the rule engine until the 
 data model classes reach the final, ideal state is not something we can now 
 afford, the rule engine and data model refactoring projects should be done in 
 parallel, without the one paralyzing the other one... 
 
 Take the following as an example (from the manual). Say, you have Applicant 
 class, with age and name fields:  
 
 public class Applicant {
 
 private String name;
 private int age;
 
 // getters/setters
 }
 
 Then, you could have a simple rule, requiring, that name must be supplied:
 
 rule Supplied a proper name
 when
 Applicant( name == null)
 $a : Application()
 then
 output.println(### RULE MATCH: Invalid application: No name specified!);
 
 $a.setValid( false );
 
 end
 
 But there is an issue: every single time you refactor / rename any field in 
 your domain model, the rules are no longer valid. That is why we have a 
 problem: we should start developing rules against a relatively fluid object 
 model. Say Applicant.name is renamed to Applicant.fullName, then the existing 
 rules are no longer valid. That is why I would like to have some sort of 
 abstraction, since the rules do not really need to know the exact details of 
 the underlying class. 
 
 As a demonstration of my idea, I managed to hack together a custom 
 parameterizable operator, that calls the method where the annotation contains 
 the same parameter as in the rule. With this approach, changes to the field 
 names would no longer affect the rules. Again, I have to highlight, I don't 
 think this should necessarily be implemented in the core engine. What I am 
 looking for is some kind of extension point allowing us to hook into the 
 expression evaluation part of Drools. (Instead of a custom operator, 
 something, where we can access the object and the expression being resolved 
 so that we can implement our custom logic for returning the value of the 
 expression)
 
 The rule now looks like this - note the custom satisfiesRule operation. The 
 Name of this Applicant expression now abstracts away the name of the actual 
 field (the second parameter is the operator for the test, please ignore it 
 for now): 
 
 rule Supplied a proper name
 agenda-group evaluate-application
 auto-focus true
 when
 Applicant( this satisfiesRule[ Name of this Applicant ,  is equal to 
 ] null )
 $a : Application()
 then
 output.println(### RULE MATCH: Invalid application: No name specified!);
 
 $a.setValid( false );
 
 end
 
 The name is simply mapped by a custom annotation: 
 
 public class Applicant {
 
 private String name;
 private int age;
 
 @MyBusinessExpression(Name of this Applicant)
 public String getName() {
 return name;
 }
 // getters/setters
 }
 
 
 I think having a level of abstraction between the rules and the data model 
 would not only be useful for de-coupling, but also can make rule authoring 
 easier for the business users. The custom operator (please see attachment) is 
 a kind of hacky workaround, but demonstrates how something similar could be 
 achieved at run time (without using DSL or any other rule transformation). 
 
 Please let me know what you think. :)
 
 Cheers,
 Peter
 
 
 
 
 
 
 
 
 
 
 2014-06-02 11:54 GMT+02:00 Davide Sottara dso...@gmail.com:
 I can't guarantee a public date.. as a community member, I work on a best 
 effort basis...
 I'll try to do it before the end of the month, though. 
 For now, as a workaround, I would create derived getter/setter pairs that 
 expose the desired
 

Re: [rules-users] Rules storage without Guvnor?

2014-06-02 Thread Mark Proctor

On 2 Jun 2014, at 16:21, Horváth Péter Gergely h.pe...@mailbox.hu wrote:

 Hi Mark,
 
 Thank you for your help. Creating a custom build of Guvnor sounds to require 
 quite some effort, I'm not sure whether we should go down that way. 
 
 Unfortunately, I don't think we will have the option to use Maven based rule 
 deployments at all. In Drools 6, KieScanner seems to be built around Maven; 
 this doesn't suit environments where the application runs on servers without 
 Maven (e.g. no Maven installed, no local Maven repository allowed, access to 
 remote Maven repositories blocked by firewall.) 
 
maven is just a JAR like any other JAR. And a Maven repo is just a file system. 
If you write something or use something else, it’s just going to be creating 
equivalents.
 Do you see any way for us to load rule files directly from the file system 
 and still have the automatic change detection?
Use the maven plugin. You don’t need to be  maven enterprise to use maven.
 For example, we could push rule files to NFS with CI and let the application 
 detect and pick up changes... 
 
 Thanks,
 Peter
 
 
 
 2014-06-02 14:13 GMT+02:00 Mark Proctor mproc...@codehaus.org:
 
 On 2 Jun 2014, at 08:40, Péter Gergely, Horváth h.pe...@mailbox.hu wrote:
 
 Hello All,
 
 We are evaluating Drools for our use case and would have a question for 
 storing rules files. We are in a relatively constrained environment, where 
 getting Guvnor up and running does not seems to be a valid option. Since we 
 would only need the core repository functionality so that we can separate 
 rule deployment from application deployments (and none of the advanced 
 features like online editing etc), I think it would make more sense to have 
 a light-weight alternative for storing the rule files.
 In 6.0 our rules are stored in GIT, it doesn’t get much lighter than that
 
 Our UI is easily customisable if you know how, as it’s all modular, and 
 everything is a plugin. So you can hide/disable the parts that you do not 
 want available at run time, although at the moment that requires a rebuild.
 
 
 Being able to pick up rules from an NFS share of from a database CLOB field 
 would be perfectly sufficient for us. I have worked with JBPM4 quite a lot, 
 where the core engine contained support for versioned storage of the process 
 definitions in the database itself [1]. 
 I don’t see how this would be better than GIT, and certainly a lot more 
 complicated and heavier.
 
 
 Is there any similar feature in Drools, where the rules can be deployed to 
 e.g. a database or any other repository solution, (without using Guvnor)?
 No, I don’t see what value this would have (simply storing a clob). I could 
 potentially see value in an indexed/exploded rules stored in a DB for 
 refactoring, x-reference, analysis work. But this would be additional to the 
 GIT storage, and not instead of.
 
 I haven't found too much details on this topic, but for me it seems that the 
 only approach would be to have some custom logic, which programmatically 
 checks for rule updates and re-creates the whole knowledgebase on any update.
 You can use our Maven plugin for this with GIT. You can poll or add a GIT 
 hook. You can look into hudson for automating this.  JGIT doesn’t expose 
 hooks right now, so you’d need to use your own GIT (which wouldn’t work with 
 guvnor, although you can GIT-Mirror the two).
 I am wondering whether there is any more sophisticated solution in Drools 
 where at least update checking/rule reconfiguration could be delegated to 
 the engine. 
 The best way would be to extend the maven plugin to provide this 
 functionality, but make sure it’s independent of maven too. If you do this 
 right, we can look at integrating it into the main Guvnor codebase.
 
 Mark
 
 Any inputs are appreciated. 
 
 Thanks,
 Peter
 
 [1] 
 http://docs.jboss.com/jbpm/v4/javadocs/org/jbpm/api/RepositoryService.html   
   
 ___
 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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Using git-p4 with workbench

2014-05-27 Thread Mark Proctor
don’t touch the .niogit folder. You have your git-p4 repo, that you cloned. Now 
push it to the ssh connection of the Guvnor server.

Mark
On 27 May 2014, at 22:29, Steinmetz, Jean-Philippe 
jpsteinm...@theworkshop.us.com wrote:

 Hi Mark,
 
 Thanks for the reply. I have tried creating a new repo in the workbench and 
 then using git-p4 on the command line sync'd perforce to it in the 
 appropriate .niogit directory (per the git-p4 docs this use case is how you 
 add p4 to an existing git repo). However, I am not seeing the working files 
 anywhere. Where does the workbench store the work tree?
 
 Jean-Philippe
 
 
 On Thu, May 22, 2014 at 3:45 PM, Mark Proctor mproc...@codehaus.org wrote:
 We use JGit and I don’t believe (but could be wrong) it has direct p4 
 support, like this git extension offers.
 http://git-scm.com/docs/git-p4
 
 However Git is distributed, so just clone and sync a p4 repo with this Git 
 command line tool and use it as an intermediary. Then merge/mirror this 
 intermediary with our JGit repo.
 
 Mark
 
 On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe 
 jpsteinm...@theworkshop.us.com wrote:
 
  Hi,
 
  Has anyone tried using a VCS bridge for git with the Drools 6 workbench? 
  Specifically I am interested in git-p4 so that I can access an existing 
  maven project that is currently stored in Perforce. Is this use case 
  supported?
 
  Thanks in advance,
 
  Jean-Philippe
  ___
  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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Using git-p4 with workbench

2014-05-27 Thread Mark Proctor
You can bi-drection sync git, if you know what you are doing. But these are 
more GIT Qs, and better asked on the GIT mailing list. Lot’s of stack exchange 
entries too for two way git sync
http://stackoverflow.com/questions/15056327/how-do-i-synchronise-two-remote-git-repositories

Mark


On 28 May 2014, at 01:11, Steinmetz, Jean-Philippe 
jpsteinm...@theworkshop.us.com wrote:

 Hrm okay. Pushing from the git-p4 clone to the workbench doesn't really help 
 either though. The bridge needs to be bi-directional. Meaning, the latest 
 changes in perforce should be sync'd into the workbench regularly and any 
 commits to the workbench need to be pushed back to perforce. Perhaps instead 
 I need to set up the git-p4 clone as git server itself that the workbench can 
 clone. If I do that will it push back to that server? or does the workbench 
 not play nice that way? Also, does the workbench perform regular fetches on a 
 cloned repo?
 
 
 On Tue, May 27, 2014 at 3:27 PM, Mark Proctor mproc...@codehaus.org wrote:
 don’t touch the .niogit folder. You have your git-p4 repo, that you cloned. 
 Now push it to the ssh connection of the Guvnor server. 
 Mark
 
 On 27 May 2014, at 22:29, Steinmetz, Jean-Philippe 
 jpsteinm...@theworkshop.us.com wrote:
 
 Hi Mark,
 
 Thanks for the reply. I have tried creating a new repo in the workbench and 
 then using git-p4 on the command line sync'd perforce to it in the 
 appropriate .niogit directory (per the git-p4 docs this use case is how you 
 add p4 to an existing git repo). However, I am not seeing the working files 
 anywhere. Where does the workbench store the work tree?
 
 Jean-Philippe
 
 
 On Thu, May 22, 2014 at 3:45 PM, Mark Proctor mproc...@codehaus.org wrote:
 We use JGit and I don’t believe (but could be wrong) it has direct p4 
 support, like this git extension offers.
 http://git-scm.com/docs/git-p4
 
 However Git is distributed, so just clone and sync a p4 repo with this Git 
 command line tool and use it as an intermediary. Then merge/mirror this 
 intermediary with our JGit repo.
 
 Mark
 
 On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe 
 jpsteinm...@theworkshop.us.com wrote:
 
  Hi,
 
  Has anyone tried using a VCS bridge for git with the Drools 6 workbench? 
  Specifically I am interested in git-p4 so that I can access an existing 
  maven project that is currently stored in Perforce. Is this use case 
  supported?
 
  Thanks in advance,
 
  Jean-Philippe
  ___
  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 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

Re: [rules-users] Drools 6 Eclipse debugger does not work?

2014-05-27 Thread Mark Proctor
Our Eclipse tooling hasn’t received much love over the years, and no one from 
community has ever stepped up :(

We might have some one internal to RHT that might be able to help in the near 
future, but that will take a few weeks before I hear anything.

We in the Drools team tend to stick with plain text editors and logging :)

Mark

On 27 May 2014, at 10:48, Péter Gergely, Horváth h.pe...@mailbox.hu wrote:

 Hi All,
 
 I am evaluating Drools 6 for one of our projects but found a strange issue 
 with Eclipse integration; debug functionality does not seem to work at all. 
 Only Rules view displays the rules (which is I believe independent from the 
 debugger) but all of the other views (Agenda, Audit, Global Data, Process 
 Instance, Process Instances, Working Memory) are always empty. 
 
 I have confirmed that Drools nature is enabled on the project (it is actually 
 the example project generated by the Eclipse plugin) and I start my class as 
 a Drools application in Debug mode. (It is the com.sample.DroolsTest from the 
 plugin-generated sample project)
 
 My Eclipse environment is the following:
 
 Drools plugin installed: 
 JBoss Drools Core 6.0.0.Final
 JBoss Drools Guvnor 6.0.0.Final
 JBoss jBPM Core 6.0.0.Final
 
 Eclipse release information:
 Spring Tool Suite 
 Version: 3.5.1.RELEASE
 Build Id: 201405030657
 Platform: Eclipse Juno SR2 (3.8.2)
 
 Version of Drools Runtime is 6.0.1 Final
 
 
 Does anyone have any idea what could be wrong? For me one of the most 
 powerful features of Drools seemed to be its Eclipse-based rule debugging 
 capability. Could someone please help fixing my Eclipse Drools setup?
 
 Thanks,
 Peter
 
  
 ___
 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] London (May 26th) Drools jBPM community contributor meeting

2014-05-22 Thread Mark Proctor
London, Chiswick, May 26th to May 30th

During next week a large percentage of the Drools team, some of the jBPM team 
and some community members will be meeting in London (Chiswick). There won’t be 
any presentations, we’ll just be in a room hacking, designing, exchanging ideas 
and planing. This is open to community members who wish to contribute towards 
Drools or jBPM, and want help with those contributions. This also includes 
people working on open source or academic projects that utilise Drools or jBPM. 
Email me if you want to attend, our locations may very (but within chiswick) 
each day. 

We will not be able to make the day time available to people looking for 
general Drools or jBPM guidance (unless you want to buy us all lunch). But we 
will be organising evenings things (like bowling) and could make wed or thu 
evening open to people wanting general chats and advice. Email me if you’re 
interested, and after discussing with the team, I’ll let you know.

Those currently attending:
Mark Proctor (mon-fri) Group architect
Edson Tirelli (mon-fri) Drools backend, and project lead
Mario Fusco (mon-fri) Drools backend
Davide Sottara (wed-fri) Drools backend
Alex Porcelli (mon-fri) Drools UI
Michael Anstis (thu-fri) Drools UI
Kris Verlaenen (wed-thu) jBPM backend, and project lead
Mauricio Salatino (mon-fri) jBPM tasks and general UI
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Using git-p4 with workbench

2014-05-22 Thread Mark Proctor
We use JGit and I don’t believe (but could be wrong) it has direct p4 support, 
like this git extension offers.
http://git-scm.com/docs/git-p4

However Git is distributed, so just clone and sync a p4 repo with this Git 
command line tool and use it as an intermediary. Then merge/mirror this 
intermediary with our JGit repo. 

Mark

On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe 
jpsteinm...@theworkshop.us.com wrote:

 Hi,
 
 Has anyone tried using a VCS bridge for git with the Drools 6 workbench? 
 Specifically I am interested in git-p4 so that I can access an existing maven 
 project that is currently stored in Perforce. Is this use case supported?
 
 Thanks in advance,
 
 Jean-Philippe
 ___
 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] Using KieScanner in drools6

2014-05-21 Thread Mark Proctor
See 
http://docs.jboss.org/drools/release/6.1.0.Beta3/drools-docs/html/KIEChapter.html
4.2.3.5. Settings.xml and Remote Repository Setup

4.2.3.3. KieScanner

4.2.5. Installation and Deployment Cheat Sheets


Mark

On 21 May 2014, at 11:59, ganeshneelekani ganeshneelek...@gmail.com wrote:

 Hi Team,
 
 I go through with the release doc 
 http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html_single/
 and found that 
 
 
 2.1.6. KieScanner
 
 The KieScanner is a maven-oriented replacement of the KnowledgeAgent present
 in Drools 5. 
 
 using knowledgwAgent I have linked through changeset.xml by below code in
 drools 5.4
 
 KnowledgeAgent kagent =
 KnowledgeAgentFactory.newKnowledgeAgent(MyAgent1,kbase, kconf); 
 ResourceFactory.getResourceChangeNotifierService().start();
 ResourceFactory.getResourceChangeScannerService().start();
 kagent.applyChangeSet(ResourceFactory.newUrlResource(http://localhost:8380/drools-guvnor/ChangeSet.xml;));
   kbase = kagent.getKnowledgeBase();
 
 How I can achieve this using drools 6 to interact with  my java code to
 drools workbench.
 
 or which drools 6 need to download to interact with java code.
 
 Please suggest me, 
 
 
 Thanks
 Ganesh Neelekani
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Using-KieScanner-in-drools6-tp4029638.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] Upgrade to protobuf 2.5 - Prevents Upgrading to Drools 6.x

2014-05-20 Thread Mark Proctor

On 20 May 2014, at 02:37, mikerod mjr4...@gmail.com wrote:

 Upgrading Hadoop is not possible for sometime still.  It requires a fairly
 large coordinated effort.
 
 I don't suppose there is any chance that there will be a workaround for this
 in Drools 6?
 Perhaps a configuration options or something?
If some one submits a pull request for this, we can consider it. But we don’t 
have the time to do this ourselves right now.
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-Prevents-Upgrading-to-Drools-6-x-tp4028636p4029616.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] CompositiveClassLoader$CachingLoader$load method intermittently hangs

2014-05-19 Thread Mark Proctor

On 19 May 2014, at 03:21, mikerod mjr4...@gmail.com wrote:

 
 I'm not sure how any of this relates to the Drools v6.x family.

CompositeClassLoader is all gone, so I don’t think this issue will exist in 
6.x. Would be good if you could verify with beta3:
http://downloads.jboss.org/drools/release/6.1.0.Beta3/

We’ll look into 5.x too at some point in the next few weeks.

Mark

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

Re: [rules-users] Drools and GPU

2014-05-19 Thread Mark Proctor
GPUs do not allow state/reference sharing. So it’s not as ideal as you think.

Mark
On 19 May 2014, at 18:16, Anton Hughes kurren...@gmail.com wrote:

 Hi all
 
 We have finding drools to be very resource hungry - and we are looking at 
 having to have very many servers just to satisfy our drools requirements. So 
 I am wondering, has anyone experimented with running drools on a GPU server?
 
 Thanks and regards
 Anton
 ___
 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] setup Drools

2014-05-19 Thread Mark Proctor
That article is over 3 years old, and not relevant for 6.0. Please try the 
documentation here:
http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/index.html

Mark
On 19 May 2014, at 19:35, Gopu Shrestha gshres...@tmghealth.com wrote:

 I want to try Guvnor and try to install following this 
 linkhttp://www.integratingstuff.com/2011/01/28/setting-up-drools-guvnor/
 But confused to download, it says “ After you get Guvnor from 
 http://www.jboss.org/drools, you rename the drools-5.1.1-guvnor.war to 
 drools-guvnor.war.
  
 Which one should I download?
 image001.png
  
 Best Regards
 Gopu
  
 ___
 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] upgrading drools 5.4 to 6.0

2014-05-14 Thread Mark Proctor
please don’t post multiple times. You asked this question 3 times within the 
hour. 

Mark
On 13 May 2014, at 11:12, ganeshneelekani ganeshneelek...@gmail.com wrote:

 Hi All,
 
 I am using drools version 5.4 and I used url of changeset.xml to call the
 the drools-guvnor from my java code.
 
 Now  I am upgrading to drools 6.0 workbench version(Let me know if camel
 version is used), How can I call the drools workbench from my java code.
 
 
 
 Thanks
 Ganesh Neelekani 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/upgrading-drools-5-4-to-6-0-tp4029547.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] Drools 6 support for changeset

2014-05-13 Thread Mark Proctor

On 13 May 2014, at 11:57, ganeshneelekani ganeshneelek...@gmail.com wrote:

 Hi All,
 
 I am using drools version 5.4 and I used url of changeset.xml to call the
 the drools-guvnor from my java code.
 
 Now  I am upgrading to drools 6.0 workbench version(Let me know if camel
 version is used), How can I call the drools workbench from my java code.
read the docs for kie-ci jar, kiescanner class, and settings.xml. It also has 
some architecture diagrams and a cheat sheet diagram.
http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e791

Mark
 
 
 
 Thanks
 Ganesh Neelekani 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4029549.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] Development lifecycle

2014-05-11 Thread Mark Proctor
If it’s a new Drools architecture, I’d recommend you use 6.1 beta3. We use GIT 
for source and Maven for artefacts.  You an setup different maven repo’s for 
dev, stage and prod and create a copy routine to move the jars between the 
environments (or use a tool like sonatype).

Mark
On 11 May 2014, at 05:35, Branham, Jeremy [HR] jeremy.d.bran...@sprint.com 
wrote:

 I am planning a new Drools architecture, and looking for the best way to 
 migrate Drools rules through a series of environments.
 Our typical SDLC involves an initial DEV environment, then migrating to one 
 of several TEST environments, then to an ORT environment, then finally to a 
 PROD environment.
  
 The question has been asked a couple times, looking through the mail 
 archives, but I’m curious if there have been any recent changes that could 
 improve the development lifecycle.
 I’ve read we could just use the import/export function, or the following two 
 options -
  
 Mentions Jackrabbit
 http://article.gmane.org/gmane.comp.java.drools.user/25097/match=production+migration
  
 Using the Rest interface
 https://community.jboss.org/wiki/PublishDroolsartifactsfromaproductionenvironment
  
 Anything else, or any best practice for this?
  
 Thanks!
  
  
 Jeremy D. Branham
 Technology Architect
 Sprint University Performance Support 
 Fort Worth, TX | Tel: **DOTNET
 Office: +1 (972) 405-2970| Mobile: +1 (817) 791-1627
  
  
 
 
 This e-mail may contain Sprint proprietary information intended for the sole 
 use of the recipient(s). Any use by others is prohibited. If you are not the 
 intended recipient, please contact the sender and delete all copies of the 
 message.
 ___
 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] Anyone want to help on our new Rule Algorithm?

2014-05-11 Thread Mark Proctor
If anyone is interested in helping out on our next generation rule algorithm, 
we’ll offer personal mentoring to get you started on your way. Just ping my 
email directly, to discuss:
http://blog.athico.com/2013/11/rip-rete-time-to-get-phreaky.html

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


Re: [rules-users] Anyone want to help on our new Rule Algorithm?

2014-05-11 Thread Mark Proctor
A first good topic, now that we build and propagate tuple sets, is can we 
parallelism our joins?

Look at the insert loop, on line 94. So it iterates and builds a resulting 
tuple set, which is eventually propagated. Can that set be built in parallel?
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/phreak/PhreakJoinNode.java

The key aspect is the iterator right memory. While that memory may or may not 
be indexed, it always returns a list. In the case of indexing, the list will 
sublist for that overall memory.

Ideally those lists will be adaptive, only turning on parallel iteration when 
appropriate (enough joins), while trying to avoid any additional cost when 
parallel iteration is not used. Note currently all lists, are liked lists - we 
do not use arrays.

Once that works, the other methods, right insert, update and delete can all be 
parallelized.

Mark




On 12 May 2014, at 00:00, Mark Proctor mproc...@codehaus.org wrote:

 If anyone is interested in helping out on our next generation rule algorithm, 
 we’ll offer personal mentoring to get you started on your way. Just ping my 
 email directly, to discuss:
 http://blog.athico.com/2013/11/rip-rete-time-to-get-phreaky.html
 
 Mark


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


Re: [rules-users] Not able to use kbase includes= / in Kie Spring

2014-05-09 Thread Mark Proctor
It would well be missed out. Could you write a unit test, so we can catch 
regressions and submit as a pull request please? When prove the problem with a 
test, open a jira and put the jira ID in the comment, as per the “getting 
involved” docs

Example unit tests for kie-spring:
https://github.com/vinodkiran/droolsjbpm-integration/tree/kmodule-spring/kie-spring/src/test/java/org/kie/spring/tests

Gettig involved, how to do pull requests etc:
https://docs.jboss.org/drools/release/6.1.0.Beta3/drools-docs/html/Welcome.html#gettingstarted

Mark


On 9 May 2014, at 01:06, Ashish Nayyar ashis...@gmail.com wrote:

 Hi,
 
 I am trying to include a another kbase in KIE Spring project. This is the 
 configuration
 
 knowledge-services.xml
  kie:kmodule id=kie-spring
 kie:kbase name=kie-base includes=rules1Package 
 packages=au.org.nps.dsaas.rules 
   kie:ksession name=ksession1 type=stateless  
   kie:consoleLogger /
   /kie:ksession
 /kie:kbase
 
   /kie:kmodule
 bean id=kiePostProcessor 
 class=org.kie.spring.KModuleBeanFactoryPostProcessor/
 
 kmodule.xml
 ?xml version=1.0 encoding=UTF-8?
 kmodule xmlns=http://jboss.org/kie/6.0.0/kmodule;
 kbase name=rules1Package packages=au.org.nps.dsaas.rules1 
 ksession name=ksession2 type=stateless /
 /kbase
 /kmodule
 
 My KIE modules are discovered and I can see following in the logs
 
 09:59:36,642 DEBUG [org.drools.compiler.kie.builder.impl.ClasspathKieProject] 
 (ServerService Thread Pool -- 91) Found and used pom.properties 
 META-INF/maven/au.org.nps.dsaas/rules-repository/pom.properties
 09:59:36,645 DEBUG [org.drools.compiler.kie.builder.impl.ClasspathKieProject] 
 (ServerService Thread Pool -- 91) Discovered classpath module 
 au.org.nps.dsaas:rules-repository:0.0.1-SNAPSHOT
 
 But Spring context fails to load and I get the following errors:
 
 09:59:39,547 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] 
 (ServerService Thread Pool -- 91) Unable to build KieBase, could not find 
 include: rules1Package
 
 As per the official documentation 
 (http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/ch.kie.spring.html)
  , I can use the includes property of KBASE tag provided in Spring KIE. I am 
 using kie spring 6.1.0 Beta
 
 Any suggestions?
 
 Thanks
 Ashish
 
 ___
 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] Multiple threads for KieBuilder

2014-05-09 Thread Mark Proctor
This is not possible in the public api now, but it seems like this approach 
would be a valid thing to add to the internal core of Drools. So that we do 
parallel compilation, seamlessly, for all our users. I’m not sure when we’ll 
have time to do it, although maybe someone from the community can work with us 
to do this?

Mark
On 8 May 2014, at 10:04, RichardAmbridge richard.ambri...@gmail.com wrote:

 Hi,
 
  We have over 2 rules in our drools implementation. In drools 5 we
 could build multiple packages in different threads and then create a
 Knowledge base joining all those packages together.
 e.g.
 Thread:
knowledgeB = KnowledgeBuilderFactory.newKnowledgeBuilder();
knowledgeB.add(ResourceFactory.newReaderResource(new
 StringReader(sb.toString())), ResourceType.DRL);
 
 Then in the main compiler, once all threads have finished
KnowledgeBase knowledgeBase =
 KnowledgeBaseFactory.newKnowledgeBase(conf);
for each thread:
 
 knowledgeBase.addKnowledgePackages(thrds[t].getKnowledgeB().getKnowledgePackages());
 
 
 I can't seem to find anyway to do that with the new KIE implementation.
 
 What I would like to do is something like:
 
 Thread:
Create sb to have lots of rules
KieServices kieServices = KieServices.Factory.get();
 
KieFileSystem kfs = kieServices.newKieFileSystem();
kfs.write(src/main/resources/rules.drl, sb.toString());
 
KieBuilder kieBuilder = kieServices.newKieBuilder(kfs);
kieBuilder.buildAll();
 ..check errors
KieContainer kieContainer =
 kieServices.newKieContainer(kieBuilder.getKieModule().getReleaseId());
KieBase kieBase = kieContainer.newKieBase(kieBaseConfiguration);
 
 In main compiling, create multiple threads, each with its own rule set.
 
 Then when all threads completed, take all the kieBase objects and merge into
 one base.
 then KieSession ksession=mergedKieBase.newKieSession();
 
 We compile our rules offline and then load into our running servers. The
 compile server is a multicore server, but buildAll is single threaded.
 
 Is this possible?
 
 Many thanks for the support,
 Ric
 
 
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Multiple-threads-for-KieBuilder-tp4029481.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] Drools 6.0.1 Negative Patterns in Stream Mode not working

2014-05-07 Thread Mark Proctor
Can you try 6.1 beta2? And if there is still a bug, please open a jira:
http://mvnrepository.com/artifact/org.drools/drools-core/6.1.0.Beta2

Ideally please submit a self contained unit test, as a pull request. As 
explained here:
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark


On 7 May 2014, at 14:44, RichardAmbridge richard.ambri...@gmail.com wrote:

 I am using drools 6.0.1 and I have the following test.
 
 public class DroolsTest {
 
public DroolsTest() {
}
 
@Test
public void work() throws InterruptedException, IOException,
 ClassNotFoundException {
 
StringBuilder sb = new StringBuilder();
sb.append(package drools\n);
sb.append(import drools.MyObject;\n\n);
 
sb.append(declare MyObject\n
+  @role ( event )\n
+ end\n\n);
 
sb.append(rule \Template2\\n
+ \n
+ salience 0\n
+ dialect \mvel\\n
+ when\n
+   $s : MyObject(val==0)\n
+   not( MyObject(val==1, this after [0s,5s] $s ) )\n
+ \n
+ then\n
+   System.out.println(\Template 2 fired\)\n
+$s.name=\2\;\n
+ \n
+ end\n);
 
KieServices kieServices = KieServices.Factory.get();
 
KieFileSystem kfs = kieServices.newKieFileSystem();
kfs.write(src/main/resources/rules.drl, sb.toString());
 
KieBuilder kieBuilder = kieServices.newKieBuilder(kfs);
kieBuilder.buildAll();
Results results = kieBuilder.getResults();
assertFalse(results.hasMessages(Message.Level.ERROR));
if (results.hasMessages(Message.Level.WARNING)) {
System.out.println(Warnings logged);
}
KieContainer kieContainer =
 kieServices.newKieContainer(kieBuilder.getKieModule().getReleaseId());
 
KieBaseConfiguration kieBaseConfiguration =
 kieServices.newKieBaseConfiguration();
kieBaseConfiguration.setOption(EventProcessingOption.STREAM);
KieBase kieBase = kieContainer.newKieBase(kieBaseConfiguration);
KieSession ksession = kieBase.newKieSession();
 
MyObject one = new MyObject();
one.val = 0;
 
FactHandle fh1 = ksession.insert(one);
System.out.println(Insert one);
ksession.fireAllRules();
for (int i = 0; i  13; i++) {
System.out.println(Sleep: + i);
Thread.sleep(1000);
//After 5 seconds, rule should fire
}
assertEquals(2, one.name);
 
System.out.println(End);
ksession.halt();
ksession.dispose();
}
 
public class MyObject implements Serializable {
 
String name;
int val;
boolean fired;
 
public String getName() {
return name;
}
 
public void setName(String name) {
this.name = name;
}
 
public int getVal() {
return val;
}
 
public void setVal(int val) {
this.val = val;
}
 
public boolean isFired() {
return fired;
}
 
public void setFired(boolean fired) {
this.fired = fired;
}
 
}
 }
 
 
 The rule is using 
 +   $s : MyObject(val==0)\n
 +   not( MyObject(val==1, this after [0s,5s] $s ) )\n
 
 So, if a MyObject with val==0 is inserted, then after 5 seconds no MyObject
 with val==1 is found the rule will fire.
 This works in Drools 5.5.0
 
 In 6.0.1 the rule doesn't fire.
 
 Please help. I want to use drools 6 but cannot with this problem.
 
 Thanks
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Drools-6-0-1-Negative-Patterns-in-Stream-Mode-not-working-tp4029463.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] Rules not picked when packaged inside the JAR

2014-05-06 Thread Mark Proctor
Have you tried this without using spring? Would be good to know if the problem 
is with our spring implementation or not.

Mark
On 6 May 2014, at 03:51, ash316 ashis...@gmail.com wrote:

 I am using JBOSS 6.1 EAP and my application also uses kie-spring 6.1-Beta
 
 On May 6, 2014 12:03 PM, Mark Proctor [via Drools] [hidden email] wrote:
 This may be a container issue, which container are you using?
 
 It doesn’t locate resources via the classloader. Instead it locates the jar 
 on the file system and scans the contents of the jar. The jar must have a 
 kmodule.xml file inside of it to be recognised and it’s resources added.
 
 We know this works for normal jars. Inside of JBoss EAP you need to add the 
 JBoss VFS jar (I think). We recently made weblogic work, and are currently 
 investigating websphere.
 
 Mark
 On 6 May 2014, at 00:32, Ashish Nayyar [hidden email] wrote:
 
 Can anyone help here please ?
 
 I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) 
 packaged inside a separate project which is included as a jar file as a 
 maven dependency. When I deploy my project, KIEModule is not able to find 
 the rules files (which are packaged inside the jar above). I am not getting 
 an error though but rules are not getting fired. If I manually place the 
 rules files under classpath say WEB-INF/rules/*.drl they are detected and 
 rules are executed. I was under impression that KIEmodules are auto 
 discovered from anywhere in classpath. Any pointers are appreciated. This is 
 general question hence I have not included the comprehensive code files. 
 Everything start working once I place the *.drl files in the classpath (take 
 them outside of jar). I have opened the JIRA issue @ Link Thanks 
 
 
 On Tue, Apr 29, 2014 at 3:51 PM, ash316 [hidden email] wrote:
 I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) 
 packaged inside a separate project which is included as a jar file as a 
 maven dependency. When I deploy my project, KIEModule is not able to find 
 the rules files (which are packaged inside the jar above). I am not getting 
 an error though but rules are not getting fired. If I manually place the 
 rules files under classpath say WEB-INF/rules/*.drl they are detected and 
 rules are executed. I was under impression that KIEmodules are auto 
 discovered from anywhere in classpath. Any pointers are appreciated. This is 
 general question hence I have not included the comprehensive code files. 
 Everything start working once I place the *.drl files in the classpath (take 
 them outside of jar). I have opened the JIRA issue @ Link Thanks 
 View this message in context: Rules not picked when packaged inside the JAR
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 
 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 [hidden email]
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___ 
 rules-users mailing list 
 [hidden email] 
 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/Rules-not-picked-when-packaged-inside-the-JAR-tp4029378p4029432.html
 To unsubscribe from Rules not picked when packaged inside the JAR, click here.
 NAML
 
 View this message in context: Re: [rules-users] Rules not picked when 
 packaged inside the JAR
 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] Requesting for sample spring+drools code

2014-05-06 Thread Mark Proctor
I would recommend you move to 6.0, where changsets are no longer needed. 6.0 
example spring/camel WAR:
https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/drools-camel-server-example

Mark


On 6 May 2014, at 15:57, ganeshneelekani ganeshneelek...@gmail.com wrote:

 Hi Team
 
 I am doing a project using spring and drools,
 Can any one provide me complete sample code which built using drools guvnor
 which takes changeset.xml and Spring.
 
 
 Thanks,
 
 Regards,
 Ganesh Neelekani
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Requesting-for-sample-spring-drools-code-tp4029438.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] KieScanner not working

2014-05-06 Thread Mark Proctor
I believe the way it is at the moment, the head version must change for it to 
detect a change in the over all build. I don’t think it detects and updates 
transitively only.

Mark
On 6 May 2014, at 22:08, Pykhtin, Alex apykh...@ebay.com wrote:

 I’m trying to use KieScanner in 6.0.1.Final build and just can’t make it 
 work. Maybe it’s actually an issue with my using of Maven.
  
 Here’s my code:
  
ReleaseId releaseId = ks.newReleaseId( com.study, project_jar, 
 0.0.1-SNAPSHOT );
KieContainer kContainer = ks.newKieContainer( releaseId );
KieSession kSession = kContainer.newKieSession(ksession-rules_jar);
KieScanner kScanner = ks.newKieScanner( kContainer );
  
 Where “com.study” is my fictional domain and “project_jar” is the jar of my 
 project. It has dependency on “drools_jar” which is a kjar of version 
 “0.0.1-SNAPSHOT” (same version for both jars, by the way).
  
 Later, I’m trying to test drools_jar updating by doing two things:
  
 1.   Rebuilding and deploying drools_jar to the local repository;
 2.   Calling kScanner.scanNow()
  
 And KieScanner is not picking up the changes.
 If I’m deploying drools_jar with the same “0.0.1-SNAPSHOT” version, nothing 
 happens, until the next time I restart my project.
 If I’m deploying drools_jar with the new “0.0.2-SNAPSHOT” version, then it’s 
 not a correct dependency and KieScanner is not picking it up (as I expected).
 If I’m rebuilding project_jar with a new dependency on “0.0.2-SNAPSHOT” of 
 drools_jar, KieScanner is not picking it up either, but restart helps (as I 
 expected).
  
 What is the proper practice of using KieScanner?
  
 Thanks,
 Alex
 ___
 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] Possibility to use variable reference in date comparison using coincides?

2014-05-06 Thread Mark Proctor
Not right now. 

Mark
On 6 May 2014, at 20:29, Björn Nord bjorn.n...@databyran.se wrote:

 Hi,
 
 Is there a way to use a reference to a variable in the coincide-section like 
 the one I have tried below with $expireWeeks?
 
 
 rule Request expired analysis
  dialect mvel
  when
 SettingForDefinition( definition == DonationAnalysisRequest , $code : 
 setting, $expireWeeks : value)
 Donation( $donationDate : sampleDate)
 // $expireWeeks below does not work.
 not PerformedDonationAnalysis(code == $code, sampleDate coincides 
 [$expireWeeks] $donationDate)
   then
  ...
  End
 
 Kindest regards,
 
 Björn
 
 ___
 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] Drools 6.0.0 activation-group + salience bug or feature?

2014-05-06 Thread Mark Proctor
That’s what an activation-group does. The first rule (with the highest 
salience) fires, the others are cancelled.

Out of interest, what’s the game? Something online we can look at? I have an 
interest in games development for Drools, and have been slowly adding examples. 
Space invaders was my latest one:
https://www.youtube.com/watch?v=wORlAZoxttA
https://github.com/droolsjbpm/drools/tree/master/drools-examples/src/main/java/org/drools/games/invaders

Mark
On 6 May 2014, at 23:12, Jan Šťastný newohy...@gmail.com wrote:

 Hi,
 I came across in my view strange behaviour of rules defined with 
 activation-group and salience. I use this combination to set the 
 priority of exclusively fired rules Democracy City Tiles Production 
 and Basic City Tiles Production.
 Their definitions:
 rule Democracy City Tiles Production
 dialect mvel
 ruleflow-group manageProductions
 activation-group cityProduction
 salience 5
 when
 PlayerDTO($owner:id, government==democracy)
 $city:CityDTO(
 owner==$owner
 ,$cityId:id
 ,$managedTiles:managedTiles
 )
 accumulate(
 TileDTO (
 id memberOf $managedTiles
 ,$foodProd:foodProduction
 ,$resourcesProd:resourcesProduction
 ,$tradeProd:tradeProduction
 ) 
 @watch(foodProduction,resourcesProduction,tradeProduction)
 ,$sumFood : sum($foodProd)
 ,$sumResources : sum($resourcesProd)
 ,$sumTrade : 
 sum(($tradeProd1)?$tradeProd:($tradeProd+1))
 )
 UpdateCityProduction(cityId==$cityId)
 then
 modify($city){
 setFoodProduction($sumFood)
 ,setResourcesProduction($sumResources)
 ,setTradeProduction($sumTrade)
 }
 end
 
 and
 
 rule Basic City Tiles Production
 dialect mvel
 ruleflow-group manageProductions
 activation-group cityProduction
 when
 PlayerDTO($owner:id)
 $city:CityDTO(
 owner==$owner
 ,$cityId:id
 ,$managedTiles:managedTiles
 )
 accumulate(
 TileDTO (
 id memberOf $managedTiles
 ,$foodProd:foodProduction
 ,$resourcesProd:resourcesProduction
 ,$tradeProd:tradeProduction
 ) 
 @watch(foodProduction,resourcesProduction,tradeProduction)
 ,$sumFood : sum($foodProd)
 ,$sumResources : sum($resourcesProd)
 ,$sumTrade : sum($tradeProd)
 )
 UpdateCityProduction(cityId==$cityId)
 then
 modify($city){
 setFoodProduction($sumFood)
 ,setResourcesProduction($sumResources)
 ,setTradeProduction($sumTrade)
 }
 end
 
 But problem occurs when two CityDTO objects are in the session. I would 
 like to fire one rule for each CityDTO, but the activation-group cancels 
 all the activations after first is fired. So only one activation in 
 place of two fires. Here is the log:
 
 ==[BeforeActivationFiredEvent:  getActivation()=[[ Democracy City Tiles 
 Production active=false ] [ [fact 
 0:12:36803987:36803987:12:DEFAULT:NON_TRAIT:UpdateCityProduction( 
 cityId=5 )]
 [fact 
 0:16:2083264739:2083264739:16:null:NON_TRAIT:[Ljava.lang.Object;@7c2c18e3]
 [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, 
 name=marefy, cityCentre=null, owner=1, improvements=[], 
 currentImprovement=null, enabledImprovements=[], homeUnits=[], 
 currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[1, 
 2], size=5, weLoveDay=false, disorder=false, foodProduction=0, 
 foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, 
 resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, 
 corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, 
 researchAmount=0, peopleHappy=2, peopleUnhappy=1, peopleContent=1, 
 peopleEntertainers=0, peopleTaxmen=1, peopleScientists=0, 
 pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]]
 [fact 0:9:1762763035:99463566:9:DEFAULT:NON_TRAIT:PlayerDTO [id=1, 
 name=honza, government=democracy, enabledGovernments=null, 
 currentAdvance=null, advances=null, enabledAdvances=null, treasury=0, 
 research=0, researchSpent=null, turnsAvailable=null, luxuriesRatio=0, 
 taxesRatio=0, researchRatio=0]] ] ], 
 getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl@6a5b07f2]
 ==[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Basic 
 City Tiles Production active=false ] [ [fact 
 0:15:807492131:807492131:15:null:NON_TRAIT:[Ljava.lang.Object;@30215a23]
 [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, 
 name=marefy, cityCentre=null, owner=1, improvements=[], 
 currentImprovement=null, 

Re: [rules-users] Rules not picked when packaged inside the JAR

2014-05-05 Thread Mark Proctor
This may be a container issue, which container are you using?

It doesn’t locate resources via the classloader. Instead it locates the jar on 
the file system and scans the contents of the jar. The jar must have a 
kmodule.xml file inside of it to be recognised and it’s resources added.

We know this works for normal jars. Inside of JBoss EAP you need to add the 
JBoss VFS jar (I think). We recently made weblogic work, and are currently 
investigating websphere.

Mark
On 6 May 2014, at 00:32, Ashish Nayyar ashis...@gmail.com wrote:

 Can anyone help here please ?
 
 I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) 
 packaged inside a separate project which is included as a jar file as a maven 
 dependency. When I deploy my project, KIEModule is not able to find the rules 
 files (which are packaged inside the jar above). I am not getting an error 
 though but rules are not getting fired. If I manually place the rules files 
 under classpath say WEB-INF/rules/*.drl they are detected and rules are 
 executed. I was under impression that KIEmodules are auto discovered from 
 anywhere in classpath. Any pointers are appreciated. This is general question 
 hence I have not included the comprehensive code files. Everything start 
 working once I place the *.drl files in the classpath (take them outside of 
 jar). I have opened the JIRA issue @ Link Thanks 
 
 
 On Tue, Apr 29, 2014 at 3:51 PM, ash316 ashis...@gmail.com wrote:
 I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) 
 packaged inside a separate project which is included as a jar file as a maven 
 dependency. When I deploy my project, KIEModule is not able to find the rules 
 files (which are packaged inside the jar above). I am not getting an error 
 though but rules are not getting fired. If I manually place the rules files 
 under classpath say WEB-INF/rules/*.drl they are detected and rules are 
 executed. I was under impression that KIEmodules are auto discovered from 
 anywhere in classpath. Any pointers are appreciated. This is general question 
 hence I have not included the comprehensive code files. Everything start 
 working once I place the *.drl files in the classpath (take them outside of 
 jar). I have opened the JIRA issue @ Link Thanks 
 View this message in context: Rules not picked when packaged inside the JAR
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

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

Re: [rules-users] Is property reactive bug in 5.5 fixed in 6.0

2014-05-04 Thread Mark Proctor
not aware of any property reactive bugs, make sure you try master to be sure:
http://downloads.jboss.org/drools/release/snapshot/master/

Mark
On 4 May 2014, at 21:43, wtang wt...@kana.com wrote:

 Hi,
 
 I am having issues with property reactive causing some rules not to get
 fired.  Looks like someone also encountered this issue in 5.5 and it was
 agreed to be a bug.  I am using 6.0 and was wondering if this bug is fixed.
 
 Here is the detail of the property reactive bug in 5.5:
 
 http://drools.46999.n3.nabble.com/same-criteria-across-multiple-rules-cancels-activation-with-Property-Reactive-Facts-td4021204.html#a4021208
 
 
 thanks!  Wing Tang
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419.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] Is property reactive bug in 5.5 fixed in 6.0

2014-05-04 Thread Mark Proctor
We did a number of property reactive fixes for 5.6 and 6.0, but I do not know 
if the one in that mailing list entry was fixed, as they never submitted a unit 
test to us, as a pull request, as per:
I also wrote a page on how to submit unit tests and bug fixes: 
http://docs.jboss.org/drools/release/5.4.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html;

Mark
On 5 May 2014, at 00:34, wtang wt...@kana.com wrote:

 if you please could click on the link on the original post, you will see it
 has Mark Proctor name on it and you were pushing for a fix in future release
 of 5.5.
 
 Please let me know if this bug have been fixed in 6.0.
 
 thx, Wing
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419p4029421.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] Using dynamic package names with Drools 6.0 Spring integration.

2014-05-04 Thread Mark Proctor
I expect this is functionality that would have to be added to our spring 
implementation. An ideal task for someone wanting to contribute to the project:
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark

On 2 May 2014, at 17:17, Sunny Singh mailtosunn...@gmail.com wrote:

 Hello,
 
 I am trying to integrate Drools 6.0 with my application using Drools-Spring 
 integration features.
 
 Issues faced:
 
 I need to define the knowledge bases in a spring context XML and make the 
 package names to be dynamically passed into the knowledge bases using Spring 
 Expression Language when the Spring container is created at the start-up. 
 But, the package names are not being injected into the knowledge base when it 
 is created by Drools framework.
 
 If I define the package names and hard-code them into the packages property 
 of the kbase tag, it works.
 
 Could you please let me know if there is a way to make the package names 
 being passed dynamically passed into the packages property of the kbase 
 tag. This is because my client application would supply the packages names 
 when the knowledge bases are setup and I am trying not to hard-code these.
 
 XML Configuration:
 
 bean id=packageRepository class=test.PackageRepository
 property name=packages value=packageA,packageB/
 /bean
 
 kie:kmodule id=kmodule
   kie:kbase name=testKnowledgeBase 
 packages=#{packageRepository.packages}/
 /kie:kmodule
 
 Thanks!
 
 ___
 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] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple

2014-05-01 Thread Mark Proctor
You’d also need to show that it’s still an issue in 5.6, or 6.0.

Mark
On 1 May 2014, at 22:12, Davide Sottara dso...@gmail.com wrote:

 This is unlikely a problem of the guided editor. Tuples are created when you 
 run the rules in a session.
 We'd need to know which rules you're running and how you are 
 inserting/retracting facts.
 Best
 Davide
 
 On 05/01/2014 01:57 PM, Jens Alejos at OAK CORP x4287 wrote:
 Hello,
  
 Our Guvnor 5.3.0 is generating an OOM and crashing the server.
  
 At the time of the crash we could see lots objects holding a lot of stuff in 
 memory, most notably 23,878,166 org.drools.reteoo.JoinNodeLeftTuple, each of 
 which takes 72 bytes. For 1.7 GB of heap.
 I believe the real issue is something is going wrong in guvnor that it is 
 creating way to many of these org.drools.reteoo.JoinNodeLeftTuple objects.
 Do you guys have had this issue? Is this because of a Guvnor guided editor 
 bug?
  
 Thanks
 
 
 NOTICE: This message, including any attachments, is intended for the use of 
 the party to which it is addressed and may contain information that is 
 privileged, confidential and exempt from disclosure. If you are not the 
 intended recipient, any dissemination, distribution or copying of this 
 communication is strictly prohibited. If you have received this 
 communication in error, please contact the sender immediately by reply 
 e-mail, and delete the original and any copies of this message. It is the 
 sole responsibility of the recipient to ensure that this message and any 
 attachments are virus free. 
 
 ___
 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

Re: [rules-users] KieScanner with remote repository?

2014-04-14 Thread Mark Proctor
You need to update your settings.xml to point to your remote repository. The 
docs provide information on the settings.xml configuration.

Mark

On 15 Apr 2014, at 00:50, vvicky72 vvick...@hotmail.com wrote:

 I am able to get KieScanner (6.1 beta) to work on my local maven repository
 using LATEST. But everytime I update the rules on workbench, I have to
 manually run mvn install in order to update my local repository so that
 KieScanner can pickup the changes. Is that how it is? Or is it possible to
 force a download everytime the scanner runs?
 
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/KieScanner-with-remote-repository-tp4029261.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] Pooling stateful sessions to have threaded executions of a ruleset

2014-04-13 Thread Mark Proctor
as it says in the docs. we’ve designed things to put in foundations for future 
multi-threaded exploitation, but there is nothing there now.

The  example code doesn’t make too much sense to me. As you are saying you are 
using them as a pool, but you are disposing after use.

Mark
On 11 Apr 2014, at 08:48, Mercier Jonathan jmerc...@genoscope.cns.fr wrote:

 Le 09/04/2014 11:20, Maxime Falaize a écrit :
 I confirm that the multithreaded rules evaluation is not currently 
 supported. See 
 https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/RuleBaseConfiguration.java#L683
 
 
 2014-04-07 12:27 GMT+02:00 Maxime Falaize maxime.fala...@gmail.com:
 I'm sorry but I don't understand what you are talking about. In this 
 article, there is nothing about multithreaded rules evaluation. It just says 
 that the Phreak algorithm is designed for thread safety and future multicore 
 processors exploitation. It doesn't mean that it is already multithreaded. 
 Moreover I tested my appliciation with and without multithreaded sessions (I 
 am using Drools 6.0.1.Final) and I noted a faster execution in the 
 multithreaded one.
 
 
 2014-04-04 13:53 GMT+02:00 jmercier jmerc...@genoscope.cns.fr:
 
 Le 04/03/2014 09:55, Maxime Falaize a écrit :
  Hello,
 
  I want to ask you if it is a good practive to pool stateful sessions
  for a specific ruleset to improve the execution performance.
  Actually in my application I execute my rules by calling SOAP
  webservice. For performance purpose, I test multithreaded calls to my
  webservice and I noted that when I pool sessions in the server side,
  it improves the performance a lot.
 
  To pool sessions, I just declare multiple ksession tag in my
  kmodule.xml :
 
  kbase name=KBase packages=com.example.*
  ksession name=KSession1/
   ksession name=KSession2/
  ksession name=KSession3/
  ksession name=KSession4/
  ksession name=KSession5/
   /kbase
 
  In my spring webservice endpoint I just put that code to handle the
  pool :
 
  @Endpoint
  public class ExampleEndpoint implements InitializingBean {
 
  @Autowired
  private ExampleRuleService ruleService;
   private MapInteger, Boolean isRunningMap = new
  HashMapInteger, Boolean();
  private static final int NB_POOL_SESSIONS = 5;
 
  @PayloadRoot(localPart = com.example.ExampleRequest)
   @ResponsePayload
  public ExampleResponse handleRequest(
  @RequestPayload ExampleRequest request) throws
  InterruptedException {
  KieServices ks = KieServices.Factory.get();
  KieContainer kc = ks.getKieClasspathContainer();
   while (true) {
  for (int i = 0; i  NB_POOL_SESSIONS; i++) {
  boolean run = false;
 
  synchronized (isRunningMap) {
  if (!isRunningMap.get(i)) {
   isRunningMap.put(i, true);
  run = true;
  }
  }
 
  if (run) {
  KieSession ksession = kc.newKieSession(KSession
  + (i + 1));
   ExampleResponse response =
  ruleService.run(ksession, request);
  ksession.dispose();
 
  isRunningMap.put(i, false);
  return response;
   }
  }
  Thread.sleep(100);
  }
  }
 
  public void afterPropertiesSet() throws Exception {
  for (int i = 1; i = NB_POOL_SESSIONS; i++) {
  isRunningMap.put((i - 1), false);
   }
  }
 
  }
 
  It works well because in my benchmark I improve 5 times the
  performance (as I have 5 different threads) but I wondered if it is a
  good practice and if it does not hide any issues that I could have in
  the future.
 
  Thanks for your help.
 
  --
  Maxime FALAIZE
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 Hi maxime,
 
 I do not remember if use drools 6 or drools 5. If you using drools 6.
 Phreaks algorithm use multi threading according to use 'from
 accummulate' far i understand here:
 http://planet.jboss.org/post/drools_6_performance_with_the_phreak_algorithm
 
 Instead to put a thread by ksession here rules evaluation are
 multi-threaded.
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 -- 
 Maxime FALAIZE
 
 
 
 -- 
 Maxime FALAIZE
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 Ah yes. Maybe Mark Proktor could tell  some information about this
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 

Re: [rules-users] Integration of Spring MVC 3.2.X and Drools 6.0.0.Final KIE issues ....

2014-04-08 Thread Mark Proctor
Any chance you could write some details here? As I expect this will come up 
again.

Anything you could maybe submit to the documentation?

Mark
On 8 Apr 2014, at 13:51, profversaggi profversa...@gmail.com wrote:

 Just for the sake of posterity - I figured it out and have it working. If
 anyone should want some assistance in getting this to work pls contact me
 directly and I'll help you out.
 
 :-)
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Integration-of-Spring-MVC-3-2-X-and-Drools-6-0-0-Final-KIE-issues-tp4029124p4029157.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] KIE API for Decision Tables Templates

2014-04-07 Thread Mark Proctor
Reading is inferred from the file extension type. Simply add your resources, 
with the correct file extension, and it will be built.

Mark
On 7 Apr 2014, at 10:03, Andrei Ermicioi aermic...@casenetllc.com wrote:

 Hi there!
  
 I was looking on web to find if KIE provide any API for reading the Decision 
 Tables from XLS/CSV and I was not able to find :(
 Can somebody point me where I can find that or just to tell me if such API 
 exist or not.
  
 Thank you.
  
  
  
 --
 Andrei Ermicioi aka erani,
 Software Engineer at CaseNet
  
 Phone: +420 776 424 143
 Skype: aermicioi_casenet
  
 
 
 CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within 
 including any attachments is only for the recipient(s) to which it is 
 intended and may contain confidential and/or privileged material. Any review, 
 retransmission, dissemination or other use of; or taking of any action in 
 reliance upon this information by persons or entities other than the intended 
 recipient is prohibited. If you received this in error, please send the 
 e-mail back by replying to the sender and permanently delete the entire 
 message and its attachments from all computers and network systems involved 
 in its receipt.
 ___
 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] No setter found for property 'kBaseName' in class 'org.kie.spring.factorybeans.KBaseFactoryBean'

2014-04-07 Thread Mark Proctor
I suspect the current code looks for the different xml, depending on the 
container. i.e. spring looks for kmodule-spring.xml. I guess what is needed is 
to fallback to kmodule.xml if that is not present. I’ve cc’d in the author for 
more feedback.

Mark
On 7 Apr 2014, at 22:49, profversaggi profversa...@gmail.com wrote:

 I'm integrating Drools KIE and Spring 3.2.3.RELEASE (MVC Web)- and I'm
 getting the following error that Google just isn't finding any references
 for:
 
 ERROR:
 *No setter found for property 'kBaseName' in class
 'org.kie.spring.factorybeans.KBaseFactoryBean' *
 [config set: maven-spring-drools/web-context *application-config.xml* 
 /maven-spring-drools/src/main/resources/spring 
 
 The Project is a pure Maven project w/out any outside natures imposed upon
 it (aka. Drools/Spring).
 
 It's complaining that it can't find the setters for the kBaseName', which is
 set here: 
 
 kie:kbase name=rules packages=rules
 
 I'm using a kmodule.xml found in the META-INF dir under the
 src/main/resources dir. 
 
 Can anyone help me discover the disconnect? 
 
 Moreover - do I have to do it this way? The project executes the SPring MVC
 Web App just fine and the Drools KIE test case runs perfectly in the same
 Maven project. Can't I just integrate them programmatically instead?
 
 Many thanks in advance ... :-)
 
 The offending file: *application.xml*
 
 ?xml version=1.0 encoding=UTF-8?
 
 beans xmlns=http://www.springframework.org/schema/beans; 
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
   xmlns:kie=http://drools.org/schema/kie-spring;
   xmlns:context=http://www.springframework.org/schema/context;
   xsi:schemaLocation=http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/context
 http://www.springframework.org/schema/context/spring-context.xsd
 http://drools.org/schema/kie-spring
 http://drools.org/schema/kie-spring.xsd;
 
 context:component-scan base-package=com.versaggi.springweb/  
 
   kie:kmodule id=ksession-rules
  kie:kbase name=rules packages=rules
  /kie:kbase
   /kie:kmodule
   
   bean id=kiePostProcessor
 class=org.kie.spring.KModuleBeanFactoryPostProcessor /
 
 /beans
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/No-setter-found-for-property-kBaseName-in-class-org-kie-spring-factorybeans-KBaseFactoryBean-tp4029143.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] Memory leak due CompositeClassLoader

2014-04-06 Thread Mark Proctor
Se the currentContext ClassLoader to null, when initialising the knowledge 
base. Then reset it after you are done.

Mark
On 2 Apr 2014, at 08:04, Romain Thouvenin romain.thouve...@amadeus.com wrote:

 Before asking for an upgrade to this third party, I did a test. 
 I managed to assemble a build of the component using Drools 5.6.0.Final, and 
 tried to use-and-redeploy my webapp. 
 
 I did not face any problem due to the upgrade, but it seems the leak is still 
 there. 
 Out of the two instances of CompositeClassLoader that I could see with 5.2.1, 
 one has gone so it is going in the good direction. 
 But there is still one that prevents garbage collection. 
 
 The CompositeClassLoader is given the webapp class loader instance when it is 
 instantiated by RuleBaseConfiguration: 
 
ClassLoaderUtil.getClassLoader(ClassLoader[], Class?, boolean) line: 43  

at RuleBaseConfiguration.setClassLoader(ClassLoader...) line: 945 
at RuleBaseConfiguration.init(Properties, ClassLoader...) line: 421
  
at RuleBaseConfiguration.init() line: 267 
at RuleBaseConfiguration.clinit() line: 175 
 
 
 Any work-around available in 5.6? 
 
 Thanks, 
 Romain 
 
 
 
 
 
 From:Mark Proctor mproc...@codehaus.org 
 To:Rules Users List rules-users@lists.jboss.org, 
 Date:01/04/2014 19:38 
 Subject:Re: [rules-users] Memory leak due CompositeClassLoader 
 Sent by:rules-users-boun...@lists.jboss.org 
 
 
 
 There were a lot of fixes around this and other areas. Please upgrade to 5.6, 
 then come back if you have problems. 
 
 Mark 
 On 1 Apr 2014, at 14:24, Romain Thouvenin romain.thouve...@amadeus.com 
 wrote: 
 
 Hello, 
 
 I am working on a Web application that uses a third-party component that uses 
 Drools 5.2.1 (I know this is old, but this is not my choice). 
 While investigating memory leaks in my application, I found out that after 
 redeploying the webapp in the application server (Weblogic), the leaking 
 class loader is referenced by: 
 
   org.drools.util.CompositeClassLoader.classLoaders 
 
 This is because when that class is instantiated by 
 org.drools.util.ClassLoaderUtil, the initial list of class loaders includes 
 the context class loader of the current thread, which is the class loader of 
 my webapp. But the class loader of CompositeClassLoader is not the same as my 
 webapp, so when I redeploy my webapp CompositeClassLoader continues to exist 
 and keep that reference to the webapp class loader, which is therefore never 
 garbage-collected. 
 
 Browsing a bit through the code, I see no reference to 
 CompositeClassLoader.removeClassLoader that could remove the faulty 
 reference. 
 
 So my questions are: 
 1) Is my investigation correct? 
 
 2) I found this thread on the list: 
 http://drools.46999.n3.nabble.com/permgen-leak-td4027038i20.html 
 Is this the same issue as mine, meaning that it is fixed in 5.6.0 and 6.0? 
 If yes, pushing this third-party component to upgrade is really the only 
 solution I have? 
 
 I am not at all a knowledgeable user of drools, I just happen to be user of 
 that third-party component, that is why I wanted confirmation of my findings. 
 
 Thanks for your help! 
 Romain 
 
 ___
 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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Drools 6 and OSGi

2014-04-02 Thread Mark Proctor

  I did not get the idea behind it. Why don't you use new to create new 
 instances. Then the bundles have to define their dependencies very carefully 
 to become compiled.
At the point where you see Class.forName it means the implementation is not on 
the class path of that module, but the interface is. So the provider pattern 
mechanism uses reflection to load the instance to return to you under the 
targeted interface. This is how all our factories work, we have all the api in 
-api but none of the implementation. It binds the implementation at runtime, 
via reflection. However, in the case of our -api factories, we already address 
this in OSGi by using Activator injection.

 My question is about the architecture changes to meet OSGi requirements. 
 There are a lot of Class#forName calls to create new instances. In OSGi it is 
 not that easy then in java SE. Each bundle has its own class loader. And 
 classes are only visible to bundles, if their package was imported.
We have not done a full audit of Class.forName. I should add that loadClass 
itself has problems too, related to serialisation - which is why we use 
forName. If you want to do an audit and submit via a pull request alternatives, 
then  please do. Although remember not all those forNames (in the case of our 
factories) will b used by OSGi, so make sure you find ones that you believe are 
actually a problem.

We also did work around making sure all our jars have unique package names, to 
avoid split packages. And there was a lot of work around repacking our 
dependencies.

 So my question is, whether that approach is the suggested way to add Drools 
 and JBPM to OSGi containers.
Sorry I don’t understand the question fully. The classloader argument, is if 
you need to specify parent classloader. There are a variety of use cases for 
this, such as if people are doing runtime code generation on custom 
classloaders that they want to make visible to Drools.

My understanding is that drools now works on karaf. Maybe try one of our latest 
builds if there any issues, then come back and let us know.
http://downloads.jboss.org/drools/release/snapshot/master/

Mark

On 2 Apr 2014, at 20:51, Florian Pirchner florian.pirch...@gmail.com wrote:

 Hi Mark,
 
 could not find anybody in cc :D
 
 Good to hear, that there is progress in the OSGi stuff.
 
 My question is about the architecture changes to meet OSGi requirements. 
 There are a lot of Class#forName calls to create new instances. In OSGi it is 
 not that easy then in java SE. Each bundle has its own class loader. And 
 classes are only visible to bundles, if their package was imported.
 
 I could see, that there is a ProjectClassLoader. And that there is a way to 
 provide a common parent classloader. That might be the bundle classloader. So 
 most of the classes can be found by Class#forName. But it requires a bundle, 
 that imports all the dependencies from drools, kie and jbpm. Only in that 
 case, the bundles are visible to the bundles class loader. So my question is, 
 whether that approach is the suggested way to add Drools and JBPM to OSGi 
 containers.
 
 But a drawback is, that there is no real support about required dependencies 
 during development. Except the drools bundles will define their imported 
 packages very carefully. Why do you use Class#forName to load classes? I did 
 not get the idea behind it. Why don't you use new to create new instances. 
 Then the bundles have to define their dependencies very carefully to become 
 compiled.
 
 Thanks a lot for your answers.
 
 Best Florian
 
 
 
 
 
 2014-03-31 18:28 GMT+02:00 Mark Proctor mproc...@codehaus.org:
 There was a lot of OSGi fixes in 6.0.1, aimed at the karat container. However 
 not all modules are migrated, as it’s a work in progress. I don’t know which 
 currently are or are not, I’m cc’ing in the developer behind this to answer.
 
 Mark
 On 31 Mar 2014, at 16:49, Florian Pirchner florian.pirch...@gmail.com wrote:
 
 Hi,
 
 today i started to setup Drools 6 in my OSGi container. But it seems there 
 are some issues that do not allow to run drools 6 (and jbpm) under OSGi 
 properly.
 
 For instance:
 JPAKnowledgeService
 .newStatefulKnowledgeSession(kieBase, null, env);
 will never find org.drools.persistence.jpa.KnowledgeStoreServiceImpl since 
 it is not in the scope of the current ClassLoader.
 
 Tried to tie things up, but then there would be a cyclic dependency between 
 kie-internal and jbpm-persistence-jpa.
 
 I also could see, that a ProjectClassLoader was added. I found a way to put 
 my current BundleClassLoader as its parent into play. This solves a lot of 
 class loading issues.
 
 
 For me it seems, that Drools 6 was not designed to run in an OSGi container. 
 Is there ongoing work to integrate Drools and JBPM Version 6.x into OSGi 
 environments properly?
 
  -- 
 Thanks for your answer
 Florian Pirchner
 
 ___
 rules-users mailing list
 rules

Re: [rules-users] part time intern @ Red Hat

2014-04-01 Thread Mark Proctor
Just confirming your email, I’m still waiting for all responses, before 
contacting people further.

Mark
On 21 Mar 2014, at 08:52, Bharadwaj N bharadwaj2...@gmail.com wrote:

 I am interested. please let me know the full details.
 
 
 
 
 
 Thanks,
 
 Bharadwaj nakka.
 Techlead at techmahindra.
 
 
 On Thu, Mar 20, 2014 at 9:28 PM, Mark Proctor mproc...@codehaus.org wrote:
 I have a small budget for a part time intern for one year, 12K USD. The work 
 can be 100% remote, from almost any country. This will mostly be UI work, 
 improving our workbench.
 
 If this interests you, email me off list.
 
 Mark
 ___
 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

Re: [rules-users] part time intern @ Red Hat

2014-04-01 Thread Mark Proctor
No, there will be one potential position. I will contact individuals who showed 
interest shortly.

Mark
On 1 Apr 2014, at 13:13, Bharadwaj N bharadwaj2...@gmail.com wrote:

 So you are preparing a team?
 
 
 On Tue, Apr 1, 2014 at 5:26 PM, Mark Proctor mproc...@codehaus.org wrote:
 Just confirming your email, I’m still waiting for all responses, before 
 contacting people further. 
 Mark
 
 On 21 Mar 2014, at 08:52, Bharadwaj N bharadwaj2...@gmail.com wrote:
 
 I am interested. please let me know the full details.
 
 
 
 
 
 Thanks,
 
 Bharadwaj nakka.
 Techlead at techmahindra.
 
 
 On Thu, Mar 20, 2014 at 9:28 PM, Mark Proctor mproc...@codehaus.org wrote:
 I have a small budget for a part time intern for one year, 12K USD. The work 
 can be 100% remote, from almost any country. This will mostly be UI work, 
 improving our workbench.
 
 If this interests you, email me off list.
 
 Mark
 ___
 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 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] Memory leak due CompositeClassLoader

2014-04-01 Thread Mark Proctor
There were a lot of fixes around this and other areas. Please upgrade to 5.6, 
then come back if you have problems.

Mark
On 1 Apr 2014, at 14:24, Romain Thouvenin romain.thouve...@amadeus.com wrote:

 Hello, 
 
 I am working on a Web application that uses a third-party component that uses 
 Drools 5.2.1 (I know this is old, but this is not my choice). 
 While investigating memory leaks in my application, I found out that after 
 redeploying the webapp in the application server (Weblogic), the leaking 
 class loader is referenced by: 
 
org.drools.util.CompositeClassLoader.classLoaders 
 
 This is because when that class is instantiated by 
 org.drools.util.ClassLoaderUtil, the initial list of class loaders includes 
 the context class loader of the current thread, which is the class loader of 
 my webapp. But the class loader of CompositeClassLoader is not the same as my 
 webapp, so when I redeploy my webapp CompositeClassLoader continues to exist 
 and keep that reference to the webapp class loader, which is therefore never 
 garbage-collected. 
 
 Browsing a bit through the code, I see no reference to 
 CompositeClassLoader.removeClassLoader that could remove the faulty 
 reference. 
 
 So my questions are: 
 1) Is my investigation correct? 
 
 2) I found this thread on the list: 
 http://drools.46999.n3.nabble.com/permgen-leak-td4027038i20.html 
 Is this the same issue as mine, meaning that it is fixed in 5.6.0 and 6.0? 
 If yes, pushing this third-party component to upgrade is really the only 
 solution I have? 
 
 I am not at all a knowledgeable user of drools, I just happen to be user of 
 that third-party component, that is why I wanted confirmation of my findings. 
 
 Thanks for your help! 
 Romain 
 
 ___
 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] Drools Fusion inconsistencies at increasing event throughputs

2014-04-01 Thread Mark Proctor
We have this fixed now. Hopefully this will be in the nightly build, and 
available for testing tomorrow. I’ll ping with a link to the nightly builds 
once it’s available.

Mark

On 31 Mar 2014, at 14:34, Mark Proctor mproc...@codehaus.org wrote:

 We are still working on this, we’ve found a number of related points, as we 
 are doing a full audit of the code. We’ll post as soon as we have the fixes 
 available in a nightly build, so that people can test.
 
 Mark
 On 29 Mar 2014, at 12:50, Mark Proctor mproc...@codehaus.org wrote:
 
 Mario has found an issue at a sync point, which can happen if it’s trying to 
 schedule a timer at the same time that it’s firing that same timer from an 
 update. We are trying to resolve that now. See lines 121 and 394, which 
 later impacts lines 289 and 330.
 https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/phreak/PhreakTimerNode.java
 
 Once we have this solved, we should have expected behaviour. Hopefully you 
 can try this in the next 6.1 beta, in 2 weeks time.
 
 Mark
 On 29 Mar 2014, at 09:00, Vieri vieri.emili...@gmail.com wrote:
 
 Mark,
 thanks for your update. 
 I don't know if this can help, but I added a simple AgendaEventListener to 
 the test case and it seems that at some point drools stops matching the 
 Create event rule, while facts (well, events) are still inserted and 
 other rules are triggered properly.
 Vieri
 
 
 
 On 28 March 2014 16:57, Mark Proctor mproc...@codehaus.org wrote:
 we’ve being auditing the code here, and we’ve found an issue on what 
 happens when a rule is re-matched and the timer updated. Mario is 
 addressing this now, and also re-viewing dropping of output. He’ll post 
 with an update soon.
 
 Mark
 On 25 Mar 2014, at 16:09, Vieri vieri.emili...@gmail.com wrote:
 
 First of all, thanks for the support.
 Mario, I confirm that the case you provided works fine also at my side. 
 Still, have you tried my first example (using the cron directly to the 
 counting rule)? Can you confirm it is not working, since this was my first 
 concern?
 As I said in the previous post, using the CronTrigger pattern greatly 
 improves stability (I managed to run it at 500 eps), but it is not 
 resolutive.
 Adding a few rules, it's enough to go back to instability. 
 
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 
 -- 
 Vieri Emiliani
 ___
 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

  1   2   3   4   5   6   7   8   9   10   >