[rules-users] Drools Flow Persistence throws stack overflow error
Hi, I am evaluating the drools expert with drool flow using TimeManagement System. I am inserting the process instance into working memory of drools [session.insert(workflowProcessInstance)] So that the rules can use the process instance as part of Rule constraints to enable the rules to make more sophisticated decisions based on the state of the current process instance. Rule snippet rule Submit Time ruleflow-group Submit Time dialect java when processInstance:WorkflowProcessInstance() tkRequest:TKRequest () tkRequestDAO:TKRequestDAO() then // check the current processInstance state as Active then do that //Do custom operation, status change, persistence update end The approach is works fine with using KnowledgeBuilder.newStatefulKnowledgeSession() that is no persistence. But once i have enabled the Persistence using JPAKnowledgeService.newStatefulKnowledgeSession(know, null, getEnvironment()) it throws stack over flow error due the workflowProcessInstance is not serialized while trying to persist the newly added workflowProcessInstance to working memory. Once i have commented the session.insert(workflowProcessInstance) the stack overflow error is gone but none of my rules are not executed. Can some one provide guidance on how to pass this workflowProcessInstance to rule constriant with persistence JPAKnowledgeSession enabled. Thanks Prem ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools Flow Persistence Doubt
Hi, I have doubt regarding persistence in Drools. I read the documentation of persistence in Drools Flow and got to know that it uses hibernate with H2 database as default. My doubt is if I want to use Mysql database, then I want to know which are the tables that I need to create in the database or Is their any code written which automatically creates the tables in the schema in Mysql database. Also is their any document present for configuring Mysql database. Please help me to get through the situation. Thanks Regards Pardeep Ruhil _ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Functions invocation from condition in drools expert
Hi, I am trying to find an example where the 'when' part of the rule uses functions, I intend to include some checks on complex data structure in my considiotn. Can anyone point me to any drools/other example to illustrate how functions can be used in condition? All examples that I found have functions used in the actions part. Thanks in advance, Regards, Sameer ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Uses of timer node
anyone? -- Renato Herebia ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow Persistence Doubt
if you take a look at this post: http://blog.athico.com/2009/09/drools-flow-variable-persistence.html you will see that there is a demo project with the configuration to work with MySQL. Greetings. 2009/10/7 pardeep.ru...@lntinfotech.com Hi, I have doubt regarding persistence in Drools. I read the documentation of persistence in Drools Flow and got to know that it uses hibernate with H2 database as default. My doubt is if I want to use Mysql database, then I want to know which are the tables that I need to create in the database or Is their any code written which automatically creates the tables in the schema in Mysql database. Also is their any document present for configuring Mysql database. Please help me to get through the situation. Thanks Regards Pardeep Ruhil __ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Uses of timer node
Are you running a thread that fires rules [ksession.fireUntilHalt();] as described in the link below? http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-flow/html/ch03.html#sec.timers Renato Herebia wrote: Hi! I'm testing the timer node and I did a simple flow with start node, action node (System.out.println(action node 1);), a timer node, other action node (System.out.println(action node 2);) and the end node. When the process start, the first action node is triggered, after that, the timer node is activated and don't pass for the next action node after the delay time programmed. Has any configuration to do when working with timer nodes (handlers, etc.)? Someone has a simple example like this I'm testing? Thanks! -- Renato Herebia ___ 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] Infinite loop while marshalling
Hello, I have 2 simple rules: rule one when A() not(B()) then System.out.println(a); end rule two when A() then System.out.println(b); end A and B are plain java objects with no properties. When I create stateful knowledge session (default configuration) and do the following: session1.insert(new A()); session1.fireAllRules(); MarshallerFactory.newMarshaller(knowledgeBase).marshall(new ByteArrayOutputStream(), session1); I get an infite loop (resulting byte array eats up all heap space, no matter how much I set). Am I doing sth wrong or is it a bug? br, maciek prochniak ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Error trying to build Drools 5.0 from source
Anyone know what this means? I downloaded drools-5.0-src.zip from http://www.jboss.org/drools/downloads.html. I extracted it, cded into the top directory and after perusing the README typed $ mvn -Declipse -Ddocumentation clean install The output: [INFO] Scanning for projects... [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.drools:docbook-xsl-drools'}' and 'Vertex{label='org.drools:docbook-style-drools'}' introduces to cycle in the graph org.drools:docbook-style-drools -- org.drools:docbook-xsl-drools -- org.drools:docbook-style-drools [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 4 seconds [INFO] Finished at: Wed Oct 07 10:33:21 MDT 2009 [INFO] Final Memory: 10M/80M [INFO] ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Error trying to build Drools 5.0 from source
The error goes away if I leave out -Ddocumentation. From: Mulcahy, Lawrence Sent: Wednesday, October 07, 2009 10:38 AM To: 'rules-users@lists.jboss.org' Subject: Error trying to build Drools 5.0 from source Anyone know what this means? I downloaded drools-5.0-src.zip from http://www.jboss.org/drools/downloads.html. I extracted it, cded into the top directory and after perusing the README typed $ mvn -Declipse -Ddocumentation clean install The output: [INFO] Scanning for projects... [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.drools:docbook-xsl-drools'}' and 'Vertex{label='org.drools:docbook-style-drools'}' introduces to cycle in the graph org.drools:docbook-style-drools -- org.drools:docbook-xsl-drools -- org.drools:docbook-style-drools [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 4 seconds [INFO] Finished at: Wed Oct 07 10:33:21 MDT 2009 [INFO] Final Memory: 10M/80M [INFO] ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] [droolsflow] ForEach usage - Version 5.1.0
Hi All To use a ForEach element i need to access a collection inside my FactObject. (FactObject.list) I tried to call FactObject.list inside a CollectionExpressions but this fail. (Just ok with list defined as a process variable) *So i do something thats a consider a workaround:* 1- I Create a 'Action Node before a ForEach Node 2-In the Action Node, i get the FactObject and populate the process variable that represents FactObject.list : *FactObject factObject = (FactObject)drools.getKnowledgeRuntime().getObjects(new ClassObjectFilter(FactObject.class)).iterator().next(); context.setVariable(list, factObject.getDefeitos());* 3- And on the Foreach node i just passed the list in the CollectionExpressions This is the correct way to do this? Has a better way to get FactObject.list to use on For Each Node? On Eclipse, the CollectionExpression of forEach don't have a window (Like Action Editor) to put a MVEL/Java expressions. I think this is a interesting resource. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Error trying to build Drools 5.0 from source
I worked around that by commenting out the test testDoLoopScheduledActivation in drools-core/src/test/java/org/drools/reteoo/SchedulerTest.java. I tried again. It ran for quite a while but failed with this error: [INFO] [ERROR] BUILD ERROR [INFO] [INFO] An Ant BuildException has occured: Directory does not exist:/home/lmulcahy/java/drools/src/drools-eclipse/org.drools.eclipse/lib Workaround: mkdir drools-eclipse/org.drools.eclipse/lib Also somewhere in there I got an out of memory: permgen exception. Fixed with set MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1024m With that, the build was able to run to completion. [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 33 minutes 51 seconds [INFO] Finished at: Wed Oct 07 16:03:04 MDT 2009 [INFO] Final Memory: 109M/464M From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mulcahy, Lawrence Sent: Wednesday, October 07, 2009 1:46 PM To: 'Rules Users List' Subject: Re: [rules-users] Error trying to build Drools 5.0 from source Now the build runs for a while but gets some errors in the tests for drools-core. (See attachments) Larry Mulcahy Good system software should be free, like air From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mulcahy, Lawrence Sent: Wednesday, October 07, 2009 10:39 AM To: 'rules-users@lists.jboss.org' Subject: Re: [rules-users] Error trying to build Drools 5.0 from source The error goes away if I leave out -Ddocumentation. From: Mulcahy, Lawrence Sent: Wednesday, October 07, 2009 10:38 AM To: 'rules-users@lists.jboss.org' Subject: Error trying to build Drools 5.0 from source Anyone know what this means? I downloaded drools-5.0-src.zip from http://www.jboss.org/drools/downloads.html. I extracted it, cded into the top directory and after perusing the README typed $ mvn -Declipse -Ddocumentation clean install The output: [INFO] Scanning for projects... [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.drools:docbook-xsl-drools'}' and 'Vertex{label='org.drools:docbook-style-drools'}' introduces to cycle in the graph org.drools:docbook-style-drools -- org.drools:docbook-xsl-drools -- org.drools:docbook-style-drools [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 4 seconds [INFO] Finished at: Wed Oct 07 10:33:21 MDT 2009 [INFO] Final Memory: 10M/80M [INFO] ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Help with Drools Flow
Hi, I have recently started with Drools flows . I am having some trouble using the ruleFlowGroup node. The way I understood the user guide is that when the flow reaches a ruleFlowGroup the engine will start firing rules associated to the specific rule flow group . But when I try what I see is that the call to the startProcess returns when it reaches a ruleFlowGroup node. The audit logs show that the RuleFlowGroup is activated. After the return when I explicitly call a fireAllRules the rule group seems to get executed and the flow moves on to the subsequent nodes. What is the expected behavior? Will the rules start executing automatically when a ruleFlowGroup node is reached or do you have to call fire all rules explicitly? I am using drools 5 thanks in advance Mahesh ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users