Re: [rules-users] Rule Orchestration
Is prodList a global? I'd be tempted to make it a regular fact inserted into Working Memory and have DT1's action update the fact after inserting the product. See http://stackoverflow.com/questions/17848823/drools-using-a-global-variable-in-condition-and-updating-it-in-consequence On 28 April 2014 17:24, swaroop swaroop.o...@gmail.com wrote: Hi , Please find the screen shots attached DT One http://drools.46999.n3.nabble.com/file/n4029375/1.png DT Two http://drools.46999.n3.nabble.com/file/n4029375/2.png Let me know if this works else i will share the spreadsheets -- View this message in context: http://drools.46999.n3.nabble.com/Rule-Orchestration-tp4029371p4029375.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] OptaPlanner: Solver.isEveryProblemFactChangeProcessed() return true before the last fact change is processed
I'm working on a scheduling solution for traveling engineers. Similar to vehicle routing but with daily routes and more complex constrains (like dependencies between visits). Thanks, Hagai Shatz On 30 Apr 2014, at 20:31, Geoffrey De Smet ge0ffrey.s...@gmail.com wrote: On 30-04-14 15:07, Hagai wrote: I do use it from other threads in the following 2 scenarios: 1. In a thread that monitors a stream of messages with fact changes. Just before the thread add a new problem fact change to the solver, the code checks if the message is relevant by examining the current solution facts. But if there is a pending problem fact change in the queue, this evaluation cannot be done and a new problem fact change must be added (even if it will not do any change when processed). The idea is to minimize the situations where a message does not result in any change to facts and the solver restart itself to process the a fact change that does not change anything. 2. The solver produce many new solutions when starting and after fact changes. After some time, less new solutions are found. But when a new solution is found, some additional improvements are usually found shortly after. To reduce the amount of new best solutions produced by the application, a thread is scheduled to read/save/send the best solution after a short idle time (no new best solution for X ms). To make sure the best solution is valid, the code checks if every problem facts change processed. If there are still fact changes to process, the solver will produce another best solution shortly with the updated facts. Thanks for the feedback: it's very helpful for me to know how it's used better. Out of interest: What kind of planning problem are you solving? I hope this fix is simple to do so I can remove my workaround. Yes, I'll fix the problem (I might go for an alternative on the peek()'s) on Friday (holiday tomorrow with plans). BTW, I'm looking forward to use the new demon mode (instead of a similar implementation outside of the solver). Grab 6.1.0-SNAPSHOT if you can't wait. Or read the SNAPSHOT docs. Feedback/concerns welcome. -- View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-Solver-isEveryProblemFactChangeProcessed-return-true-before-the-last-fact-change-is-procd-tp4029389p4029392.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] Integrate jBPM with OptaPlanner
Hi Geoffrey I was thinking something like this 1. Create a data model for a request in jBPM, where there will be a fields - id, complexity 2. Create a process model in jBPM for incoming requests being processed by specific actors 3. Somehow call optaplanner (??) Now lets say there are 10 requests Optaplanner can be used to assign requests to employees (based on the capability of the employee and the complexity of the request), for eg. request id 1, request id 3 are done by employee 2. Now in jBPM, I want request 1 and request 3 to be processed by employee 2(actor) Maybe use a decision table - When there is request 1 and request 3, then assign employee 2 to do a particular task -- View this message in context: http://drools.46999.n3.nabble.com/Integrate-jBPM-with-OptaPlanner-tp4029384p4029398.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple
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
Re: [rules-users] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple
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
Re: [rules-users] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple
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
[rules-users] Question about length windows
Hi Guys, I have one question about how lenght windows will work. I have a rule like this. Basically, it is a crosses function, where the value of my object crosses a value. rule mytest dialect mvel when t2_1 : Tick( value 102.352 ) over window:length (1) t1_1 : Tick( this before t2_1 , value = 102.352 ) over window:length (2) then //DO SOMETHING end 23:51:32,150 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351, tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) 23:53:30,560 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349, tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) If you see, the first activation, the window:length(1), matched the object 27 window:length(2), matched the object 26 Then, after 2 minutes and some Ticks insertes in the WM window:length(1), matched the object 146 but window:length(2), still matched the object 26 I would expect, that, as object 26 was the first one to be inserted, then it is outside the window:length(2). Is my understanding correct? Am I making something wrong? I am using Drools 6. Thanks! Demian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Question about length windows
A window:length is filled depending on the constraints but independent of how old the participating facts are. What you want to achieve can be done without windows: t2_1 : Tick( value 102.352 ) t1_1 : Tick( this before t2_1 , value = 102.352 ) not Tick( this before t2_1 after t1_1 ) The last pattern ascertains that the preceding pair of facts is adjacent. (The three timestamps should be different.) You can also use rules based on an auxiliary fact maintaining state: While value 102.352, state is set to below; as soon as a fact with value = 102.352 matches state == below, the threshold is passed and state is set to above... -W On 02/05/2014, Demian Calcaprina calcacue...@gmail.com wrote: Hi Guys, I have one question about how lenght windows will work. I have a rule like this. Basically, it is a crosses function, where the value of my object crosses a value. rule mytest dialect mvel when t2_1 : Tick( value 102.352 ) over window:length (1) t1_1 : Tick( this before t2_1 , value = 102.352 ) over window:length (2) then //DO SOMETHING end 23:51:32,150 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351, tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) 23:53:30,560 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349, tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) If you see, the first activation, the window:length(1), matched the object 27 window:length(2), matched the object 26 Then, after 2 minutes and some Ticks insertes in the WM window:length(1), matched the object 146 but window:length(2), still matched the object 26 I would expect, that, as object 26 was the first one to be inserted, then it is outside the window:length(2). Is my understanding correct? Am I making something wrong? I am using Drools 6. Thanks! Demian ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Question about length windows
On 05/01/2014 09:46 PM, Wolfgang Laun wrote: A window:length is filled depending on the constraints but independent of how old the participating facts are. Currently only ALPHA constraints determine which facts are filtered by a length window. There is a JIRA to include beta constraints, but it has not yet been discussed. So yes, if none of your facts had value 102.352, it is possible for (26) to be still in the window when (146) comes in. Davide What you want to achieve can be done without windows: t2_1 : Tick( value 102.352 ) t1_1 : Tick( this before t2_1 , value = 102.352 ) not Tick( this before t2_1 after t1_1 ) The last pattern ascertains that the preceding pair of facts is adjacent. (The three timestamps should be different.) You can also use rules based on an auxiliary fact maintaining state: While value 102.352, state is set to below; as soon as a fact with value = 102.352 matches state == below, the threshold is passed and state is set to above... -W On 02/05/2014, Demian Calcaprina calcacue...@gmail.com wrote: Hi Guys, I have one question about how lenght windows will work. I have a rule like this. Basically, it is a crosses function, where the value of my object crosses a value. rule mytest dialect mvel when t2_1 : Tick( value 102.352 ) over window:length (1) t1_1 : Tick( this before t2_1 , value = 102.352 ) over window:length (2) then //DO SOMETHING end 23:51:32,150 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351, tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) 23:53:30,560 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349, tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) If you see, the first activation, the window:length(1), matched the object 27 window:length(2), matched the object 26 Then, after 2 minutes and some Ticks insertes in the WM window:length(1), matched the object 146 but window:length(2), still matched the object 26 I would expect, that, as object 26 was the first one to be inserted, then it is outside the window:length(2). Is my understanding correct? Am I making something wrong? I am using Drools 6. Thanks! Demian ___ 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 5.4
if we have guvnor,we have a additional context (Url for Guvnor related modules). We would like to have a Single Context for our application. 1)Let me know whether any risk is seen in merging the application war and guvnor war. 2)Alternatives for loading the rules dynamically other than using Guvnor. Thanks, maxynandy -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-tp4029407.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