[rules-users] AgendaFilter - filter rule based on package name
Hi, Is it possible to filter rules based on package name? I note others asked this ... way back ... and reported it didn't work then. http://drools.46999.n3.nabble.com/Agenda-filter-based-on-package-name-tc52171.html Thanks in advance, Kevin -- View this message in context: http://drools.46999.n3.nabble.com/AgendaFilter-filter-rule-based-on-package-name-tp3772193p3772193.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] AgendaFilter - filter rule based on package name
Looking at the 5.3.0 javadoc: org.drools.runtime.rule.AgendaFilter has boolean accept(Activation activation) org.drools.runtime.rule.Activation has Rule getRule() and org.drools.definition.rule.Rule has String getPackageName() -W On 24/02/2012, Kevin Kelleher kelleher_ke...@hotmail.com wrote: Hi, Is it possible to filter rules based on package name? I note others asked this ... way back ... and reported it didn't work then. http://drools.46999.n3.nabble.com/Agenda-filter-based-on-package-name-tc52171.html Thanks in advance, Kevin -- View this message in context: http://drools.46999.n3.nabble.com/AgendaFilter-filter-rule-based-on-package-name-tp3772193p3772193.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 5.3.0 on Felix (OSGi)
Hi I got the same error. Did you make any progress on that? /Regards Christian -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-3-0-on-Felix-OSGi-tp3769538p3772373.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Fusion: updating event duration
Hi Wolfgang, thanks a lot for the explanation, but i am very sad now. I have to use STREAM mode, because i am implementing a spatio-temporal expert system, so, i need of temporal reasoning. I need to compare events on time too. From my understaning, i am limitated by: - i cannot update timestamp and duration of an event; - i cannot insert a new event with an old timestamp is it right? In a realtime sensor system, i don't receive the event with duration, but i need to correlate them to have an event with duration. Do you have any suggestions? Thanks a lot, Matteo. On Thu, Feb 23, 2012 at 7:39 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: On 22/02/2012, Edson Tirelli ed.tire...@gmail.com wrote: If your use case somehow has mutable events, you can retract, change the duration and reinsert. But mind the requirements of STREAM mode: Events in each stream must be time-ordered. I.e., inside a given stream, events that happened first must be inserted first into the engine. If reinsertions would violate this, you must run the session in CLOUD mode, which has certain consequences. This is all very well described in the Fusion manual, section on Event Processing Modes. -W The engine uses optimizations for the temporal reasoning that are based on the fact that events should be immutable. That is why the engine resolves the timestamp/duration attributes at insert time and make them immutable. Edson 2012/2/22 Matteo Cusmai cusmaimat...@gmail.com Hi Edson, so, when i want modify an event, i could do as follow: - clone event; - change the duration - retract the previuos event - insert the new event Is it right? Bye bye, Matteo. 2012/2/22 Edson Tirelli ed.tire...@gmail.com Unfortunately you can't update event durations or timestamp. Events are supposed to represent things that happened and as so, are immutable (other than data enrichment). If an event representation is no longer true, that event has to be retracted. Most common case is when you are dealing with atomic events (like start and end atomic events) that represent a complex event. Usually you will have a rule that correlates the start and end atomic events and creates a complex derived event, retracting the atomic ones. Edson 2012/2/22 Matteo Cusmai cusmaimat...@gmail.com Hi all, i am using Drools Fusion in multi sensor data fusion system. I have some rules that generate a new event when some situations occur. But from the other hand, i would like to update the event, when i understand that new sensor observation is referring to the same event. I have my Event clazz with duration field, i try to update it in modify clause, but i have concern about it, because when i use temporal operator (such as before, meets, so on) it seems that Drools manage them as event with duration null. I could post the code too. Bye bye, Matteo. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.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 -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.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 5.3.0 on Felix (OSGi)
Ok, I did now following: I openend the file com.springsource.com.sun.tools.xjc-2.1.7.jar and edited the file META-INF/MANIFEST.MF In lines 267 and 268 I removed following string: /,org.relaxng.datatype;version=2.1.7,org.relaxn g.datatype.helpers;version=2.1.7;uses:=org.relaxng.datatype/ I saved it and it started working. I opened following bugreport: https://issuetracker.springsource.com/browse/EBR-817 https://issuetracker.springsource.com/browse/EBR-817 Please tell me, if this resolves your problem? /Kind regards Christian -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-3-0-on-Felix-OSGi-tp3769538p3772618.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] (no subject)
Hello every body ! I'm a new drools Fusion user, And I'm now facing a real problem which is that my events attriutes values doesn't go to starttimestam and endtimestamp, I explain : when declaring a new event declare Evenement @role(event) @startimestamp(attr1) @endtimestamp(attr2) end And in the java code when I call the methods (getStartTimeStamp() end getEndTimeStamp()) of EventFactHandle object which is used to insert a nuw event in the working memrory. it gives me a very different values of what give (getAttr1() and getAttr2(). I want to know what is my error and also what is exactely the relationship between starttimestamp of EventFactHandle and attr1 ?? Thank you Merci :) -- Youssef AZBAKH Elève ingénieur en 3ème année informatique. Institut National de Statiqtique et d'Economie Appliquée (INSEA). ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] How to create a drl file or decision table dynamically?
If it is possible to create a drl file or decision table dynamically in drool or java? Like the drool received data then create drl or decision table based on the data? Data: Condition 1 AND Condition 2 OR Condition 3 . Can the above data be stored in the rule file which also contains the operators AND, OR? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3772708.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Fusion: updating event duration
A couple comments: * The temporal reasoning features/operators are available in both CLOUD and STREAM mode. The biggest differences are that in CLOUD mode there is no automatic garbage collection of old events and you can't use sliding windows, but everything else works. * You can insert events with old timestamps, but in that case it is the rule's author responsibility to understand that sliding windows using that event type might be affected and if running in STREAM mode, you should define an expiration policy for that event type that will keep him in memory for enough time to match any rules that require it. For instance, if in your application events will have a maximum duration of 24hs and because of that they can be inserted into the system with a delay of 24hs, you should define an expiration policy for it that is at least 24hs. Edson 2012/2/24 Matteo Cusmai cusmaimat...@gmail.com Hi Wolfgang, thanks a lot for the explanation, but i am very sad now. I have to use STREAM mode, because i am implementing a spatio-temporal expert system, so, i need of temporal reasoning. I need to compare events on time too. From my understaning, i am limitated by: - i cannot update timestamp and duration of an event; - i cannot insert a new event with an old timestamp is it right? In a realtime sensor system, i don't receive the event with duration, but i need to correlate them to have an event with duration. Do you have any suggestions? Thanks a lot, Matteo. On Thu, Feb 23, 2012 at 7:39 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: On 22/02/2012, Edson Tirelli ed.tire...@gmail.com wrote: If your use case somehow has mutable events, you can retract, change the duration and reinsert. But mind the requirements of STREAM mode: Events in each stream must be time-ordered. I.e., inside a given stream, events that happened first must be inserted first into the engine. If reinsertions would violate this, you must run the session in CLOUD mode, which has certain consequences. This is all very well described in the Fusion manual, section on Event Processing Modes. -W The engine uses optimizations for the temporal reasoning that are based on the fact that events should be immutable. That is why the engine resolves the timestamp/duration attributes at insert time and make them immutable. Edson 2012/2/22 Matteo Cusmai cusmaimat...@gmail.com Hi Edson, so, when i want modify an event, i could do as follow: - clone event; - change the duration - retract the previuos event - insert the new event Is it right? Bye bye, Matteo. 2012/2/22 Edson Tirelli ed.tire...@gmail.com Unfortunately you can't update event durations or timestamp. Events are supposed to represent things that happened and as so, are immutable (other than data enrichment). If an event representation is no longer true, that event has to be retracted. Most common case is when you are dealing with atomic events (like start and end atomic events) that represent a complex event. Usually you will have a rule that correlates the start and end atomic events and creates a complex derived event, retracting the atomic ones. Edson 2012/2/22 Matteo Cusmai cusmaimat...@gmail.com Hi all, i am using Drools Fusion in multi sensor data fusion system. I have some rules that generate a new event when some situations occur. But from the other hand, i would like to update the event, when i understand that new sensor observation is referring to the same event. I have my Event clazz with duration field, i try to update it in modify clause, but i have concern about it, because when i use temporal operator (such as before, meets, so on) it seems that Drools manage them as event with duration null. I could post the code too. Bye bye, Matteo. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.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 -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.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 -- Edson Tirelli JBoss Drools Core Development JBoss
[rules-users] getStartTimestamp() and getEndTimestamp() give the same values ??!!
Hello ! My problem is that the 2 methods getStartTimestamp() and getEndTimestamp() give me the same value I don't know why (the duration of any event is 0 !!) Thank you very much :) -- View this message in context: http://drools.46999.n3.nabble.com/getStartTimestamp-and-getEndTimestamp-give-the-same-values-tp3772788p3772788.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] Drools Planner: Vehicle routing problems
Hi, as discussed the other day with Ge0ffrey on IRC, I've been trying to get some vehicle routing done using the new TSP / chaining functionality in drools planner. I've written an example, but am having problems with the chaining of jobs together. After pulling my hair out, I've put together an example into my fork of planner, showing a simplified example of how I am approaching it, and the problem that can be replicated. https://github.com/davidglassborow/drools-planner/tree/vehicle_routing It is a very simple console app along the same lines as the hello world example for NQueens. On running it will print out the chains, and you will see the some Jobs appear more than once in the same list. On the planning variable it seems to be get assigned in front of itself, I've put some notes in the source, and checked that the same doesn't occur in your TSP example. I'm not sure if its a bug in the way I've setup things, or whether its an issue in the chain move code. Greatly appreciated if anybody in the know gets a chance to have a look. Thanks, David -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-routing-problems-tp3772797p3772797.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Planner: Vehicle routing problems
Some more details on my problem: Here is an example of a vehicle routing solution, 2 crews and 4 Jobs A, B, C and D. The print out below is the solver and solutions found at each step (it prints out each chain of jobs) As you can see the initial solution is valid. The next and last solutions are invalid though, with the same job appearing more than once in a chain. At 109: B = Crew1 D = Crew2 A = B = Crew1 C = A = B = Crew1 2012-02-24 15:20:39,160 [main] DEBUG Step index (3), time spend (110), score (0hard/-17soft), initialized planning entity (Job D ( linked to Crew Crew2)). 2012-02-24 15:20:39,160 [main] INFO Phase construction heuristic ended: step total (4), time spend (110), best score (0hard/-17soft). At 127: D = Crew2 A = B = Crew1 B = A = B = Crew1 C = A = B = Crew1 2012-02-24 15:20:39,177 [main] DEBUG Step index (0), time spend (127), score (0hard/-15soft), new best score (0hard/-15soft), accepted move size (18) for picked step (Job B ( linked to Crew Crew1) = Job A ( linked to Job B)). 2012-02-24 15:20:39,191 [main] DEBUG Step index (1), time spend (141), score (0hard/-15soft), best score (0hard/-15soft), accepted move size (14) for picked step (Job D ( linked to Crew Crew2) = Crew1). 2012-02-24 15:20:39,206 [main] DEBUG Step index (2), time spend (156), score (0hard/-16soft), best score (0hard/-15soft), accepted move size (10) for picked step (Job C ( linked to Job A) = Job B ( linked to Job A)). 2012-02-24 15:20:39,223 [main] DEBUG Step index (3), time spend (173), score (0hard/-16soft), best score (0hard/-15soft), accepted move size (5) for picked step (Job A ( linked to Job B) = Job B ( linked to Job A)). 2012-02-24 15:20:39,239 [main] WARN Cancelled step index (4), time spend (189): there is no doable move. Terminating phase early. 2012-02-24 15:20:39,239 [main] INFO Phase local search ended: step total (4), time spend (189), best score (0hard/-15soft). 2012-02-24 15:20:39,239 [main] INFO Solving ended: time spend (189), best score (0hard/-15soft), average calculate count per second (1089). Best: D = Crew2 A = B = Crew1 C = A = B = Crew1 B = A = B = B = Crew1 -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-routing-problems-tp3772797p3772841.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to create a drl file or decision table dynamically?
Yes. If the data defines the rules then there are numerous options:- - Construct a DRL String yourself and pass this to a KnowledgeBuilder - Use the fluent API to build rules programmatically - Construct an XLS decision table using your favourite XLS (Java) API and look at drools-decisiontables - Construct a Guvnor decision table using classes in droolsjbpm-ide-common (bundled with Guvnor) If the data is to be plugged into place-holders in statically defined rules:- - Look at the use of Drools Expert Templates Decision tables do not lend themselves well to OR as there is an implicit AND between columns. There might be other solutions, these are those that came readily to mind. With kind regards, Mike On 24 February 2012 14:31, shawn youngxiao...@hotmail.com wrote: If it is possible to create a drl file or decision table dynamically in drool or java? Like the drool received data then create drl or decision table based on the data? Data: Condition 1 AND Condition 2 OR Condition 3 . Can the above data be stored in the rule file which also contains the operators AND, OR? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3772708.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] getStartTimestamp() and getEndTimestamp() give the same values ??!!
IIRC (from the Drools Fusion user-guide) this represents a point in time event. I won't pretend to be a Fusion expert though, so please do wait for others to comment too On 24 February 2012 15:04, Hassan azbak...@gmail.com wrote: Hello ! My problem is that the 2 methods getStartTimestamp() and getEndTimestamp() give me the same value I don't know why (the duration of any event is 0 !!) Thank you very much :) -- View this message in context: http://drools.46999.n3.nabble.com/getStartTimestamp-and-getEndTimestamp-give-the-same-values-tp3772788p3772788.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] getStartTimestamp() and getEndTimestamp() give the same values ??!!
Thank you very much !! yess you are right, becouse my declaration of the event didn't montionne the duration attribute so my event is a point in time event. if we add @duration(attr3) and the attr3 takes a value 0 so the 2methodes won't give the same value. Thank you again :) -- View this message in context: http://drools.46999.n3.nabble.com/getStartTimestamp-and-getEndTimestamp-give-the-same-values-tp3772788p3772918.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] (no subject)
If you look at the implementation of EventFactHandle.getEndTimestamp (not ...eSt...) you'll see why: it returns startTimestamp + duration. You should *not* use methods that aren't in the stable part of the Drools API. Also, the documentation does not tell you that you can map event attributes to start and end of an event - only the start and the duration. -W On 24/02/2012, youssef azbakh azbak...@gmail.com wrote: Hello every body ! I'm a new drools Fusion user, And I'm now facing a real problem which is that my events attriutes values doesn't go to starttimestam and endtimestamp, I explain : when declaring a new event declare Evenement @role(event) @startimestamp(attr1) @endtimestamp(attr2) end And in the java code when I call the methods (getStartTimeStamp() end getEndTimeStamp()) of EventFactHandle object which is used to insert a nuw event in the working memrory. it gives me a very different values of what give (getAttr1() and getAttr2(). I want to know what is my error and also what is exactely the relationship between starttimestamp of EventFactHandle and attr1 ?? Thank you Merci :) -- Youssef AZBAKH Elève ingénieur en 3ème année informatique. Institut National de Statiqtique et d'Economie Appliquée (INSEA). ___ 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] How to create a drl file or decision table dynamically?
Thanks for your reply. Sorry, I am not quite clear about your first option. What's the meaning of 'Construct a DRL String'? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773060.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to create a drl file or decision table dynamically?
Hi Michael, Do you have a link to the Fluent API documentation? I wanted to answer to this question and couldn't find the link anywhere. Thanks, Leo. 2012/2/24 Michael Anstis michael.ans...@gmail.com Yes. If the data defines the rules then there are numerous options:- - Construct a DRL String yourself and pass this to a KnowledgeBuilder - Use the fluent API to build rules programmatically - Construct an XLS decision table using your favourite XLS (Java) API and look at drools-decisiontables - Construct a Guvnor decision table using classes in droolsjbpm-ide-common (bundled with Guvnor) If the data is to be plugged into place-holders in statically defined rules:- - Look at the use of Drools Expert Templates Decision tables do not lend themselves well to OR as there is an implicit AND between columns. There might be other solutions, these are those that came readily to mind. With kind regards, Mike On 24 February 2012 14:31, shawn youngxiao...@hotmail.com wrote: If it is possible to create a drl file or decision table dynamically in drool or java? Like the drool received data then create drl or decision table based on the data? Data: Condition 1 AND Condition 2 OR Condition 3 . Can the above data be stored in the rule file which also contains the operators AND, OR? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3772708.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] (no subject)
Hi , First of all thank you very much for responding me, Yes you're rights getEndTimestamp() == getStartTimestamp()+duration. I thought that the when we give the attribute to timestamp, tha value of the attribute will be token from the session clock. BUT the real senario is that the StartTimestamp() retourne the value given throught the attribute, that is like we specify the moment when the event will occur. I waste a lot of time in this point :( But I m progressing in Drools Fusion :) Thank you very much :) -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-no-subject-tp3772684p3773092.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to create a drl file or decision table dynamically?
Is it from JBPM or ? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773142.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to create a drl file or decision table dynamically?
Quite simply, use a StringBuilder and create the DRL you need from the data you receive. @Leonardo, erm, erm... no. TBH I thought I'd be able to Google for it.. but no luck. Edson? Is there anything - or am I promoting something I shouldn't ;) On 24 February 2012 16:43, shawn youngxiao...@hotmail.com wrote: Thanks for your reply. Sorry, I am not quite clear about your first option. What's the meaning of 'Construct a DRL String'? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773060.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] uploading bpmn file from file system in guvnor
How to upload/deploy a bpmn from file system into Guvnor? -- View this message in context: http://drools.46999.n3.nabble.com/uploading-bpmn-file-from-file-system-in-guvnor-tp3773186p3773186.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to create a drl file or decision table dynamically?
Thank you~ Does it mean I have to write a file in java and saved it as .drl? fluent API is in jbpm, right? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773187.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] uploading bpmn file from file system in guvnor
Knowledge Bases (section) - Create New - New BPMN2 process. Assuming you've completed the prerequisites to have jBPM Designer setup to work with Guvnor this should be it. On 24 February 2012 17:35, MALABALU malathi.b...@aciworldwide.com wrote: How to upload/deploy a bpmn from file system into Guvnor? -- View this message in context: http://drools.46999.n3.nabble.com/uploading-bpmn-file-from-file-system-in-guvnor-tp3773186p3773186.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] How to create a drl file or decision table dynamically?
1) No you don't have to save it; just use one of the overloaded methods on KnowledgeBuilder that takes a StringReader, or String or something else similar. 2) I understand there to be one for Drools Expert too, which I'd expect to be in one of the drools-xxx JARs however am having trouble finding it! Re#2, I've asked Edson Tirelli (the author of the Drools Expert Fluent API) to advise further... On 24 February 2012 17:35, shawn youngxiao...@hotmail.com wrote: Thank you~ Does it mean I have to write a file in java and saved it as .drl? fluent API is in jbpm, right? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773187.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] How to create a drl file or decision table dynamically?
Thanks a lot~ Looking forward to hearing from you. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773255.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] uploading bpmn file from file system in guvnor
Continuing with Michaels' explanation: once the process editor is open you have to search for a button in the toolbar of the editor that will allow you to import a process providing a a file or simply the content. Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com On Fri, Feb 24, 2012 at 6:44 PM, Michael Anstis michael.ans...@gmail.comwrote: Knowledge Bases (section) - Create New - New BPMN2 process. Assuming you've completed the prerequisites to have jBPM Designer setup to work with Guvnor this should be it. On 24 February 2012 17:35, MALABALU malathi.b...@aciworldwide.com wrote: How to upload/deploy a bpmn from file system into Guvnor? -- View this message in context: http://drools.46999.n3.nabble.com/uploading-bpmn-file-from-file-system-in-guvnor-tp3773186p3773186.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] How to create a drl file or decision table dynamically?
The reason it is not in the manual yet is because it was not promoted to the public API yet. Nevertheless, you can use it, but be aware that there might still be changes on it from version to version until it is promoted to the public API. I am hoping Mark will give me the go ahead to make it public soon. Examples are here: https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/lang/api/DescrBuilderTest.java The javadoc is not complete, but what is there is correct. Classes are: https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/api The API is completely typesafe, so you can trust the code completion of you java editor... :) Edson 2012/2/24 Michael Anstis michael.ans...@gmail.com 1) No you don't have to save it; just use one of the overloaded methods on KnowledgeBuilder that takes a StringReader, or String or something else similar. 2) I understand there to be one for Drools Expert too, which I'd expect to be in one of the drools-xxx JARs however am having trouble finding it! Re#2, I've asked Edson Tirelli (the author of the Drools Expert Fluent API) to advise further... On 24 February 2012 17:35, shawn youngxiao...@hotmail.com wrote: Thank you~ Does it mean I have to write a file in java and saved it as .drl? fluent API is in jbpm, right? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3773187.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 -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to create a drl file or decision table dynamically?
There is one (1) sentence and a dozen (12) lines of example in the section about What is New and Noteworhty in Drools 5.2.0 in the Introduction manual. Given that this nano-documentation doesn't tell you what to do with the resulting PackageDescr and that this fluent API is part of the unstable API, I'd put my money on StringBuilder and create rules as DRL text. YMMV. -W On 24/02/2012, Leonardo Gomes leonardo.f.go...@gmail.com wrote: Hi Michael, Do you have a link to the Fluent API documentation? I wanted to answer to this question and couldn't find the link anywhere. Thanks, Leo. 2012/2/24 Michael Anstis michael.ans...@gmail.com Yes. If the data defines the rules then there are numerous options:- - Construct a DRL String yourself and pass this to a KnowledgeBuilder - Use the fluent API to build rules programmatically - Construct an XLS decision table using your favourite XLS (Java) API and look at drools-decisiontables - Construct a Guvnor decision table using classes in droolsjbpm-ide-common (bundled with Guvnor) If the data is to be plugged into place-holders in statically defined rules:- - Look at the use of Drools Expert Templates Decision tables do not lend themselves well to OR as there is an implicit AND between columns. There might be other solutions, these are those that came readily to mind. With kind regards, Mike On 24 February 2012 14:31, shawn youngxiao...@hotmail.com wrote: If it is possible to create a drl file or decision table dynamically in drool or java? Like the drool received data then create drl or decision table based on the data? Data: Condition 1 AND Condition 2 OR Condition 3 . Can the above data be stored in the rule file which also contains the operators AND, OR? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-tp3772708p3772708.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] Removing many facts have invalid timestamp
Trying to figure out if it can be done in a rule almost some sort of pre rule before other rules are triggered. The current rule I have is rule RemoveInvalidEndTimestamps salience 100 when $factN : Fact() $factsToRemove : ArrayList(size=5) from collect( Fact(endTime==$factN.endTime)) then List newFactsToRemove = new ArrayList(); newFactsToRemove.addAll($factsToRemove); for(Fact n : newFactsToRemove ){ retract(n); } end I am using a cloud based process . I could sort the facts and stream them in. Just in a few test cases there are many facts with invalid times , which kills the speed . From the log I think that each collection of size=5 , is triggered which means triggered for 5,6,7, etc. Just wondering if there is way to say before doing any other rules collect up all these invalid times and remove them. I was just going to write up a some java code and filter before feeding facts into drools but I find the rule syntax is much easier to read for the non software developers in my group. -- Thanks, Benjamin Bennett benbenn...@gmail.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Removing many facts have invalid timestamp
Would you please define unambiguously what constitutes an invalid time? From your code it would appear that one time has to occur fivefold or more often to be invalid. In case any duplicates should be removed a simple high-priority rule is sufficient: rule killDuplicate salience 1000 when $f1: Fact() $f2 :Fact( endTime == $f1.endTime ) then retract( $f2 ); end -W On 24/02/2012, Benjamin Bennett benbenn...@gmail.com wrote: Trying to figure out if it can be done in a rule almost some sort of pre rule before other rules are triggered. The current rule I have is rule RemoveInvalidEndTimestamps salience 100 when $factN : Fact() $factsToRemove : ArrayList(size=5) from collect( Fact(endTime==$factN.endTime)) then List newFactsToRemove = new ArrayList(); newFactsToRemove.addAll($factsToRemove); for(Fact n : newFactsToRemove ){ retract(n); } end I am using a cloud based process . I could sort the facts and stream them in. Just in a few test cases there are many facts with invalid times , which kills the speed . From the log I think that each collection of size=5 , is triggered which means triggered for 5,6,7, etc. Just wondering if there is way to say before doing any other rules collect up all these invalid times and remove them. I was just going to write up a some java code and filter before feeding facts into drools but I find the rule syntax is much easier to read for the non software developers in my group. -- Thanks, Benjamin Bennett benbenn...@gmail.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users