[rules-users] Wait state constriant
Can anyone tell me what's wrong with this wait state constraint? System.currentTimeMillis() = (startWait + 3000) The exception I'm getting ist: [5,33]: [ERR 102] Line 5:33 mismatched input '=' expecting 'then' in rule RuleFlow-Milestone-drools.test.timer-6 but I don't think that is really getting to the heart of the problem... -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Wait-state-constriant-tp986768p986768.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Flow
what are the condition from both rules? Can you share with us your processes definitions? did you check the process ids? Greetings 2010/7/22 santosh mukherjee sam.sensat...@gmail.com Hi, My rule file is like this: rule1: when something then start process(p1); rule2: when something then startprocess(p2); But in both the cases only p1 gets fired which was the rule flow that I last added to the builder. Can any body suggest me how to overcome this problem.?? Thanks Santosh Mukherjee ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - CTO @ http://www.plugtree.com - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ 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] Drools Integration
Hi, I am trying to integrate Drools with Apama. I have Apama installed and want to pass the events mathched through Apama into Drools. Need help as to how to proceed doing this. Basically I want that whenever a certain event matches and is caught by Apama. I want to send it to the drl files which will check the criteria and start relevant process. Thanks Santosh Mukherjee ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Problem with DRL language/ XLS decision tables.
Hello, I have a problem with defining rules. I insert many, many objects (facts) to ksession object (StatefulKnowledgeSession). I want to fire rules for *all*of them(facts), but I want to fire only one rule from all rules for each one fact(not always this same rule is fired, because I use salience). activation-group is not appropriate, because it works only with one object (fact) - rest is not processed by engine. Second question is: how can I stop processing rules, bot only for one fact, not for all of them. Thanks, tom. P.S. forgive me my English... :) P.S.2 Firstly I want to do this in DRL, then, I'll try with XLS, and write post if I would find problems... ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problem with DRL language/ XLS decision tables.
You could always have a pool of StatefulSessions that you reuse. (This would allow you to run concurrently in multiple threads as well.) As long as these billions of facts don't need to interact that'll work fine. However I'd suggest that you try the rule latch method that Thomas suggested. That way you could tune the number of data objects you insert into a single pooled session, instead of inserting one at a time. And I'm guessing that, no matter how efficient you get, throwing 2 billion in memory at once won't scale. :) --- On Thu, 7/22/10, tom ska tiberium.li...@gmail.com wrote: From: tom ska tiberium.li...@gmail.com Subject: Re: [rules-users] Problem with DRL language/ XLS decision tables. To: Rules Users List rules-users@lists.jboss.org Date: Thursday, July 22, 2010, 9:17 AM Hi, thanks for so quick answer. I think, that using StatelessSession could be a solution, but as I understood, I have to insert only one fact to the facts base. But, I have about 2 billions of facts that I want to process with Drools, and execution time, is for me really important. A think, that inserting one fact at time means for me additional time to initialise engine (when adding a new fact, and removing old one). Am I right? Thanks :) 2010/7/22 Pavel Tavoda pavel.tav...@gmail.com Don't know details of your problem but it's typical situation where you can use StatelessSession, insert one fact at time and use activation-group. Pavel 2010/7/22 tom ska tiberium.li...@gmail.com: Hello, I have a problem with defining rules. I insert many, many objects (facts) to ksession object (StatefulKnowledgeSession). I want to fire rules for all of them(facts), but I want to fire only one rule from all rules for each one fact(not always this same rule is fired, because I use salience). activation-group is not appropriate, because it works only with one object (fact) - rest is not processed by engine. Second question is: how can I stop processing rules, bot only for one fact, not for all of them. Thanks, tom. P.S. forgive me my English... :) P.S.2 Firstly I want to do this in DRL, then, I'll try with XLS, and write post if I would find problems... ___ 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 -Inline Attachment Follows- ___ 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] Wait state constriant
Thanks for the reply. Just for the records: Chapter 3.5 of the Drools Flow User Guide says that there are two kinds of constraints: (a) code constraints and (b) rule constraints, where code constraints are boolean expressions. So wait states obviously don't support code constraints... correct? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/problem-with-wait-state-constriant-tp986768p987561.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problem with DRL language/ XLS decision tables.
Thanks for reacting ;) I did some simulations, and after them, I want of course to parallelize this process of processing 2 billions facts. But as far as I wrote, Drools engine, can't do this. And I have to create threads manually in application (with pool of sessions). Am I right? Tuning number of data sounds fine to me, so I will try method with rule latch too (but I have to read about this, because, I don't know what is it, and I don't want to waste your time ;) But still I don't know how to use StatefulSessions to do this... Summarising, there are 3 methods to do, what I want to do (apart of a scalability problem - yet ;) 1.)with StatelessSession for one fact at time and activation group 2.)rule latch - I have to read more about it 3.)with a pool of StatefulSessions that I reuse - but I still don't know how to do it using StatefulSessions Really thanks for help ;) P.S. I use Drools 5 :) ___ 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] Problem with DRL language/ XLS decision tables.
Considering that googling on rule latch will return this thread on gmane as the 2nd link, you might find research difficult. :) I think Tom coined that term in this context, but it fits. The basic idea is that you use an object as an indicator of what processing has happened, and whether or not rules should fire. class RuleLatch { public final String name; public final DataObject dataObject; public RuleLatch(String name, DataObject dataObject) { this.name = name; this.dataObject = dataObject; } } when data: DataObject(...selection conditions for data...) level1Latch: RuleLatch(name == level1Foo, dataObejct == data) level2Latch: RuleLatch(name == level2Bar, dataObject == data) then ...if this rule wants to cancel all subsequent level1Foo it retracts level1Latch... ...if this rule wants to cancel all subsequent level2Bar it retractslevel2Latch... end An alternative, more efficient, but not as OO happy way, is to put the control information into the DataObject itself. Drools does a lot of optimization on the == tests with hashing, but if speed is a priority it might not be enough. So... class DataObject { public boolean level1Foo = true; public boolean level2Bar = true; } when data: DataObject(level1Foo == true, level2Bar == true, ...selection conditions for data... ) then ...if this rule wants to cancel all subsequent level1Foo it updates level1Foo = false... ...if this rule wants to cancel all subsequent level2Bar it updates level2Bar = false... end --- On Thu, 7/22/10, tom ska tiberium.li...@gmail.com wrote: From: tom ska tiberium.li...@gmail.com Subject: Re: [rules-users] Problem with DRL language/ XLS decision tables. To: Rules Users List rules-users@lists.jboss.org Date: Thursday, July 22, 2010, 11:50 AM Thanks for reacting ;) I did some simulations, and after them, I want of course to parallelize this process of processing 2 billions facts. But as far as I wrote, Drools engine, can't do this. And I have to create threads manually in application (with pool of sessions). Am I right? Tuning number of data sounds fine to me, so I will try method with rule latch too (but I have to read about this, because, I don't know what is it, and I don't want to waste your time ;) But still I don't know how to use StatefulSessions to do this... Summarising, there are 3 methods to do, what I want to do (apart of a scalability problem - yet ;) 1.)with StatelessSession for one fact at time and activation group 2.)rule latch - I have to read more about it 3.)with a pool of StatefulSessions that I reuse - but I still don't know how to do it using StatefulSessions Really thanks for help ;) P.S. I use Drools 5 :) ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -Inline Attachment Follows- ___ 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] java.lang.NoSuchMethodError on every Action node
Reto, This seems to be a conflict with similar actions in different processes overriding each other. I'll take a look at this and try to fix it asap, and keep you updated. Kris Quoting retoy reto.lampre...@allianz-suisse.ch: Hi Kris Here is a small project which demonstrates a similar problem with two actions. Unfortunately i could not reproduce the noSuchMethodError in this setup yet, but i still think the behavior is not as it should be. http://drools-java-rules-engine.46999.n3.nabble.com/file/n986527/demo.action.problem.zip demo.action.problem.zip If both ruleflow packages have the same name and the two ruleflows are added in this order: addRuleFlow(kbuilder, demo.rf); addRuleFlow(kbuilder, subflow.rf); the output is: execute subflow... execute subflow... If the two flows are added in reverse order, the output is: demo ruleflow started... demo ruleflow started... If one of the package names is changed, the output is what I would expect: demo ruleflow started... execute subflow... What do you think about that? Reto -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/java-lang-NoSuchMethodError-on-every-Action-node-tp60886p986527.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Deserialization Error from Designer when Process Opened in Gunvor
Hi, Regarding the designer integration, it is probably important to know that Oryx is still using the BPMN2 beta 1 format, while Drools Flow has already updated to a more recent BPMN2 format. As a result, you probably can't open the processes that are generated by the Drools Flow graphical editor in Eclipse. We do still support the editing and execution of processes using the BPMN2 beta 1 format. So it might probably be best to just: * use the Oryx editor to create a new version of your process and use that in your example * manually change the namespace of your process to the beta 1 namespace and then use the editor (if you use the beta1 namespace, the editor will also save in that format) * manually construct / update to a BPMN2 beta1 file (or look for beta 1 examples in previous milestone releases of Drools Flow). Note that the Oryx integration is still experimental and proof of concept, and we hope to improve this significant once Oryx moves to the BPMN2 final format. Kris Quoting Han Ming hanmin...@gmail.com: Hi, I'm using guvnor build 4173 from the trunk. In addition, I have install the designer web application downloaded from http://anonsvn.jboss.org/repos/labs/labs/jbossrules/contrib/designer/ I have uploaded the Evaluation.bpmn from the install/sample directory However, when I tried to open the Evaluation process in Gunvor, a deserialization error is thrown. I have captured the screenshot at http://img231.imageshack.us/g/oryxerror2.jpg/ and, attached the stacktrace at the end of the mail. Also, there is a small glitch in that the oryx frame does not occupied the whole page on FireFox 3.5.30729. In addition, I notice there is a consistent message in the console (not just in this build) when guvnor is first started that it mention that The serialization policy file was not found and later You may experience SerializationExceptions as a result This is the log I have captured in an earlier installation. I still see it in build 4173 but can't locate it in the logs INFO: guvnorService: ERROR: The serialization policy file '/org.drools.guvnor.Guvnor/8C09DDC749E5C9386FC25E9AAE396D31.gwt.rpc' was not found; did you forget to include it in this deployment? Jul 14, 2010 1:54:02 PM org.apache.catalina.core.ApplicationContext log SEVERE: guvnorService: WARNING: Failed to get the SerializationPolicy '8C09DDC749E5C9386FC25E9AAE396D31' for module 'http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/'; a legacy, 1.3.3 compatible, serialization policy will be used. You may experience SerializationExceptions as a result. Jul 14, 2010 2:02:10 PM org.apache.catalina.core.ApplicationContext log Any help is greatly appreciated. Thanks. Han Ming 2010-07-22 13:37:35,109 ERROR [STDERR] javax.xml.bind.UnmarshalException: unexpected element (uri:http://www.omg.org/spec/BPMN/20100524/MODEL;, local:definitions). Expected elements are {http://schema.omg.org/spec/BPMN/2.0}activityResource,{http://bpmndi.org}activityShape,{http://schema.omg.org/spec/BPMN/2.0}adHocSubProcess,{http://schema.omg.org/spec/BPMN/2.0}association,{http://bpmndi.org}associationConnector,{http://schema.omg.org/spec/BPMN/2.0}boundaryEvent,{http://bpmndi.org}bpmnCompartment,{http://schema.omg.org/spec/BPMN/2.0}businessRuleTask,{http://schema.omg.org/spec/BPMN/2.0}callActivity,{http://schema.omg.org/spec/BPMN/2.0}callConversation,{http://bpmndi.org}callConversationShape,{http://bpmndi.org}calledSubprocessShape,{http://schema.omg.org/spec/BPMN/2.0}cancelEventDefinition,{http://schema.omg.org/spec/BPMN/2.0}choreography,{http://bpmndi.org}choreographyActivityShape,{http://bpmndi.org}choreographyDiagram,{http://schema.omg.org/spec/BPMN/2.0}choreographySubProcess,{http://schema.omg.org/spec/BPMN/2.0}choreographyTask,{http://schema.omg.org/spec/BPMN/2.0}collaboration,{http://bpmndi.org}collaborationDiagr! am,{http://schema.omg.org/spec/BPMN/2.0}communication,{http://bpmndi.org}communicationShape,{http://schema.omg.org/spec/BPMN/2.0}compensateEventDefinition,{http://schema.omg.org/spec/BPMN/2.0}complexBehaviorDefinition,{http://schema.omg.org/spec/BPMN/2.0}complexGateway,{http://schema.omg.org/spec/BPMN/2.0}conditionalEventDefinition,{http://schema.omg.org/spec/BPMN/2.0}conversation,{http://bpmndi.org}conversationDiagram,{http://schema.omg.org/spec/BPMN/2.0}conversationLink,{http://bpmndi.org}conversationLinkConnector,{http://bpmndi.org}dataAssociationConnector,{http://schema.omg.org/spec/BPMN/2.0}dataInput,{http://schema.omg.org/spec/BPMN/2.0}dataInputAssociation,{http://bpmndi.org}dataInputShape,{http://schema.omg.org/spec/BPMN/2.0}dataObject,{http://bpmndi.org}dataObjectShape,{http://schema.omg.org/spec/BPMN/2.0}dataOutput,{http://schema.omg.org/spec/BPMN/2.0}dataOutputAssociation,{http://bpmndi.org}dataOutputShape,{http://schema.omg! .org/spec/BPMN/2.0}dataStore,{http://schema.omg.org/spec/BPM! N/2.0}da
Re: [rules-users] Wait state constriant
Reto, State nodes only support rule constraints. The reason is that a constraint in a wait state should be continuously evaluated (while the state is active), and the only way to do that efficiently is to use a rule for that (as that is basically what a rules engine is good at). I know the docs on the state node are outdated, will be updating this in the next few days, as this was updated as one of the new 5.1 features. For some simple examples, you can currently check out the junit tests though: http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessStateTest.java Kris Quoting retoy reto.lampre...@allianz-suisse.ch: Can anyone tell me what's wrong with this wait state constraint? System.currentTimeMillis() = (startWait + 3000) The exception I'm getting ist: [5,33]: [ERR 102] Line 5:33 mismatched input '=' expecting 'then' in rule RuleFlow-Milestone-drools.test.timer-6 but I don't think that is really getting to the heart of the problem... -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Wait-state-constriant-tp986768p986768.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools with spring
Hi thanks for reply Do I need drools server I am mainly using drools flow Regards Sonu Sent from my iPod On 23-Jul-2010, at 9:26 AM, Mark Proctor mproc...@codehaus.org wrote: On 23/07/2010 01:54, sonyt...@gmail.com wrote: Hi all I would like to integrate drools with spring If any body have example project share with me I will use spring 3 with drools 5.1 http://lucazamador.wordpress.com/2010/07/20/drools-server-configuration-updated/ http://blog.athico.com/2010/07/declarative-rest-services-for-drools.html Mark Thanks in advance Sonu Sent from my iPod ___ 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 with spring
On 23/07/2010 02:50, sonyt...@gmail.com wrote: Hi thanks for reply Do I need drools server I am mainly using drools flow drools-server uses drools-spring and drools-camel. drools-spring can be used alone. Drools-server can just be used as an example project to get an idea of how it works, likewise look at the drools-spring unit tests to get more of an idea. Mark Regards Sonu Sent from my iPod On 23-Jul-2010, at 9:26 AM, Mark Proctormproc...@codehaus.org wrote: On 23/07/2010 01:54, sonyt...@gmail.com wrote: Hi all I would like to integrate drools with spring If any body have example project share with me I will use spring 3 with drools 5.1 http://lucazamador.wordpress.com/2010/07/20/drools-server-configuration-updated/ http://blog.athico.com/2010/07/declarative-rest-services-for-drools.html Mark Thanks in advance Sonu Sent from my iPod ___ 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] StackOverflowError when serializing KnowledgeBase
Hello, After adding a few hundred rules, and with the same code, KnowledgeBase serialization has started to generate StackOverflowError. I have increased the VM stack size as a workaround, but I was hoping to implement something more robust. I specifically need to serialize the KnowledgeBase, and not the session. I'm using this code: private void dumpKnowledgeBase(String file, KnowledgeBase kbase) { try { FileOutputStream ostream = new FileOutputStream(file); DroolsObjectOutputStream p = new DroolsObjectOutputStream(ostream); p.writeObject(kbase); p.flush(); ostream.close(); } catch (Exception e) { System.err.println(e); e.printStackTrace(); System.err.println(Could not write knowledge base +file); } } This is due to writeObject recursion? Any ideas? A. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users