[rules-users] Non Spatial Map Reduce
I was reading the blog http://www.optaplanner.org/blog/2014/03/03/CanMapReduceSolvePlanningProblems.html and although the unsuitability of the spatial division of the problem makes sense, I'd like to understand why the problem can't be broken up differently. i.e. why can't any solution be loaded into n separate solvers with 1/nth of the moves, and then send the best solution to all the solvers, and repeat? -- View this message in context: http://drools.46999.n3.nabble.com/Non-Spatial-Map-Reduce-tp4028652.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] Workbench on tomcat
I'm sure I'm being dense, but I can't reconcile the readme instructions with the file I see in the workbench app: 1. Copy kie-tomcat-integration jar into TOMCAT_HOME/lib *Where is this file? 2. Copy jacc lib into TOMCAT_HOME/lib (javax.security.jacc-api in jboss maven repository) *What is the file name for jacc lib and where is it? 3. Add valve configuration into TOMCAT_HOME/conf/server.xml inside Host element as last valve definition Valve className=org.kie.integration.tomcat.JACCValve / 4. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and users, make sure there will be 'analyst' or 'admin' roles defined as it's required to be authorized to use kie-wb 5. Edit web.xml and uncomment all entries that are marked with TOMCAT-JEE-SECURITY *There are no entries marked with TOMCAT-JEE-SECURITY in that file. 6. Rename org.uberfire.security.auth.AuthenticationSource to org.uberfire.security.auth.AuthenticationSource-ORIGIN and rename org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY to org.uberfire.security.auth.AuthenticationSource inside WEB-INF/classes/META-INF/services *There isn't an uberfire folder under the org folder there. -- View this message in context: http://drools.46999.n3.nabble.com/Workbench-on-tomcat-tp4028507.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] OutOfMemoryError using 6.0.1
I used yesterday's 6.1.0 nightly and the problem wasn't there. Will using the 6.0.x snapshot be any different? -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183p4028210.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] OutOfMemoryError using 6.0.1
That was exactly what I was hoping for. A bug, not caused by me, that had already been closed. Thanks. On Wed, Feb 19, 2014 at 5:13 AM, tari-manga [via Drools] ml-node+s46999n4028191...@n3.nabble.com wrote: Ciao, I'm another Drools user also encountering similar OutOfMemory errors with v6.0.1; I'm not 100% sure what is your issue specific to, but this may be related / of interest to your case: https://issues.jboss.org/browse/DROOLS-411 Hope this helps; Ciao MM On Wed, Feb 19, 2014 at 8:20 AM, john poole [hidden email] wrote: I've converted some NurseRostering rules, which worked in Drools 5.50, to OptaPlanner 6.0.1. While it works far better for the time it runs, it uses up whatever memory I can give it (9GB) and then eventually crashes the GUI. with: Exception in thread AWT-EventQueue-0 java.lang.OutOfMemoryError: GC overhead limit exceeded Is there a way to limit how much memory OptaPlanner uses? Or is it likely that I'm just adding fact to the WorkingMemory in a way that wasn't a problem in 5.5 but is a problem in 6.0? -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183.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/OutOfMemoryError-using-6-0-1-tp4028183p4028191.html To unsubscribe from OutOfMemoryError using 6.0.1, click here. NAML -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183p4028196.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] OutOfMemoryError using 6.0.1
I've converted some NurseRostering rules, which worked in Drools 5.50, to OptaPlanner 6.0.1. While it works far better for the time it runs, it uses up whatever memory I can give it (9GB) and then eventually crashes the GUI. with: Exception in thread AWT-EventQueue-0 java.lang.OutOfMemoryError: GC overhead limit exceeded Is there a way to limit how much memory OptaPlanner uses? Or is it likely that I'm just adding fact to the WorkingMemory in a way that wasn't a problem in 5.5 but is a problem in 6.0? -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183.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] How to add entity classes to Workbench?
I downloaded and configured Workbench (Guvnor), and I'd like to add my entity classes to it in order to create rules to manipulate their data. I don't see an JAR import function. Is this possible? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Clarification needed on Workbench
I need some clarification on Workbench. First, I'd like to use Workbench to allow business analysts create business rules to manipulate entity classes through the UI. Then, I'd like to export the rules from Workbench to a rules that will be loaded into our application for use by our Drools bean. Ifs this possible? Second, can rules reference EJBs or perform JPA queries? Thanks. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to add entity classes to Workbench?
It doesn't seem to work that well. Error: An error occurred when the requested data model was loaded from server. The server error is: java.lang.ClassNotFoundException:com.comp.project.entity.SomeEntityPK SomeEntityPK is an @Embeddable for SomeEntity @Entity public class SomeEntity implements Serializable { private static final long serialVersionUID = 1L; @EmbeddedId protected SomeEntityPK someEntityPK; /* fields */ } @Embeddable public class SomeEntityPK implements Serializable { /* primary key fields */ } Both are in the same package. Is this a bug? On Tue, Feb 4, 2014 at 12:43 PM, Mark Proctor mproc...@codehaus.org wrote: Lots of videos here: http://blog.athico.com/2013/12/drools-60-workbench-and-editor-videos.html You need to go to the Deployment menu option, and upload jar. It's then available as a dependency, in the project editor configuration http://www.youtube.com/watch?v=FKVFkRHLGjQlist=PLb9jQNHBKBRj9IJkc_F5nCJAvXaegOGW8index=5 On 4 Feb 2014, at 17:32, John Manko john.ma...@gmail.com wrote: KIE 6.0.1.Final On Tue, Feb 4, 2014 at 12:10 PM, Michael Anstis michael.ans...@gmail.comwrote: What version? Sent on the move On 4 Feb 2014 16:56, John Manko john.ma...@gmail.com wrote: I downloaded and configured Workbench (Guvnor), and I'd like to add my entity classes to it in order to create rules to manipulate their data. I don't see an JAR import function. Is this possible? ___ 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 -- If the American people ever allow private banks to control the issue of their currency, first by inflation, then by deflation, the banks...will deprive the people of all property until their children wake-up homeless on the continent their fathers conquered... The issuing power should be taken from the banks and restored to the people, to whom it properly belongs. -- Thomas Jefferson ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to add entity classes to Workbench?
yes. Added the maven based jar (binary), added the dependencies to the project, then opened the data modeller and got that error. :( On Tue, Feb 4, 2014 at 4:15 PM, Mark Proctor mproc...@codehaus.org wrote: I'm not sure what you are trying to do? You've uploaded a JAR, which you've added to your project editor, which you then try and open (for viewing only) in the data modeller? Mark On 4 Feb 2014, at 19:25, John Manko john.ma...@gmail.com wrote: It doesn't seem to work that well. Error: An error occurred when the requested data model was loaded from server. The server error is: java.lang.ClassNotFoundException:com.comp.project.entity.SomeEntityPK SomeEntityPK is an @Embeddable for SomeEntity @Entity public class SomeEntity implements Serializable { private static final long serialVersionUID = 1L; @EmbeddedId protected SomeEntityPK someEntityPK; /* fields */ } @Embeddable public class SomeEntityPK implements Serializable { /* primary key fields */ } Both are in the same package. Is this a bug? On Tue, Feb 4, 2014 at 12:43 PM, Mark Proctor mproc...@codehaus.orgwrote: Lots of videos here: http://blog.athico.com/2013/12/drools-60-workbench-and-editor-videos.html You need to go to the Deployment menu option, and upload jar. It's then available as a dependency, in the project editor configuration http://www.youtube.com/watch?v=FKVFkRHLGjQlist=PLb9jQNHBKBRj9IJkc_F5nCJAvXaegOGW8index=5 On 4 Feb 2014, at 17:32, John Manko john.ma...@gmail.com wrote: KIE 6.0.1.Final On Tue, Feb 4, 2014 at 12:10 PM, Michael Anstis michael.ans...@gmail.com wrote: What version? Sent on the move On 4 Feb 2014 16:56, John Manko john.ma...@gmail.com wrote: I downloaded and configured Workbench (Guvnor), and I'd like to add my entity classes to it in order to create rules to manipulate their data. I don't see an JAR import function. Is this possible? ___ 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 -- If the American people ever allow private banks to control the issue of their currency, first by inflation, then by deflation, the banks...will deprive the people of all property until their children wake-up homeless on the continent their fathers conquered... The issuing power should be taken from the banks and restored to the people, to whom it properly belongs. -- Thomas Jefferson ___ 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 -- If the American people ever allow private banks to control the issue of their currency, first by inflation, then by deflation, the banks...will deprive the people of all property until their children wake-up homeless on the continent their fathers conquered... The issuing power should be taken from the banks and restored to the people, to whom it properly belongs. -- Thomas Jefferson ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Long pattern for Nurse Rostering
That does make sense. It sounds like I should be adding the facts as domain objects where the index is available instead of generating them during the solution. I was trying to reuse the existing ShiftType3DaysPattern class from the nursing example, but used more than I should have. The code I have is almost working, but it seems to create plateaus. I can give it a push by stopping the GUI, making some changes, and then restarting. So I'll add another rule to do that on it's own. I feel like I'm building a kludgy house of cards though. -- View this message in context: http://drools.46999.n3.nabble.com/Long-pattern-for-Nurse-Rostering-tp4025432p4025452.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] Long pattern for Nurse Rostering
Thanks for the reply. The series of shifts that a Doctor works in my schedule is 15 days straight, but not the same Shift for each of those days. I ended up doing it like this, maybe it explains the requirements better. Its working, but it looks ugly. rule pattern15dayShiftAssignment when $pattern : Neuro15DaysPattern( $dayOfWeekFirst : getDayOfWeek(0), $shiftType0: getShiftType(0), $shiftType1: getShiftType(1), $shiftType2: getShiftType(2), $shiftType3: getShiftType(3), $shiftType4: getShiftType(4), $shiftType5: getShiftType(5), $shiftType6: getShiftType(6), $shiftType7: getShiftType(7), $shiftType8: getShiftType(8), $shiftType9: getShiftType(9), $shiftType10: getShiftType(10), $shiftType11: getShiftType(11), $shiftType12: getShiftType(12), $shiftType13: getShiftType(13), $shiftType14: getShiftType(14) ); then insertLogical( new PatternShiftAssignment($pattern, $shiftType1, 1) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType2, 2) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType3, 3) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType4, 4) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType5, 5) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType6, 6) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType7, 7) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType8, 8) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType9, 9) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType10, 10) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType11, 11) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType11, 11) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType12, 12) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType13, 13) ); insertLogical( new PatternShiftAssignment($pattern, $shiftType14, 14) ); System.out.println( $pattern + + $shiftType14 ); end rule unwantedPatternNeuro15Days when $pattern : Neuro15DaysPattern($dayOfWeekFirst : getDayOfWeek(0), $shiftType0: getShiftType(0), $code : code); PatternShiftAssignment( pattern == $pattern, $shiftType : shiftType, $dayIndex: patternIndex) $shiftAssignment0 : ShiftAssignment($code == shiftDateDayIndex % 2, shiftType == $shiftType0, shiftDateDayOfWeek == $dayOfWeekFirst, $employee: employee, $shiftDateDayIndex0 : shiftDateDayIndex); $shiftassignment : ShiftAssignment( shiftType == $shiftType, shiftDateDayIndex == ($dayIndex+$shiftDateDayIndex0), $employee != employee ) then insertLogical(new IntConstraintOccurrence(unwantedPatternNeuro15Days, ConstraintType.NEGATIVE_SOFT, $pattern.getWeight(), $employee, $pattern, $dayIndex)); end -- View this message in context: http://drools.46999.n3.nabble.com/Long-pattern-for-Nurse-Rostering-tp4025432p4025444.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] Long pattern for Nurse Rostering
I'm trying to create a rule for a 15 day pattern. When the patterns uses the same shift for all 15 days, I do this: rule unWanted15DayPattern when $pattern : U15DayPattern( $numberOfDays : numberOfDays, $shiftType : shiftType ) ShiftAssignment( shiftType == $shiftType, $employee : employee, $firstDayIndex : shiftDateDayIndex ) ShiftDate( $firstDayIndex == dayIndex, dayIndex % 15 == 0) //Check for different employee working that shift in the next N days $shiftAssignment : ShiftAssignment( shiftType == $shiftType, employee != $employee, shiftDateDayIndex $firstDayIndex, shiftDateDayIndex $firstDayIndex + 15 ) then insertLogical(new IntConstraintOccurrence(unWanted15DayPattern, ConstraintType.NEGATIVE_SOFT, $pattern.getWeight(), $firstDayIndex)); end But I'm having a hard time figuring out how to do it with different shiftTypes for each day, because it means having to use a loop. Not sure if that makes sense, but it anyone has used a long pattern that stores items in a list/array I'd love to hear how they did it. -- View this message in context: http://drools.46999.n3.nabble.com/Long-pattern-for-Nurse-Rostering-tp4025432.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] Wanted Patterns in Planner/Rostering
Thanks. It was simple once I knew it was going to work. Writing rules is very intuitive when I'm doing them daily, but if I take a couple of months off I lose the touch. -- View this message in context: http://drools.46999.n3.nabble.com/Wanted-Patterns-in-Planner-Rostering-tp4025016p4025064.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] Wanted Patterns in Planner/Rostering
I'm using the Nurse Rostering code as a base and adding my own rules, etc. Are there any examples of wanted patterns? It looks like all the input files, and the drl rules are all for unwanted patterns. I just want to make sure I'm not missing something obvious. -- View this message in context: http://drools.46999.n3.nabble.com/Wanted-Patterns-in-Planner-Rostering-tp4025016.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] shiftAssignment change
I'm trying to write a simple web application that uses much of the code from the NurseRostering example. It all works great except when I try to do a change move after terminating solving. In: DroolScoreDirector.afterVariableChanged() for the ShiftAssignment, I get a null back from this: FactHandle factHandle = workingMemory.getFactHandle(entity); My guess is that it's because it's a different copy of the workingMemory than the entity is coming from, but I'm not sure how to access the correct copy. I'm getting the ShiftAssigment from: NurseRoster nurseRoster = (NurseRoster) solutionBusiness.getSolution(); ListShiftAssignmentshiftAssignmentList=nurseRoster.getShiftAssignmentList(); and then attempting the move from: solutionBusiness.doMove(new EmployeeChangeMove(shiftAssignment, toEmployee)); Is there something else I need to do after terminating solving before doing a changemove? -- View this message in context: http://drools.46999.n3.nabble.com/shiftAssignment-change-tp4023179.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] shiftAssignment change
Ignore this, I was getting the shift assignment list from the wrong solution. -- View this message in context: http://drools.46999.n3.nabble.com/shiftAssignment-change-tp4023179p4023184.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] Found solution vs actual optimum [planner]
I went through and ran some stepLimit benchmarks, commenting out single rules at a time, or groups of rules that were dependent on each other. average calculate count per second stayed fairly consistent at around 825 to 850, except for the consecutive working day rules.( Which were already in the drl file before I added mine, but do apply to the schedules I'm working on) I commented out the group, then uncommented them in sequence. Everything below a score is commented out: 1487(entire group commented out) rule insertEmployeeConsecutiveAssignmentStart 1308 rule insertEmployeeConsecutiveAssignmentEnd 1244 rule insertEmployeeWorkSequence 1054 rule minimumConsecutiveWorkingDays 1081 rule maximumConsecutiveWorkingDays 988 rule insertEmployeeFreeSequence 994 rule insertFirstEmployeeFreeSequence 902 rule insertLastEmployeeFreeSequence 854 rule insertEntireEmployeeFreeSequence 938 rule minimumConsecutiveFreeDays 895 rule maximumConsecutiveFreeDays 851 (nothing commented out) -- View this message in context: http://drools.46999.n3.nabble.com/Found-solution-vs-actual-optimum-tp4022027p403.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] Found solution vs actual optimum [planner]
I ran the benchmarker and it's showing that I should be using simulated annealing. So that's useful info. I'm only getting 525-650 for the average calculate count per second though. (I didn't realize I could get it without the benchmarker until reading the docs again) I'm going through Score calculation performance tricks now, but I didn't see anything about the hardware used for the expected 1000 value. If my older laptop is sort of crappy( a Pentium(R)2.2GHz), that would explain the difference, correct? -- View this message in context: http://drools.46999.n3.nabble.com/Found-solution-vs-actual-optimum-tp4022027p4022175.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] Found solution vs actual optimum [planner]
Better than other algorithms is what I'm after. The output from the sample data sets is excellent. So easy to scan through and understand all the results immediately. Anyone that hasn't used it should give it a try. I'm running the benchmarker on my inputs and rules now. I'm just using the Nurse Rostering example with different inputs and a few more rules, but it's been taking me around 6 hours to get the score I expect. I'm also using planner to try and show cases where an acceptable solution can't be found, and I'll be more confident knowing I'm tried all the methods. Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Found-solution-vs-actual-optimum-tp4022027p4022073.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] Found solution vs actual optimum [planner]
Thanks. If the Best score over time line doesn't flatline, does that mean it needs more time or that the configuration isn't ever going to produce a good solution? -- View this message in context: http://drools.46999.n3.nabble.com/Found-solution-vs-actual-optimum-tp4022027p4022053.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] Found solution vs actual optimum
Is there a way to describe how the solutions found in planner compare to the true optimum solutions? In chapter 6 http://docs.jboss.org/drools/release/5.5.0.Final/drools-planner-docs/html/optimizationAlgorithms.html of the docs it rates the methods used as 4/5 for finding an optimal solution. Does that mean: a) it will do a good job of finding the optimum, or b) that the solution it finds will be close to an optimum? -- View this message in context: http://drools.46999.n3.nabble.com/Found-solution-vs-actual-optimum-tp4022027.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] Planner - NurseRostering: MaxWorkingWeekendsInFourWeeks
Thanks. It's a different rule, but it's good to know that I'm not duplicating something. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Planner-NurseRostering-MaxWorkingWeekendsInFourWeeks-tp4021702p4021743.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] Planner - NurseRostering: MaxWorkingWeekendsInFourWeeks
The parameters for MaxWorkingWeekendsInFourWeeks is in some of the input files for the NurseRostering example, but it doesn't seem to be the rules(drl) file. Is it implemented elsewhere? I've tried doing is like this, but it doesn't work as a HARD constraint. I'm running it as SOFT now, but it would nice to compare it to a better version. //Rules for workingweekends rule insertWorkingWeekends when MinMaxContractLine(contractLineType == ContractLineType.TOTAL_WORKING_WEEKENDS_IN_FOUR_WEEKS, enabled == true, $contract : contract) $employee : Employee(contract == $contract) ShiftAssignment(employee == $employee, $shiftDateDayIndex : shiftDate.dayIndex, weekend == true) then insertLogical(new WorkingWeekend($employee, $shiftDateDayIndex/7)); end // Maximum working weekends in four weeks rule insertWorkingWeekendsInFourWeeks // salience 1 // Do these rules first (optional, for performance) when MinMaxContractLine(contractLineType == ContractLineType.TOTAL_WORKING_WEEKENDS_IN_FOUR_WEEKS, enabled == true, $contract : contract) $employee : Employee(contract == $contract) WorkingWeekend(employee == $employee, $week: week) $workingWeekendTotal : Number() from accumulate( $workingWeekend : WorkingWeekend(employee == $employee, week = $week, week-$week 3 ), count($workingWeekend) ) then insertLogical(new WorkingWeekendTotalFourWeeks($employee, $workingWeekendTotal.intValue(), $week)); end // Maximum working weekends in four weeks rule maxWorkingWeekendsInFourWeeks when $contractLine : MinMaxContractLine( contractLineType == ContractLineType.TOTAL_WORKING_WEEKENDS_IN_FOUR_WEEKS, maximumEnabled == true, $contract : contract, $maximumValue : maximumValue ) $employee : Employee(contract == $contract) WorkingWeekendTotalFourWeeks(employeeContract == $contract, total $maximumValue, employee==$employee, $total : total, $week : week) then insertLogical(new IntConstraintOccurrence(maxWorkingWeekendsInFourWeeks, ConstraintType.NEGATIVE_SOFT, ($total - $maximumValue) * $contractLine.getMaximumWeight(), $employee, $week)); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools Expert does not sort integers correctly
I am new to Drools and am trying to get the sample program to work. This sample is given in the drools documentation http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/index.html#d0e9542. This drool rule is expected to sort integers. I just changed the numbers from what are given in the sample and they do not get sorted as expected. Tried using drools version 5.5.0, 5.5.1 and the master 6.0.0, but got the same wrong results. Following is the main code: package com.sample; public class Example2 { public static void main(String[] args) throws Exception { Number[] numbers = new Number[] { wrap(5), wrap(6), wrap(4), wrap(1), wrap(2) }; new RuleRunner().runRules(new String[] { Example3.drl }, numbers); } private static Integer wrap(int i) { return new Integer(i); } } The RuleRunner class is the same as given in the example and I do not think I should give that here, since it will clutter the question. It simply creates the KnowledgeBase, stateful session, inserts the facts as given in the 'numbers' array above and then calls fireAllRules method on the session. The rule file (Example3.drl) is: rule Rule 04 dialect mvel when $number : Number() not Number(intValue $number.intValue) then System.out.println(Number found with value: + $number.intValue()); retract($number); end The output I get is as follows: Loading file: Example3.drl Inserting fact: 5 Inserting fact: 6 Inserting fact: 4 Inserting fact: 1 Inserting fact: 2 Number found with value: 1 Number found with value: 4 Number found with value: 2 Number found with value: 5 Number found with value: 6 Not the correct expected ascending sorted order. What might I be doing wrong? I cannot imagine that the drools rule engine would be broken at this basic level. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Expert-does-not-sort-integers-correctly-tp4021606.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] Rules Unit Testing
How is unit testing handled for rules? I'm playing with the nurse rostering app and the only test I see is a performance test. -John ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] factorize rules
Hello, I am trying to make my rules more readable and wonder wether or not we can factorize rules for a particular ruleflow-group. As an example, I would like to convert this: // begin rules rule Rule 1 ruleflow-group work when condition 0 condition1 then doSomething(); rule Rule 2 ruleflow-group work when condition0 condition2 then doSomethingElse(); // end rules to the following // begin rules pre_conditions_for_rules ruleflow-group work condition0 rule Rule 1 ruleflow-group work when condition1 then doSomething(); end rule Rule 2 ruleflow-group work when condition2 then doSomethingElse(); end // end rules Thank you for your time. I apologize in advance if that does not make sense, as I am new to drools John ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] DSL Build Problem
I'm looking for a little help on a problem we can't figure out with some DSL errors during a build. We're working with version 5.3.0.Final on RSA 7.5.5. The offending line of DSL is on the rule is: Write qualifyingPoints on Result as $var01 * $var02 $var01 and $var02 are variables set in the WHEN part of this rule. The offending line of code is translating to: modify (Result){qualifyingPoints = $var01 * $var02}; When I execute the program that calls this rule, if fails during the build process with the following: Unable to Analyse Expression @Modify with (Result){qualifyingPoints = $var01 * $var02 }; [Error: java/lang/String.isEmpty()Z] [Near : {... @Modify with (Result){qualifyingPt }] ^ [Line: 1, Column: 9] : [Rule name=Qualifying Points rule 1'] If I modify the code to use an assignment and update instead of modify, it will build without an error: Result.setQualifyingPoints( $var01 * $var02 );update (Result); Note that we only see this behavior on RSA. We do not see it on Eclipse (but we need to use RSA). I didn't find anything online so I thought I'd check to see if this is something someone has seen before. Thanks! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 5.3.0.Final throws RuntimeDroolsException: Unable to merge resource attribute for type declaration
Edson, Thanks for your feedback. I've have created an eclipse/maven project to duplicate this problem but I couldn't figure out how to open an issue in Jira (perhaps I don't have permission). If I include all the dependent libraries in a zip file (for convenience) the zip will be 7MB (which might not be so convenient after all). Please let me know how I can open a new issue in Jira and/or how best to deliver this project to you. John From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli Sent: Friday, December 09, 2011 5:34 PM To: Rules Users List Subject: Re: [rules-users] 5.3.0.Final throws RuntimeDroolsException: Unable to merge resource attribute for type declaration Looks like a bug in the merging algorithm for types. Can any of you please open a JIRA with a small test case and/or instructions on how to reproduce plz? Thank you, Edson On Fri, Dec 9, 2011 at 6:34 PM, jmgreen john.gr...@hp.commailto:john.gr...@hp.com wrote: I was able to work around this problem by filtering out the KnowledgePackage containing my NormalizedEvent. In Drools 5.2.0 there was no problem adding this KnowledgePackage multiple times but apparently 5.3.0 doesn't cope with it well. I'm still not sure if that is a feature or a defect in 5.3.0. In any event doing the following make the exception go away. I'm still curious if this is a feature or a defect in 5.3.0. Any thoughts or opinions regarding are welcome. String globals = readDrlfile(globals.drl); String newRules = readDrlfile(rulesToAdd.drl); knowledgeBuilder.add(ResourceFactory.newReaderResource(new StringReader(globals + newRules))); if (knowledgeBuilder.hasErrors()) { throw exception ... } // No exception so compile succeeded --- BTW, it's using JANINO CollectionKnowledgePackage pkgs = knowledgeBuilder.getKnowledgePackages(); pkgs=filterOutAnyPackageThatHasNoRulesAndNameMatchingNormalizeEventPackageName(pkgs); knowledgeBase.addKnowledgePackages(pkgs); // NO ERROR ANYMORE -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-5-3-0-Final-throws-RuntimeDroolsException-Unable-to-merge-resource-attribute-for-type-den-tp3573815p3574420.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.orgmailto: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.comhttp://www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Stateless session in drools server keeping classes around?
Are you using // clean up after session ksession.dispose(); We had the same symptoms before we started using dispose() to clean up the session. Good luck, John Perrin -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of dunnlow Sent: Tuesday, December 13, 2011 1:05 PM To: rules-users@lists.jboss.org Subject: [rules-users] Stateless session in drools server keeping classes around? Hi, I'm using drolls 5.3 server with one rule in a _stateless_ session. I am sending a POJO to the server, having it check a few attributes, modify the attributes of the bean as needed then return the result. I have this working and get back an execution results object like I need. The problem is that when I send the batch execution command to the server a number of classes stick around with each call (as shown in jconsole). Memory grows with each call until I run out. (I see garbage collection taking place so that doesnt seem to be the problem - and if I stop sending events to the server, the memory is never returned). I figured with a stateless session I wouldnt need to worry about this, anyone have thoughts about why this is happening? I am trying to do this quickly, and don't want to call dispose/retract (the whole reason I'm using stateless). knowledge-services.xml: drools:ksession id=ksession1 type=stateless kbase=kbase1 node=node1/ my code that builds the command: list cmds = new arraylist InsertObjectCommand icmd = CommandFactory.newInsert(myBean) icmd.setOutIdentifier(inserter) icmd.setEntryPoint(DEFAULT) cmds.add(icmd) FileAllRulesCommand farc = new FileAllRulesCommand() cmds.add(fileAllRulesCommand) BatchExecutionCommand command = CommandFactory.newBatchExecution(cmds,ksession1) .. As an aside, I also looked into setting the sequential mode to true to see if that helps, but am still trying to figure out how to configure that via Spring. Thanks for any insight, -j -- View this message in context: http://drools.46999.n3.nabble.com/Stateless-session-in-drools-server-keeping-classes-around-tp3583282p3583282.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 *** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] 5.3.0.Final throws RuntimeDroolsException: Unable to merge resource attribute for type declaration
I'm not very experienced with Drools but have some Java code that dynamically loads/unloads rules from a KnowledgeBase. It worked with 5.2 but now throws the following exception with 5.3 org.drools.RuntimeDroolsException: Unable to merge resource attribute for type declaration of class: 'NormalizedEvent' at org.drools.common.AbstractRuleBase.mergeLeft(AbstractRuleBase.java:642) at org.drools.common.AbstractRuleBase.mergeTypeDeclarations(AbstractRuleBase.java:608) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:537) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:458) at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150) at com.hp.mon.processor.KnowledgeSessionFactory.addRules(KnowledgeSessionFactory.java:181) at com.hp.mon.processor.RuleRunner.runRules(RuleRunner.java:54) at com.hp.mon.processor.RulesTest.test(RulesTest.java:57) at com.hp.mon.processor.RulesTest.testSiteScopeSNMPRules(RulesTest.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) I have three .drl files. The first is globals.drl that simply imports and defines some global variables (e.g, a org.slf4j.Logger, etc.). This globals.drl file also defines NormalizedEvent as follows: declare NormalizedEvent @role( event ) end The second rules file (defaultRules.drl) contains default rules for aging out old / stale events. The third rules file has rules additional rules that are specific to a policy being dynamically deployed to our application. The compilation and loading process treats globals.drl as common header file. That is, rules files are pre-pended with globals.drl before they are compiled. For example: String globals = readDrlfile(globals.drl); String newRules = readDrlfile(rulesToAdd.drl); knowledgeBuilder.add(ResourceFactory.newReaderResource(new StringReader(globals + newRules))); if (knowledgeBuilder.hasErrors()) { throw exception ... } // No exception so compile succeeded --- BTW, it's using JANINO knowledgeBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages()); // ERROR The first compile and load (globals.drl + defaultRules.drl) succeeds but I get this exception when I try to compile and load an additional file (globals.drl + additionalRules.drl). This code was also written by someone not very familar with Drools but it was working in 5.2 and now I need to get it working with 5.3Looks like there were some significant code changes to AbstractRuleBase between these two releases. Any thoughts or suggestion here would be greatly appreciated. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Question about JBoss Enterprise BRMS Platform 5.2
Does purchased support for BRMS include support for jBPM? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Guvnor -- Not seeing Model Correctly
Thanks for the advice Mike. I did a quick read of the user manual and was able to setup a rule based on some of the fields I created in the POJO. My next thing to try was to test a rule. So thru Guvnor I setup a Test Scenario. When I click the Run Scenario I get a [package configuration problem]Error importing : Vehicle error. Any ideas? From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Michael Anstis Sent: Sunday, October 16, 2011 3:06 AM To: Rules Users List Subject: Re: [rules-users] Drools Guvnor -- Not seeing Model Correctly Hi, You can create two types of Model I'm Guvnor: 1) a declarative model, in which case you can open the model and see the facts and fields; 2) upload a POJO model, in which case the model screen only allows you to download the current version. When authoring rules in Guvnor you select a Fact (class) first and then click on this to select fields. By what you describe I get the feeling you may not have read Guvnor's user-guide. Please do have a look. With kind regards, Mike sent on the move On 16 Oct 2011 03:07, johnz jz...@plymouthrock.commailto:jz...@plymouthrock.com wrote: I'm new to Drools. Want to play with Guvnor to see if it will be applicable for my application. I have Guvnor running thru Eclipse/Jboss. I can get into Guvnor and create categories and packages. I create a real simple domain model (see below). I then upload the jar file to create a model in Guvnor. After uploading i don't see anything appear on the model tab. i was expecting to see the classes and attributes. when i try creating a new rule using the model i only see the class, but don't see any of the attributes. what am i doing wrong? here is the code for the domain model public class Driver { private String name; private int age; private Vehicle car; public Driver() {} public Driver(String name, int age, Vehicle car) { this.namehttp://this.name = name; this.age = age; this.car = car; } public String getName() { return name; } public void setName(String name) { this.namehttp://this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Vehicle getCar() { return car; } public void setCar(Vehicle car) { this.car = car; } } public class Vehicle { private Long id; private String make; private String model; private String VIN; private String damageType; public Vehicle() { } public Vehicle(Long id, String make, String model, String VIN, String damageType) { this.idhttp://this.id = id; this.make = make; this.model = model; this.VIN = VIN; this.damageType = damageType; } public Long getId() { return id; } public void setId(Long id) { this.idhttp://this.id = id; } public String getMake() { return make; } public void setMake(String make) { this.make = make; } public String getModel() { return model; } public void setModel(String model) { this.model = model; } public String getVIN() { return VIN; } public void setVIN(String vIN) { VIN = vIN; } public String getDamageType() { return damageType; } public void setDamageType(String damageType) { this.damageType = damageType; } } -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-Not-seeing-Model-Correctly-tp3425245p3425245.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.orgmailto: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] Are retracted events garbage collected in stateful session?
I am inserting a high volume of relatively large objects into a long-running StatefulKnowledgeSession in Stream mode. I use a rule to start a jbpm process when each event is received, and the last step retracts the event. I assumed these were all being garbage collected until my app server started running out of memory. I ran a profiler and saw that none of my event objects were ever collected. Is there any way of freeing references without disposing the working memory? This is not a good option for our app. I have read this post http://drools.46999.n3.nabble.com/Removing-facts-from-statefulknowledgeSession-s-memory-td1875795.html#a1881799 Removing-facts-from-statefulknowledgeSession-s-memory and several others, but my objects are all manually retracted. I just need to make them available for garbage collection. I am running drools 5.2.0 Final, guvnor 5.2.0 Final, and jbpm 5.1.0 Final and I am using the BusinessRulesProcessor action in jboss to insert events. Thanks, John -- View this message in context: http://drools.46999.n3.nabble.com/Are-retracted-events-garbage-collected-in-stateful-session-tp3393695p3393695.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.2.0 (Final) under Geronimo 2.1.4
Guvnor 5.2.0 (Final) Hello I need to get Guvnor 5.2.0 (Final) up and running under Geronimo 2.1.4 (Tomcat6 variant). Have started looking at this and have already found that there are class loading/conflict issues as the container utilises xstream 1.2.2 and the Guvnor requires 1.3.1. There are probably a whole host of other issues. Has anyone used the Guvnor under Geronimo? Any tips on getting this working much appreciated. Cheers John -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-2-0-Final-under-Geronimo-2-1-4-tp3339480p3339480.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] Call a Drools application
Are the drools libs also in the classpath of your application when you run it externally as they appear to be when you run in eclipse? -- View this message in context: http://drools.46999.n3.nabble.com/Call-a-Drools-application-tp3332048p138.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] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total
Ah Okay, That kind of makes sense, although I can't seem to find any documentation on how to merge the condition column, i.e. to have to parameters in one column: Tried this to no avail (using the , as the implicit AND) Payment value $param1, value = $param2 Payment In Range 0, 1500 1500, 2000 2000, 3000 3000, 4000 4000, 5000 5000, 1 1, 15000 15000, 2 2 On Mon, Sep 12, 2011 at 8:21 AM, Swindells, Thomas [via Drools] ml-node+s46999n3328970...@n3.nabble.com wrote: If you dump out the xml it converts the spreadsheet to you can see what the resulting DRL is. Mantis is right in what the output is – if you don’t merge the condition column you’ll get a drl as below (If there exists a Condition (c1) such that its payment $param(1) AND there exists a Condition (c2) such that its payment = $param(2). If you merge the condition column the constraints apply to the same Condition object with the comma being the implicit and (if there exists a Condition c1 such that its payment $param(1) AND its payment = $param(2). ** ** Thomas ** ** *From:* [hidden email]http://user/SendEmail.jtp?type=nodenode=3328970i=0[mailto:[hidden email] http://user/SendEmail.jtp?type=nodenode=3328970i=1] *On Behalf Of *john@oa *Sent:* 09 September 2011 16:28 *To:* [hidden email]http://user/SendEmail.jtp?type=nodenode=3328970i=2 *Subject:* Re: [rules-users] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total ** ** Thanks Manstis Actually I found that the issue was caused by me having incorrectly placed the RuleTable statement in the spreadsheet, I believe the CONDITION's in the columns are by default: AND joined. On Fri, Sep 9, 2011 at 3:57 PM, manstis [via Drools] [hidden email]http://user/SendEmail.jtp?type=nodenode=3323194i=0 wrote: Does your Condition span the two columns with the payment $param? e.g. | Condition | |-+--| |payment $param | payment = $param| |-+--| Otherwise you are creating rules that check the following:- when Condition(payment ) then ... when Condition(payment 1000) then ... Whereas you really require:- when Condition(payment 0, payment = 1000) then ... etc 2011/9/9 john@oa [hidden email]http://user/SendEmail.jtp?type=nodenode=3323110i=0 Thanks Iaune That is really helpful. Yes, I need the ranges to be mutually exclusive, what is the easiest way to do that? Feel a bit cheeky asking another question, but you seem to know what you are talking about! I have tried adding two conditions to enforce the range, but that doesn't seem to work - see below. I still get multiple rules firing. Also can you recommend any good resources for learning all of this, apart from the online documentation? Would you know if any of the Drools books are any good?*** * payment $param payment = $param Payment Greater Than Payment Less Than or Equal To 0 0 1500 1500 2000 2000 3000 3000 4000 ** ** On Fri, Sep 9, 2011 at 2:22 PM, laune [via Drools] [hidden email]http://user/SendEmail.jtp?type=nodenode=3323074i=0 wrote: The error you get is due to the second condition (application: Application()) not being included in the generated rules. Empty cell means: the column's snippet is not included in the rule. Since you don't have a constraint for Application() you can employ a trick: remove the column and prefix the text application: Application() to the text in cell C7. In Rule 1, do you really want to test whether a payment is not greater than zero? Do you realize that Rules 2 and 3 would both fire for certain payment amounts? You can update a String field. To concatenate, use x.setString( x.getString() + whatever ); -W On 9 September 2011 14:08, john@oa [hidden email]http://user/SendEmail.jtp?type=nodenode=3322896i=0 wrote: Guvnor: guvnor-5.2.0.Final-tomcat-6.0 Hi I am a Drools Newbie and I have an integer field called score that I need to add to when a rule matches in a spreadsheet decision table. i.e. the score field should hold a running total of all scores that are matched. However, I can't even update the field in the table. I have attached the spreadsheet for review. In this spreadsheet I am simply trying to set the score, and that is failing with: DScoringTable] Rule Compilation error application cannot be resolved My goal is to have different decision tables that will all need to update the same score, and keep a running total of the total score. Any help very much appreciated! I hope that I am just missing something obvious. http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls demo-score-sheet.xls In future I may wish to also update a String field and keep concatenating to that field
[rules-users] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total
Guvnor: guvnor-5.2.0.Final-tomcat-6.0 Hi I am a Drools Newbie and I have an integer field called score that I need to add to when a rule matches in a spreadsheet decision table. i.e. the score field should hold a running total of all scores that are matched. However, I can't even update the field in the table. I have attached the spreadsheet for review. In this spreadsheet I am simply trying to set the score, and that is failing with: DScoringTable] Rule Compilation error application cannot be resolved My goal is to have different decision tables that will all need to update the same score, and keep a running total of the total score. Any help very much appreciated! I hope that I am just missing something obvious. http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls demo-score-sheet.xls In future I may wish to also update a String field and keep concatenating to that field, is this possible? John -- View this message in context: http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322713.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] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total
Thanks Iaune That is really helpful. Yes, I need the ranges to be mutually exclusive, what is the easiest way to do that? Feel a bit cheeky asking another question, but you seem to know what you are talking about! I have tried adding two conditions to enforce the range, but that doesn't seem to work - see below. I still get multiple rules firing. Also can you recommend any good resources for learning all of this, apart from the online documentation? Would you know if any of the Drools books are any good? payment $param payment = $param Payment Greater Than Payment Less Than or Equal To 0 0 1500 1500 2000 2000 3000 3000 4000 On Fri, Sep 9, 2011 at 2:22 PM, laune [via Drools] ml-node+s46999n3322896...@n3.nabble.com wrote: The error you get is due to the second condition (application: Application()) not being included in the generated rules. Empty cell means: the column's snippet is not included in the rule. Since you don't have a constraint for Application() you can employ a trick: remove the column and prefix the text application: Application() to the text in cell C7. In Rule 1, do you really want to test whether a payment is not greater than zero? Do you realize that Rules 2 and 3 would both fire for certain payment amounts? You can update a String field. To concatenate, use x.setString( x.getString() + whatever ); -W On 9 September 2011 14:08, john@oa [hidden email]http://user/SendEmail.jtp?type=nodenode=3322896i=0 wrote: Guvnor: guvnor-5.2.0.Final-tomcat-6.0 Hi I am a Drools Newbie and I have an integer field called score that I need to add to when a rule matches in a spreadsheet decision table. i.e. the score field should hold a running total of all scores that are matched. However, I can't even update the field in the table. I have attached the spreadsheet for review. In this spreadsheet I am simply trying to set the score, and that is failing with: DScoringTable] Rule Compilation error application cannot be resolved My goal is to have different decision tables that will all need to update the same score, and keep a running total of the total score. Any help very much appreciated! I hope that I am just missing something obvious. http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls demo-score-sheet.xlshttp://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls%0Ademo-score-sheet.xls In future I may wish to also update a String field and keep concatenating to that field, is this possible? John -- View this message in context: http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322713.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=3322896i=1 https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=3322896i=2 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/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322896.html To unsubscribe from Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total, click herehttp://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3322713code=am9obkBvcGVuYXNwZWN0LmNvLnVrfDMzMjI3MTN8LTIwOTQyNzQ4ODU=. -- View this message in context: http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3323074.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] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total
Thanks Manstis Actually I found that the issue was caused by me having incorrectly placed the RuleTable statement in the spreadsheet, I believe the CONDITION's in the columns are by default: AND joined. On Fri, Sep 9, 2011 at 3:57 PM, manstis [via Drools] ml-node+s46999n3323110...@n3.nabble.com wrote: Does your Condition span the two columns with the payment $param? e.g. | Condition | |-+--| |payment $param | payment = $param| |-+--| Otherwise you are creating rules that check the following:- when Condition(payment ) then ... when Condition(payment 1000) then ... Whereas you really require:- when Condition(payment 0, payment = 1000) then ... etc 2011/9/9 john@oa [hidden email]http://user/SendEmail.jtp?type=nodenode=3323110i=0 Thanks Iaune That is really helpful. Yes, I need the ranges to be mutually exclusive, what is the easiest way to do that? Feel a bit cheeky asking another question, but you seem to know what you are talking about! I have tried adding two conditions to enforce the range, but that doesn't seem to work - see below. I still get multiple rules firing. Also can you recommend any good resources for learning all of this, apart from the online documentation? Would you know if any of the Drools books are any good? payment $param payment = $param Payment Greater Than Payment Less Than or Equal To 0 0 1500 1500 2000 2000 3000 3000 4000 On Fri, Sep 9, 2011 at 2:22 PM, laune [via Drools] [hidden email]http://user/SendEmail.jtp?type=nodenode=3323074i=0 wrote: The error you get is due to the second condition (application: Application()) not being included in the generated rules. Empty cell means: the column's snippet is not included in the rule. Since you don't have a constraint for Application() you can employ a trick: remove the column and prefix the text application: Application() to the text in cell C7. In Rule 1, do you really want to test whether a payment is not greater than zero? Do you realize that Rules 2 and 3 would both fire for certain payment amounts? You can update a String field. To concatenate, use x.setString( x.getString() + whatever ); -W On 9 September 2011 14:08, john@oa [hidden email]http://user/SendEmail.jtp?type=nodenode=3322896i=0 wrote: Guvnor: guvnor-5.2.0.Final-tomcat-6.0 Hi I am a Drools Newbie and I have an integer field called score that I need to add to when a rule matches in a spreadsheet decision table. i.e. the score field should hold a running total of all scores that are matched. However, I can't even update the field in the table. I have attached the spreadsheet for review. In this spreadsheet I am simply trying to set the score, and that is failing with: DScoringTable] Rule Compilation error application cannot be resolved My goal is to have different decision tables that will all need to update the same score, and keep a running total of the total score. Any help very much appreciated! I hope that I am just missing something obvious. http://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls demo-score-sheet.xlshttp://drools.46999.n3.nabble.com/file/n3322713/demo-score-sheet.xls%0Ademo-score-sheet.xls In future I may wish to also update a String field and keep concatenating to that field, is this possible? John -- View this message in context: http://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322713.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=3322896i=1 https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=3322896i=2 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/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3322896.html To unsubscribe from Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running total, click here. -- View this message in context: Re: [rules-users] Spreadsheet: Rule Compilation error (xxx) cannot be resolved: Keeping running totalhttp://drools.46999.n3.nabble.com/Spreadsheet-Rule-Compilation-error-xxx-cannot-be-resolved-Keeping-running-total-tp3322713p3323074.html Sent from the Drools: User forum mailing list archivehttp://drools.46999.n3.nabble.com/Drools-User-forum-f47000.htmlat Nabble.com. ___ rules-users mailing
[rules-users] Unable to get WebDav Access, unless modify JackRabbit Config
Relates to webdav management of rules under: guvnor-5.2.0.Final-tomcat-6.0 Hi For rapid development, I wish to directly manage the repository through WebDav. I can successfully navigate the repository using BitKinex 3.2.3 or Windows 7 web folders. However, I cannot create or edit .drl files. When I do this I receive an ERROR in the Tomcat console (see error below this post). I have tried to authenticate with: -no authentication details - with the 'guest' user - the 'anonymous' user - and the 'admin' user. I have managed to enable WebDav editing of the repository .drl file's by updating the JackRabbit configuration of the Tomcat server and changing the anonymous user to have an id of 'guest' (in Tomcat's repository.xml file - see below). *However*, when I do this Drools Guvnor can no longer edit or view Rules. Any help much appreciated! ERROR received on edit: * at java.lang.Thread.run(Thread.java:662) ERROR 07-09 18:41:29,280 (WebDavServletBean.java:service:154)Exception: org. drools.repository.RulesRepositoryException: javax.jcr.AccessDeniedException: Acc ess denied at org.drools.repository.VersionableItem.checkout(VersionableItem.java:5 61) at org.drools.repository.VersionableItem.checkout(VersionableItem.java:5 31) at org.drools.repository.AssetItem.updateBinaryContentAttachment(AssetIt em.java:405) at org.drools.guvnor.server.files.WebDAVImpl.setResourceContent(WebDAVIm pl.java:712) at net.sf.webdav.methods.DoPut.execute(DoPut.java:152) at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128) at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.ja va:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42) at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHtt pServletRequest.java:53) at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j JackRabbit configuration with guest user: *** LoginModule class=org.apache.jackrabbit.core.security.simple.SimpleLoginModule /LoginModule -- -- View this message in context: http://drools.46999.n3.nabble.com/Unable-to-get-WebDav-Access-unless-modify-JackRabbit-Config-tp3317488p3317488.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 does not like my rule?
Noob alert, first post. I have a rule that works fine when I run it in a JUnit test. I've imported it into Guvnor (along with all my referenced pojos and functions) and it will not build there. Here is the error: Unable to Analyse Expression for (String curr : (ListString) $validList) { ValidValue aValidVal = new ValidValue(curr); drools.insert(aValidVal); }; for (int i=0; i$validList.size(); i++) { String curr = (String)$validList.get(i); ValidValue aValidVal = new ValidValue(curr); drools.insert(aValidVal); };: [Error: unexpected token: $validList] [Near : {... rr : (ListString) $validList) { }] ^ [Line: 1, Column: 35] What the rules is trying to do is run values from a set of records through a validation function and then add each of the valid values as individual facts. Guvnor apparently doesn't like the way the iteration of the list is being done. I've tried a few different ways of iteration. Thanks in advance for any advice. Here is the rule: when $validList : List() from accumulate( InRecord($value : value != ), ListValid($value)) then for (String curr : (ListString) $validList) { ValidValue aValidVal = new ValidValue(curr); insert(aValidVal); } for (int i=0; i$validList.size(); i++) { String curr = (String)$validList.get(i); ValidValue aValidVal = new ValidValue(curr); insert(aValidVal); } Regards, John Perrin *** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Error in Guvnor with Enumerations (5.1.1)
Reposting since I didn't get any takers. I'm hoping it might have been because I sent it to the list on a Friday afternoon (2 weeks ago). Hey, I'm trying to utilize a load method for Guvnor, but I can't seem to get it working. His is my DataHelper class (modeling it off the documentation): package com.enumerations; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class DataHelper { public ListString getQuestionNumberList(){ ArrayList returnList = new ArrayList(); Iterator it = com.enumerations.DroolsTest.questionList.iterator(); while (it.hasNext()){ QuestionAndAnswer qAndA = (QuestionAndAnswer)it.next(); if (!returnList.contains(qAndA.getQuestionNumber())){ returnList.add((String)qAndA.getQuestionNumber()); } } return (ListString)returnList; } } I've placed this (both as a .jar and .class file) in my JBoss installation under \jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-INF\classes\com\enumerations. Using this syntax as an enumeration in Guvnor: 'QuestionAndAnswer.questionNumber' : (new com.enumerations.DataHelper()).getQuestionNumberList() I get the following errors: [Enumerations] Unable to load enumeration data. [Enumerations] [Error: failed to access property: getQuestionNumberList(): [Error: unable to invoke method: getQuestionNumberList] [Near : {... Unknown }] ^[Line: 1, Column: 0]][Near : {... r()).getQuestionNumberList() }] ^ [Line: 1, Column: 0] [Enumerations] Error type: org.mvel2.PropertyAccessException I am using Drools 5.1.1. Does anyone have any suggestions on what to do to correct this error? jp ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Error in Guvnor with Enumerations (5.1.1)
Hi, I'm trying to utilize a load method for Guvnor, but I can't seem to get it working. His is my DataHelper class (modeling it off the documentation): package com.enumerations; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class DataHelper { public ListString getQuestionNumberList(){ ArrayList returnList = new ArrayList(); Iterator it = com.enumerations.DroolsTest.questionList.iterator(); while (it.hasNext()){ QuestionAndAnswer qAndA = (QuestionAndAnswer)it.next(); if (!returnList.contains(qAndA.getQuestionNumber())){ returnList.add((String)qAndA.getQuestionNumber()); } } return (ListString)returnList; } } I've placed this (both as a .jar and .class file) in my JBoss installation under \jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-INF\classes\com\enumerations. Using this syntax as an enumeration in Guvnor: 'QuestionAndAnswer.questionNumber' : (new com.enumerations.DataHelper()).getQuestionNumberList() I get the following errors: [Enumerations] Unable to load enumeration data. [Enumerations] [Error: failed to access property: getQuestionNumberList(): [Error: unable to invoke method: getQuestionNumberList] [Near : {... Unknown }] ^[Line: 1, Column: 0]][Near : {... r()).getQuestionNumberList() }] ^ [Line: 1, Column: 0] [Enumerations] Error type: org.mvel2.PropertyAccessException I am using Drools 5.1.1. Does anyone have any suggestions on what to do to correct this error? jp ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] UI for Rule Engine
http://www.plugtree.com/guvnor-embed-asset%E2%80%99s-editor-in-your-application/ http://www.plugtree.com/guvnor-embed-asset%E2%80%99s-editor-in-your-application/ -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-UI-for-Rule-Engine-tp3241833p3242290.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] Guvnor - Unable to load a required class !! Help
Is com.employee.Fire listed in the Configuration: Imported types box on the main screen for your package in Guvnor? -John -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Guvnor-Unable-to-load-a-required-class-Help-tp3230887p3236720.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] Not able to get the knowledgeBase from web application
jilani, i believe this is the same situation you're running into: http://community.jboss.org/thread/164735 http://community.jboss.org/thread/164735 -John -- View this message in context: http://drools.46999.n3.nabble.com/Not-able-to-get-the-knowledgeBase-from-web-application-tp3200741p3216586.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] Not able to get the knowledgeBase from web application
I think what got me past this was configuring my ruleAgent.properties file to point to a local ChangeSet.xml rather than the ChangeSet.xml in the guvnor package. -- View this message in context: http://drools.46999.n3.nabble.com/Not-able-to-get-the-knowledgeBase-from-web-application-tp3200741p3216600.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] NPE on fact insertion if rule has sliding window
Interesting... I have no idea why the KnowledgeBuilder would compile the DRL differently than the KnowledgeAgent, but I don't think I had this problem in 5.1.1. I'm up and running now with the type fully declared in DRL and I can live with that. Thanks for looking into this. -- View this message in context: http://drools.46999.n3.nabble.com/NPE-on-fact-insertion-if-rule-has-sliding-window-tp3163261p3166323.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] Why is Drools called Drools?
This is something I get asked on a semi-regular basis and I don't have a good answer for it, so I thought I'd post it to the mailing list and hope someone can tell the story. Is there anyone out there who can explain how the name Drools was settled on? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Rule Flow and Stateless Session
I'm having some difficulty getting a rule flow with a stateless session to work. Essentially, it is just executing the first task and then stops. I'm using Drools 5.1.1 and I just built the sample Drools by creating a new Drools Project. My rule flow is simple: Start-RuleGroup1-RuleGroup2-End I use the 2 rules from example, putting the Hello World in RuleGroup1 and Goodbye in RuleGroup2. Here's my code to run it: // load up the knowledge base KnowledgeBase kbase = readKnowledgeBase(); StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(); KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, test); // start a new process instance Message message = new Message(); message.setMessage(Hello World); message.setStatus(Message.HELLO); ArrayList cmds = new ArrayList(); ArrayList dataList = new ArrayList(); dataList.add(message); cmds.add(CommandFactory.newInsertElements(dataList)); cmds.add(CommandFactory.newStartProcess(com.sample.ruleflow)); ksession.execute(CommandFactory.newBatchExecution(cmds)); logger.close(); When I run the rules, all I get is Hello World (no Goodbye cruel world). It does work with a Stateful Session using insert, startProcess, and fireAllRules, but this is a test using the rule flows with CommandFactory functionality, something we need for an application we are developing. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Problems with Drools 5.2.0.M1 and IE7?
Has anyone experienced problems running with the graphic layout of Guvnor with Drools 5.2.0.M1 on Internet Explorer 7? It appears to be okay with IE8. Thanks. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] help! the field *** is not visible
Try adding 'dialect mvel' (no single quotes) after the rule name to the top of each of the rules. I have seen this error before and doing this resolved the issue. hello,everyone!I wrote a rule with Drools,but the error told me that the field Server.Message is not visible, I can't find how it happens. Please help me, I am almost exhausted with it. thank you. the rules are as follows: package com.sample import com.sample.Server; rule system will execute 'tc' command when eval(Server.Message8388608) then System.out.println(The network is so crowd that it needs repairing.); Runtime.getRuntime().exec(tc);#execute the tc command end rule caution when eval(Server.Message==8388608) then System.out.println(caution!The network maybe will get blocked very soon.); end rule fluent network when eval(Server.Message8388608)#conditions then System.out.println(the current network is very good); #actions end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Existing Test Harnesses for Drools?
I was wondering if anyone out there is aware of any Test Harnesses that could be used for regression testing Drools applications out there? We found this spreadsheet tester from Michael Neale: https://github.com/michaelneale/rule-spreadsheet-tester/#readme Are there any others? Thanks! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor
Hi all, I had (hopefully) a quick question about trying to test rules in rule flows in Guvnor with Drools 5.1.1. I have a simple 4 step rule flow (Start-RuleGroup1-RuleGroup2-End) with 1 rule in each Rule group. When I set up the test scenario to fire the first rule, which will trigger the second rule, activate RuleGroup1, and run the scenario, it doesn't trigger the RuleFlow and fire the rule. I've also tried activating Start instead, but neither of them trigger the RuleFlow. I know from experience that Rule Flows don't seem to work with 5.0, but with the addition of the entry options, I thought they would with 5.1.1. Am I mistaken? Also, when I look at the Audit Log, I see the Rule Flow activated and deactivated before any of the facts are asserted: BEFORE RULEFLOW GROUP ACTIVATED group:Start[size=0] AFTER RULEFLOW GROUP ACTIVATED group:Start[size=0] BEFORE RULEFLOW GROUP DEACTIVATED group:Start[size=0] AFTER RULEFLOW GROUP DEACTIVATED group:Start[size=0] OBJECT ASSERTED value:com.test.Game@47244724 factId: 1 OBJECT ASSERTED value:com.test.Customer@4c584c58 factId: 2 Could this be part of the problem? Thanks! inline: Picture (Device Independent Bitmap) 1.jpginline: Picture (Device Independent Bitmap) 2.jpginline: Picture (Device Independent Bitmap) 3.jpginline: Picture (Device Independent Bitmap) 4.jpginline: Picture (Device Independent Bitmap) 5.jpginline: Picture (Device Independent Bitmap) 6.jpg___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problems with Guided Rule Editor in Eclipse
Thanks for the response, Vincent. Do you happen to have a link to the URL for the JIRA? I was looking for it, but haven't found it yet. It would seem to me that this is basic functionality. It sounds, from your response, that BRL is just not the focus. jp Date: Wed, 16 Mar 2011 12:17:02 +0100 From: Vincent Legendre vincent.legen...@eurodecision.com Subject: Re: [rules-users] Problems with Guided Rule Editor in Eclipse To: Rules Users List rules-users@lists.jboss.org Message-ID: 4d809c2e.4070...@eurodecision.com Content-Type: text/plain; charset=iso-8859-1 I have the same problem with BRL editor under eclipse. Also the action part dialog box does not show DSL phrases ... The plugin is incomplete/buggy and shows errors but rules are correct (you can compile and run them). This problem is the same since version 5.0. There is a JIRA for that since then ... I don't know when a fix is planned, but my feeling is that nobody uses the guided editor under eclipse (dsrl editor works well and provide completions on facts and DSL sentences). But it is not easy when you have rules that comes from Guvnor ... Le 15/03/2011 20:47, John Peterson a ?crit : I am experimenting with the Guided Rule Editor in Eclipse, but I am unable to get a Guided Rule to parse. I have created a Drools Project using the basic Hello World example for starters. I've created a class called Item with 3 attributes -- itemPrice (float), ItemNumber (int), and itemDescription (String) with getters/setters. I do a New-Drools-Guided Rule to create a .brl file called GuidedRule.brl and get the drools.package created automatically. In drools.package, I add package com.sample; and import com.sample.Item; and save it. Then I go over to GuidedRule.brl and create a simple rule in the guided editor (this is the DRL view of it): rule GuidedRule dialect mvel when item : Item() then item.setItemDescription(New Description); end When I click save I get errors. On the Generated drl (read only), I get two problems - BuildError: Unable to build expression for 'consequence': Failed to compile: 2 compilation error(s): - (1,4) unqualified type in strict mode for: item - (1,44) unable to resolve method using strict-mode: java.lang.Object.setItemDescription(java.lang.String) ' item.setItemDescription( New Description );' On the brl source view, I get an error at the attributes - BuildError: Unable to resolve ObjectType 'Item' It seems to not be able to see my class, which is public, belonging to the same package, and included as an import in drools.package. I can get the rule to work if I don't reference Item (simple eval(true) in the LHS, for example) I am running Drools 5.1.1 on Eclipse 3.5. Am I overlooking something simple here? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Vincent LEGENDRE /Consultant S?nior/ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problems with Guided Rule Editor in Eclipse
I'm working in Eclipse only right now, but not using DSL for this particular situation (yet). I've manage to make the error go away by removing the package name from drools.package, however, when I attempt to run the code that builds the application to run the rule, it fails to resolve the Object (Fact) used in the rule. Copying the generated DRL to a .drl file works fine. Date: Wed, 16 Mar 2011 18:20:33 +0100 From: Vincent Legendre vincent.legen...@eurodecision.com Subject: Re: [rules-users] Problems with Guided Rule Editor in Eclipse To: Rules Users List rules-users@lists.jboss.org Message-ID: 4d80f161.3080...@eurodecision.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed I was pretty sure to have seen something about sample BRL from Guvnor appears in error in eclipse. I can find some on JIRA, but never the same problem I have ... May be on another forum, but not JIRA ... Anyway, my problem is using DSL in BRL opened with eclipse plugin Guided Editor. Seems that the transformation to DRL is incomplete for DSL sentences, and action part cannot add DSL sentences. I will try with the last version and see if it is still there, and then post a clear new JIRA... But, re-reading your post, may be your problem is different ... As far I can remember, BRL with no DSL in it works ok ... try to copy your generated DRL in a new DRL file to see what happens ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Problems with Guided Rule Editor in Eclipse
I am experimenting with the Guided Rule Editor in Eclipse, but I am unable to get a Guided Rule to parse. I have created a Drools Project using the basic Hello World example for starters. I've created a class called Item with 3 attributes - itemPrice (float), ItemNumber (int), and itemDescription (String) with getters/setters. I do a New-Drools-Guided Rule to create a .brl file called GuidedRule.brl and get the drools.package created automatically. In drools.package, I add package com.sample; and import com.sample.Item; and save it. Then I go over to GuidedRule.brl and create a simple rule in the guided editor (this is the DRL view of it): rule GuidedRule dialect mvel when item : Item() then item.setItemDescription(New Description); end When I click save I get errors. On the Generated drl (read only), I get two problems - BuildError: Unable to build expression for 'consequence': Failed to compile: 2 compilation error(s): - (1,4) unqualified type in strict mode for: item - (1,44) unable to resolve method using strict-mode: java.lang.Object.setItemDescription(java.lang.String) ' item.setItemDescription( New Description );' On the brl source view, I get an error at the attributes - BuildError: Unable to resolve ObjectType 'Item' It seems to not be able to see my class, which is public, belonging to the same package, and included as an import in drools.package. I can get the rule to work if I don't reference Item (simple eval(true) in the LHS, for example) I am running Drools 5.1.1 on Eclipse 3.5. Am I overlooking something simple here? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Unable to find implementation for BusinessRuleProvider
Hi, I've been experimenting with the Guided Rule Editor plug-in in Eclipse. I've built a Drools Project using the default Hello World sample application. I've created a new Guided Rule in my project called GuidedRule.brl and get the associated drools.package with it. The rule is simple: WHEN THEN System.out.println(Rule has fired); I build the knowledge base as follows: private static KnowledgeBase readKnowledgeBase() throws Exception { KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource(SampleGuided.drl), ResourceType.BRL); KnowledgeBuilderErrors errors = kbuilder.getErrors(); if (errors.size() 0) { for (KnowledgeBuilderError error: errors) { System.err.println(error); } throw new IllegalArgumentException(Could not parse knowledge.); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); return kbase; } The only line changed is adding the resource of type BRL. When I try to run, I get the following error: java.lang.RuntimeException: org.drools.compiler.DroolsParserException: org.drools.CheckedDroolsException: Unable to find implementation for BusinessRuleProvider at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.j ava:544) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.ja va:28) at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:41) at com.sample.DroolsTest.main(DroolsTest.java:23) Caused by: org.drools.compiler.DroolsParserException: org.drools.CheckedDroolsException: Unable to find implementation for BusinessRuleProvider at org.drools.compiler.PackageBuilder.addPackageFromBrl(PackageBuilder.java :386) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.j ava:470) ... 3 more Caused by: org.drools.CheckedDroolsException: Unable to find implementation for BusinessRuleProvider at org.drools.compiler.BusinessRuleProviderFactory.throwNoImplementationFou nd(BusinessRuleProviderFactory.java:66) at org.drools.compiler.BusinessRuleProviderFactory.loadProvider(BusinessRul eProviderFactory.java:42) at org.drools.compiler.BusinessRuleProviderFactory.getProvider(BusinessRule ProviderFactory.java:25) at org.drools.compiler.PackageBuilder.addPackageFromBrl(PackageBuilder.java :366) ... 4 more I've tried variations to add the drools.package as a PKG type, I've had the rules (and package) in both com.sample and /src/main/rules, but I can't seem to resolve the problem. drools.package has been updated to include the package name (package com.sample;) and I import the message class as well (even though it isn't being used currently). I suspect the issue is simple, but I haven't been able to figure it out. Any help would be appreciated. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Dynamic Salience
Is Dynamic Salience supported by Guvnor? I've done some experimenting and it does not, but I thought I'd validate my results in case I'm missing something. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] KnowledgeAgent exception while trying to deserialize
Mike, I believe this is the first time we've tried running anything from workstation to server. Essentially what happened was that I did the upgrade of the drools-guvnor.war file and then we fired up the server following the upgrade. I checked out the server environment to see that it was using the new version of Guvnor (i.e. new features, like reporting, etc.) and it checked out fine. I turned it over to my business partners to start building a new rule app. I installed the new Guvnor-standalone to my workstation (based on 5.1.1) and then started building a java application. I used the local copy to with some dummy rules to verify that my eclipse app was talking to the local server correctly, which it was. It wasn't until about 2 weeks ago we tried to switch my eclipse app to talk to the new Guvnor app built by the business partners that we started seeing the problem. Since we were working with a new app, post-update, we never tried to connect prior to the update. The specific error - KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage - seems to imply an incompatibility between Drools in eclipse and Guvnor from what I've gathered from Google, mailing lists, etc. It is this issue that is leading towards the idea of just exporting the repository, installing the .zip of the Guvnor-standalone I used for my workstation locally to the server, and then importing the repository. I hope that helps answer your questions. Thanks for your help so far John Message: 5 Date: Wed, 5 Jan 2011 14:48:43 + From: Michael Anstis michael.ans...@gmail.com Subject: Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage To: Rules Users List rules-users@lists.jboss.org Message-ID: aanlkti=lddg00vd98ebetparyra+sdo-jackml9hv...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi John, Hmmm one of these types of problem. Nice. Firstly, the re-compile\re-package malarkey is the same as Build package on the package information screen (or whatever we want to call that too!) I am suspicious that something somewhere else has not caused the problem: If Guvnor 5.1.1 (presumably) worked OK for a couple of weeks following the upgrade. Was this the first new package created with 5.1.1? Has the server been restored for some reason (to a backup with 5.0.1)? Have any new packages been successful? Thanks, Mike On 4 January 2011 18:12, John Peterson john.peterson.g...@statefarm.comwrote: I upgraded Guvnor on the JBoss server by replacing the 5.0.1 drools-guvnor.war in /server/default/deploy with the drools-guvnor.war for 5.1.1. Once we restarted the server, everything seemed to be working fine with the 5.1.1 features. It wasn't until a couple weeks later when we tried to connect that we started getting the failure messages. The package in question is new since the upgrade. How do I re-compile/re-package the binaries? I'm assuming this is different from doing a Save and validate configuration or Build package on the package screen. Thanks and a Happy New Year to you as well! John Message: 2 Date: Tue, 4 Jan 2011 16:56:52 + From: Michael Anstis michael.ans...@gmail.com Subject: Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage To: Rules Users List rules-users@lists.jboss.org Message-ID: aanlktiktbppalu68ptbha=gvq7oydems1eee+u+tm...@mail.gmail.comgVQ7OYDeMs 1eee%2bu%2btm...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 Hi John, AFAIK you need both client (i.e. your IDE) and server versions of Guvnor to be the same. If you are trying to load a package from an existing (5.0.1) Guvnor repositoty I believe you will need to re-compile\re-package the binaries as a number of SerialVersionIds changed. It wasn't clear from your email whether this is what you have set-up. Happy New Year! Mike 2011/1/4 John Peterson john.peterson.g...@statefarm.com This is sort of a repost of an error I?ve been getting, but I thought with the new year, I?d give it another shot. I?ve been getting the following exception in my code: [2010:12:361 09:12:910:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet [2010:12:361 09:12:972:exception] ***java.lang.RuntimeException*: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage atorg.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(* ** KnowledgeAgentImpl.java:664*) atorg.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase (* **KnowledgeAgentImpl.java:889*) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(*** KnowledgeAgentImpl.java:704*) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(*** KnowledgeAgentImpl.java:584*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(*** KnowledgeAgentImpl.java:185
[rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
This is sort of a repost of an error I've been getting, but I thought with the new year, I'd give it another shot. I've been getting the following exception in my code: [2010:12:361 09:12:910:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet [2010:12:361 09:12:972:exception] ***java.lang.RuntimeException*: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(***Kn owledgeAgentImpl.java:664*) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(*** KnowledgeAgentImpl.java:889*) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(***KnowledgeAg entImpl.java:704*) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(***Knowledge AgentImpl.java:584*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(***KnowledgeAgen tImpl.java:185*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(***KnowledgeAgen tImpl.java:168*) at com.agencyawards2.RuleSessionProviderFactory.getSessionFactory(***RuleSe ssionProviderFactory.java:95*) at com.agencyawards2.RuleSessionProviderFactory.getProvider(***RuleSessionP roviderFactory.java:35*) at com.agencyawards2.RunRules.runRules(***RunRules.java:27*) at com.agencyawards2.DroolsTest.main(***DroolsTest.java:40*) Caused by:*** java.io.StreamCorruptedException*: invalid stream header: 7061636B at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.init(Unknown Source) at org.drools.common.DroolsObjectInputStream.init(***DroolsObjectInputStr eam.java:71*) at org.drools.core.util.DroolsStreamUtils.streamIn(***DroolsStreamUtils.jav a:205*) at org.drools.core.util.DroolsStreamUtils.streamIn(***DroolsStreamUtils.jav a:174*) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(***Kn owledgeAgentImpl.java:653*) ... 9 more I'm running Drools 5.1.1 on my workstation in Eclipse. When I run it against Guvnor locally using version 5.1.1 installed as the Guvnor Standalone downloaded at the same time as Drools 5.1.1 was downloaded from the JBoss.org site, it works fine. When I run it against the server, which was from the 5.0.1 Guvnor Standalone installation, but I updated the drools-guvnor.war file to use the new 5.1.1 version, I get the error listed above. Based on my research into the KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage error, it seems to stem from an incompatibility between versions of Drools. Do I need to install the 5.1.1 Guvnor Standalone to my server to bring the versions into synch, or am I experiencing some other sort of problem? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
I upgraded Guvnor on the JBoss server by replacing the 5.0.1 drools-guvnor.war in /server/default/deploy with the drools-guvnor.war for 5.1.1. Once we restarted the server, everything seemed to be working fine with the 5.1.1 features. It wasn't until a couple weeks later when we tried to connect that we started getting the failure messages. The package in question is new since the upgrade. How do I re-compile/re-package the binaries? I'm assuming this is different from doing a Save and validate configuration or Build package on the package screen. Thanks and a Happy New Year to you as well! John Message: 2 Date: Tue, 4 Jan 2011 16:56:52 + From: Michael Anstis michael.ans...@gmail.com Subject: Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage To: Rules Users List rules-users@lists.jboss.org Message-ID: aanlktiktbppalu68ptbha=gvq7oydems1eee+u+tm...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 Hi John, AFAIK you need both client (i.e. your IDE) and server versions of Guvnor to be the same. If you are trying to load a package from an existing (5.0.1) Guvnor repositoty I believe you will need to re-compile\re-package the binaries as a number of SerialVersionIds changed. It wasn't clear from your email whether this is what you have set-up. Happy New Year! Mike 2011/1/4 John Peterson john.peterson.g...@statefarm.com This is sort of a repost of an error I?ve been getting, but I thought with the new year, I?d give it another shot. I?ve been getting the following exception in my code: [2010:12:361 09:12:910:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet [2010:12:361 09:12:972:exception] ***java.lang.RuntimeException*: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage atorg.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(* ** KnowledgeAgentImpl.java:664*) atorg.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase (* **KnowledgeAgentImpl.java:889*) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(*** KnowledgeAgentImpl.java:704*) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(*** KnowledgeAgentImpl.java:584*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(*** KnowledgeAgentImpl.java:185*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(*** KnowledgeAgentImpl.java:168*) at com.agencyawards2.RuleSessionProviderFactory.getSessionFactory( ***RuleSessionProviderFactory.java:95*) at com.agencyawards2.RuleSessionProviderFactory.getProvider(*** RuleSessionProviderFactory.java:35*) at com.agencyawards2.RunRules.runRules(***RunRules.java:27*) at com.agencyawards2.DroolsTest.main(***DroolsTest.java:40*) Caused by:*** java.io.StreamCorruptedException*: invalid stream header:7061636B at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.init(Unknown Source) at org.drools.common.DroolsObjectInputStream.init(*** DroolsObjectInputStream.java:71*) at org.drools.core.util.DroolsStreamUtils.streamIn(*** DroolsStreamUtils.java:205*) at org.drools.core.util.DroolsStreamUtils.streamIn(*** DroolsStreamUtils.java:174*) atorg.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(* ** KnowledgeAgentImpl.java:653*) ... 9 more I?m running Drools 5.1.1 on my workstation in Eclipse. When I run it against Guvnor locally using version 5.1.1 installed as the ?Guvnor Standalone? downloaded at the same time as Drools 5.1.1 was downloadedfrom the JBoss.org site, it works fine. When I run it against the server, which was from the 5.0.1 ?Guvnor Standalone? installation, but I updated the drools-guvnor.war file to use the new 5.1.1 version, I get the error listed above. Based on my research into the ?KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage? error, it seems to stem from an incompatibility between versions of Drools. Do I need to install the 5.1.1 Guvnor Standalone to my server to bring the versions into synch, or am I experiencing some other sort of problem? ___ rules-users mailing list rules-users@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/20110104/9374b2 49/attachment-0001.html -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users End of rules-users Digest, Vol 50, Issue 11 *** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] URL for package documentation does not refresh with new Build
I was experimenting with Guvnor 5.1.1's new capability to produce documentation. In my scenario, I did a Build Package and then clicked on the URL for package documentation link. Everything looked fine. Then I went back and added a description to one rule and un-disabled another rule (in DSL) to see how it would look on the report. I returned to the package screen, clicked Build Package, then click on the URL for package documentation link, but nothing appeared to change (neither my description nor my un-disabled rule are on the report). I've tried to Save and validate package as well as logging out of Guvnor and logging back in, but those did not work either. Has anyone else seen this? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] URL for package documentation does not refresh
We're running on a Linux server using JBoss 4.2.3.GA, so the documentation isn't on our workstations (we tried clearing the cache on IE and it didn't resolve the issue). Is it sitting out on the server someplace? Message: 3 Date: Thu, 30 Dec 2010 07:31:14 -0700 From: John Peterson john.peterson.g...@statefarm.com Subject: [rules-users] URL for package documentation does not refresh withnew Build To: rules-users@lists.jboss.org Message-ID: d3a6e68928c9104bb815c83f43a36bdf0f116...@wpscv6nh.opr.statefarm.org Content-Type: text/plain; charset=us-ascii I was experimenting with Guvnor 5.1.1's new capability to produce documentation. In my scenario, I did a Build Package and then clicked on the URL for package documentation link. Everything looked fine. Then I went back and added a description to one rule and un-disabled another rule (in DSL) to see how it would look on the report. I returned to the package screen, clicked Build Package, then click on the URL for package documentation link, but nothing appeared to change (neither my description nor my un-disabled rule are on the report). I've tried to Save and validate package as well as logging out of Guvnor and logging back in, but those did not work either. Has anyone else seen this? -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101230/f2643b 70/attachment-0001.html -- Message: 4 Date: Thu, 30 Dec 2010 11:41:46 -0300 From: Leandro Romero leandro.s.rom...@gmail.com Subject: Re: [rules-users] URL for package documentation does not refresh with new Build To: Rules Users List rules-users@lists.jboss.org Message-ID: aanlkti=yaa=cgnos0ye4qf+kbs9agdue-+f-bj+j0...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 That happened to me a few times too, it was a browser cache problem. I deleted the cache and tried again. Regards, Leandro Romero -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101230/c28166 cf/attachment.html -- ___ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] StreamCorruptedException - invalid stream header
Hi, I'm experiencing an interesting issue with Drools/Guvnor. I am running Drools 5.1.1 on my workstation and the Guvnor 5.1.1 standalone locally. When I run it locally, it works fine. The server installation of JBoss AS was downloaded and installed at the same time as Drools 5.1.1. When I try to run it connecting to the remote server (on Linux), I get the following error: [2010:12:361 09:12:910:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet [2010:12:361 09:12:972:exception] java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(Knowl edgeAgentImpl.java:664) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(Kno wledgeAgentImpl.java:889) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgent Impl.java:704) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAge ntImpl.java:584) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentIm pl.java:185) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentIm pl.java:168) at com.agencyawards2.RuleSessionProviderFactory.getSessionFactory(RuleSessi onProviderFactory.java:95) at com.agencyawards2.RuleSessionProviderFactory.getProvider(RuleSessionProv iderFactory.java:35) at com.agencyawards2.RunRules.runRules(RunRules.java:27) at com.agencyawards2.DroolsTest.main(DroolsTest.java:40) Caused by: java.io.StreamCorruptedException: invalid stream header: 7061636B at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.init(Unknown Source) at org.drools.common.DroolsObjectInputStream.init(DroolsObjectInputStream .java:71) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:2 05) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:1 74) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(Knowl edgeAgentImpl.java:653) ... 9 more [2010:12:361 09:12:03:debug] KnowledgeAgent obtaining pkg resource=[UrlResource path='file:src/main/rules/ruleflow.rf'] The only thing I can think of that is different is that I recently upgraded my Guvnor 5.0.1 to 5.1.1 on the Server. I did this by replacing the drools-guvnor.war with the newer version. Did that create some sort of compatibility between my local 5.1.1 installation and the server installation of 5.1.1 on top of the old 5.0.1? Thanks, John ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] StreamCorruptedException - invalid stream
Workstation Version (windows): 1.6.0_17 Server Version (linux): 1.6.0 (build 1.6.0-b09) Are you using the same JVM version in both machines? Greetings 2010/12/27 John Peterson john.peterson.g...@statefarm.com Hi, I?m experiencing an interesting issue with Drools/Guvnor. I am running Drools 5.1.1 on my workstation and the Guvnor 5.1.1 standalone locally. When I run it locally, it works fine. The server installation of JBoss AS was downloaded and installed at the same time as Drools 5.1.1. When I try to run it connecting to the remote server (on Linux), I get the following error: [2010:12:361 09:12:910:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet [2010:12:361 09:12:972:exception] ***java.lang.RuntimeException*: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(*** KnowledgeAgentImpl.java:664*) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(* ** KnowledgeAgentImpl.java:889*) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(*** KnowledgeAgentImpl.java:704*) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(*** KnowledgeAgentImpl.java:584*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(*** KnowledgeAgentImpl.java:185*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(*** KnowledgeAgentImpl.java:168*) at com.agencyawards2.RuleSessionProviderFactory.getSessionFactory( ***RuleSessionProviderFactory.java:95*) at com.agencyawards2.RuleSessionProviderFactory.getProvider(*** RuleSessionProviderFactory.java:35*) at com.agencyawards2.RunRules.runRules(***RunRules.java:27*) at com.agencyawards2.DroolsTest.main(***DroolsTest.java:40*) Caused by:*** java.io.StreamCorruptedException*: invalid stream header: 7061636B at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.init(Unknown Source) at org.drools.common.DroolsObjectInputStream.init(*** DroolsObjectInputStream.java:71*) at org.drools.core.util.DroolsStreamUtils.streamIn(*** DroolsStreamUtils.java:205*) at org.drools.core.util.DroolsStreamUtils.streamIn(*** DroolsStreamUtils.java:174*) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(*** KnowledgeAgentImpl.java:653*) ... 9 more [2010:12:361 09:12:03:debug] KnowledgeAgent obtaining pkg resource=[UrlResource path='file:src/main/rules/ruleflow.rf'] The only thing I can think of that is different is that I recently upgraded my Guvnor 5.0.1 to 5.1.1 on the Server. I did this by replacing the drools-guvnor.war with the newer version. Did that create some sort of compatibility between my local 5.1.1 installation and the server installation of 5.1.1 on top of the old 5.0.1? Thanks, John ___ 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 - -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101227/4c7318 d8/attachment.html -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users End of rules-users Digest, Vol 49, Issue 71 *** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] StreamCorruptedException - invalid stream
A little more information: - Prior to upgrading the drools-guvnor.war file on the server to 5.1.1 and my local eclipse install of Drools to 5.1.1, I had successfully run from my eclipse to the server many times (using version 5.0.1 on both). - I'm unable to access or utilize the old packages created prior to the upgrade to 5.1.1 (see rules-users Digest vol.49, issue 61 from 12/23 - message 6 attached below) - I CAN run the application locally, using the Guvnor 5.1.1 standalone installed on my computer. This makes me think something is out of synch with the server and my computer. -- Message: 1 Date: Mon, 27 Dec 2010 09:05:50 -0700 From: John Peterson john.peterson.g...@statefarm.com Subject: [rules-users] StreamCorruptedException - invalid stream To: rules-users@lists.jboss.org Message-ID: d3a6e68928c9104bb815c83f43a36bdf0f0c6...@wpscv6nh.opr.statefarm.org Content-Type: text/plain; charset=US-ASCII Workstation Version (windows): 1.6.0_17 Server Version (linux): 1.6.0 (build 1.6.0-b09) Are you using the same JVM version in both machines? Greetings 2010/12/27 John Peterson john.peterson.g...@statefarm.com Hi, I?m experiencing an interesting issue with Drools/Guvnor. I am running Drools 5.1.1 on my workstation and the Guvnor 5.1.1 standalone locally. When I run it locally, it works fine. The server installation of JBoss AS was downloaded and installed at the same time as Drools 5.1.1. When I try to run it connecting to the remote server (on Linux), I get the following error: [2010:12:361 09:12:910:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet [2010:12:361 09:12:972:exception] ***java.lang.RuntimeException*: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(*** KnowledgeAgentImpl.java:664*) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(* ** KnowledgeAgentImpl.java:889*) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(*** KnowledgeAgentImpl.java:704*) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(*** KnowledgeAgentImpl.java:584*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(*** KnowledgeAgentImpl.java:185*) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(*** KnowledgeAgentImpl.java:168*) at com.agencyawards2.RuleSessionProviderFactory.getSessionFactory( ***RuleSessionProviderFactory.java:95*) at com.agencyawards2.RuleSessionProviderFactory.getProvider(*** RuleSessionProviderFactory.java:35*) at com.agencyawards2.RunRules.runRules(***RunRules.java:27*) at com.agencyawards2.DroolsTest.main(***DroolsTest.java:40*) Caused by:*** java.io.StreamCorruptedException*: invalid stream header: 7061636B at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.init(Unknown Source) at org.drools.common.DroolsObjectInputStream.init(*** DroolsObjectInputStream.java:71*) at org.drools.core.util.DroolsStreamUtils.streamIn(*** DroolsStreamUtils.java:205*) at org.drools.core.util.DroolsStreamUtils.streamIn(*** DroolsStreamUtils.java:174*) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(*** KnowledgeAgentImpl.java:653*) ... 9 more [2010:12:361 09:12:03:debug] KnowledgeAgent obtaining pkg resource=[UrlResource path='file:src/main/rules/ruleflow.rf'] The only thing I can think of that is different is that I recently upgraded my Guvnor 5.0.1 to 5.1.1 on the Server. I did this by replacing the drools-guvnor.war with the newer version. Did that create some sort of compatibility between my local 5.1.1 installation and the server installation of 5.1.1 on top of the old 5.0.1? Thanks, John ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Message: 6 Date: Thu, 23 Dec 2010 08:51:24 -0700 From: John Peterson john.peterson.g...@statefarm.com Subject: [rules-users] Unable to validate package configuration (eg, DSLs, models) for [package name] To: rules-users@lists.jboss.org Message-ID: d3a6e68928c9104bb815c83f43a36bdf0f0c5...@wpscv6nh.opr.statefarm.org Content-Type: text/plain; charset=us-ascii Hi, We recently upgraded from Drools/Guvnor 5.0.1 to 5.1.1 (early December). We had an existing package we had developed in 5.0.1 that we had not done much with since the upgrade. This morning, we tried to open one of the rules in that package and we get the following messages: Unable to validate package configuration (eg, DSLs, models) for [package name]. Suggestion completions may not operate correctly for graphical editors for this package. Unable to get
[rules-users] Unable to validate package configuration (eg, DSLs, models) for [package name]
Hi, We recently upgraded from Drools/Guvnor 5.0.1 to 5.1.1 (early December). We had an existing package we had developed in 5.0.1 that we had not done much with since the upgrade. This morning, we tried to open one of the rules in that package and we get the following messages: Picture (Device Independent Bitmap) Unable to validate package configuration (eg, DSLs, models) for [package name]. Suggestion completions may not operate correctly for graphical editors for this package. Picture (Device Independent Bitmap) Unable to get content assistance for this rule. Picture (Device Independent Bitmap) Unable to get content assistance for this rule. I've tried to re-upload the 3 jar files (I saw this post as a possible solution: http://comments.gmane.org/gmane.comp.java.drools.user/23407), but I get Unable to upload the file. New packages seem to be okay (e.g. packages created since the upgrade). Does anyone have any thoughts on what's going on here? Thanks. ole0.bmpole1.bmpole2.bmp___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using GlobalArea in Guvnor
Message: 7 Date: Fri, 10 Dec 2010 09:48:21 -0700 From: John Peterson john.peterson.g...@statefarm.com Subject: [rules-users] Using GlobalArea in Guvnor To: rules-users@lists.jboss.org Message-ID: d3a6e68928c9104bb815c83f43a36bdf0ef4e...@wpscv6nh.opr.statefarm.org Content-Type: text/plain; charset=US-ASCII Hi, I'm working with Guvnor 5.1.1 and I'm having an issue accessing Declarative Models defined in the Global Area in the Packages. Is it possible to create a shared model in the Global Area and then write rules against them in other packages? It would seem to me that the answer would be yes (why else have a Global area), but, for some reason, it doesn't seem to recognize them. Here's a scenario: I declare a DeclarativeModel in GlobalArea: GenericFact id: Integer valueOne: Integer label: String end I have a package called com.experiment. I'd like to write Business Rule in it using that GenericFact. However, when I click the + sign to add a Fact, I see a yellow background over Note: No model has been defined. Is there something that needs to be done to make the GlobalArea stuff viewable from the individual packages? Follow-up from last Friday: I have not been able to figure out this situation. It would appear that I am supposed to import my model from my Global Area into my other packages for use, but whenever I create New declarative model or Upload POJO Model jar and then select Import asset from global area, there's nothing in the drop down for Asset to import. I have 2 Model assets in the global area - one a POJO, the other a Declarative model. Is there something that needs to be done to make these visible to the other packages? I can't find anything in the documentation about it. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Using GlobalArea in Guvnor
Hi, I'm working with Guvnor 5.1.1 and I'm having an issue accessing Declarative Models defined in the Global Area in the Packages. Is it possible to create a shared model in the Global Area and then write rules against them in other packages? It would seem to me that the answer would be yes (why else have a Global area), but, for some reason, it doesn't seem to recognize them. Here's a scenario: I declare a DeclarativeModel in GlobalArea: GenericFact id: Integer valueOne: Integer label: String end I have a package called com.experiment. I'd like to write Business Rule in it using that GenericFact. However, when I click the + sign to add a Fact, I see a yellow background over Note: No model has been defined. Is there something that needs to be done to make the GlobalArea stuff viewable from the individual packages? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] KnowledgeAgent exception while trying to deserialize
I had a ruleflow resource I needed to add, and I cleaned up my KB creation code and that seemed to take care of it. I also did a rebuild of the package in Guvnor, so I'm not 100% sure what exactly fixed it, but it is fixed. Thanks for the follow-up. Message: 1 Date: Sat, 04 Dec 2010 04:47:23 + From: Mark Proctor mproc...@codehaus.org Subject: Re: [rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage To: rules-users@lists.jboss.org Message-ID: 4cf9c7db.2010...@codehaus.org Content-Type: text/plain; charset=iso-8859-1 Did you recompile the packages in Guvnor, there is a button for that. Server and client must all be on the same version, as well as compiled Packages. Mark On 03/12/2010 16:15, John Peterson wrote: I'm getting the following error when I attempt torun my Drools application. I recently upgraded from Drools 5.0.1 and Guvnor 5.0.1 to 5.1.1 (for both). I've looked through the rules-users list and I found the issue with the XML Change Set (authentication), which I've addressed (XML listed at the bottom), but I'm still getting the error. Does anyone have any ideas or can point me in a particular direction? Thanks Error: [2010:12:337 09:12:373:debug] KnowledgeAgent mapping resource=[ClassPathResource path='ruleflow.rf'] to knowledgedefinition=org.drools.ruleflow.core.ruleflowproc...@2d89ba2a [2010:12:337 09:12:373:exception] _java.lang.RuntimeException_: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(_ KnowledgeAgentImpl.java:914_) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(_KnowledgeAg entImpl.java:704_) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(_Knowledge AgentImpl.java:584_) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(_KnowledgeAgen tImpl.java:185_) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(_KnowledgeAgen tImpl.java:168_) at com.agencyawards2.RuleSessionProviderFactory.getSessionFactory(_RuleSe ssionProviderFactory.java:102_) at com.agencyawards2.RuleSessionProviderFactory.getProvider(_RuleSessionP roviderFactory.java:30_) at com.agencyawards2.RunRules.runRules(_RunRules.java:25_) at com.agencyawards2.DroolsTest.main(_DroolsTest.java:36_) Caused by:_java.lang.NullPointerException_ at org.drools.process.core.impl.ProcessImpl.equals(_ProcessImpl.java:134_ ) at java.util.HashMap.put(Unknown Source) at java.util.HashSet.add(Unknown Source) at org.drools.agent.impl.KnowledgeAgentImpl$RegisteredResourceMap.putDefi nition(_KnowledgeAgentImpl.java:1150_) at org.drools.agent.impl.KnowledgeAgentImpl.addDefinitionMapping(_Knowled geAgentImpl.java:1037_) at org.drools.agent.impl.KnowledgeAgentImpl.buildResourceMapping(_Knowled geAgentImpl.java:496_) at org.drools.agent.impl.KnowledgeAgentImpl.buildResourceMapping(_Knowled geAgentImpl.java:443_) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(_ KnowledgeAgentImpl.java:912_) ... 8 more Change Set: *?xml version=1.0 encoding=UTF-8 ? * *- change-set xmlns=http://drools.org/drools-5.0/change-set; xmlns:xs=http://www.w3.org/2001/XMLSchema-instance; xs:schemaLocation=http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd* *- add* *resource source=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/pac kage/com.agencyawards2/LATEST type=PKG basicAuthentication=enabled username=admin password=admin / * */add* */change-set* ___ 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] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
I'm getting the following error when I attempt to run my Drools application. I recently upgraded from Drools 5.0.1 and Guvnor 5.0.1 to 5.1.1 (for both). I've looked through the rules-users list and I found the issue with the XML Change Set (authentication), which I've addressed (XML listed at the bottom), but I'm still getting the error. Does anyone have any ideas or can point me in a particular direction? Thanks Error: [2010:12:337 09:12:373:debug] KnowledgeAgent mapping resource=[ClassPathResource path='ruleflow.rf'] to knowledgedefinition=org.drools.ruleflow.core.ruleflowproc...@2d89ba2a [2010:12:337 09:12:373:exception] java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(Kno wledgeAgentImpl.java:914) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgent Impl.java:704) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAge ntImpl.java:584) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentIm pl.java:185) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentIm pl.java:168) at com.agencyawards2.RuleSessionProviderFactory.getSessionFactory(RuleSessi onProviderFactory.java:102) at com.agencyawards2.RuleSessionProviderFactory.getProvider(RuleSessionProv iderFactory.java:30) at com.agencyawards2.RunRules.runRules(RunRules.java:25) at com.agencyawards2.DroolsTest.main(DroolsTest.java:36) Caused by: java.lang.NullPointerException at org.drools.process.core.impl.ProcessImpl.equals(ProcessImpl.java:134) at java.util.HashMap.put(Unknown Source) at java.util.HashSet.add(Unknown Source) at org.drools.agent.impl.KnowledgeAgentImpl$RegisteredResourceMap.putDefini tion(KnowledgeAgentImpl.java:1150) at org.drools.agent.impl.KnowledgeAgentImpl.addDefinitionMapping(KnowledgeA gentImpl.java:1037) at org.drools.agent.impl.KnowledgeAgentImpl.buildResourceMapping(KnowledgeA gentImpl.java:496) at org.drools.agent.impl.KnowledgeAgentImpl.buildResourceMapping(KnowledgeA gentImpl.java:443) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(Kno wledgeAgentImpl.java:912) ... 8 more Change Set: ?xml version=1.0 encoding=UTF-8 ? - change-set xmlns=http://drools.org/drools-5.0/change-set; xmlns:xs=http://www.w3.org/2001/XMLSchema-instance; xs:schemaLocation=http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd - add resource source=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/pac kage/com.agencyawards2/LATEST type=PKG basicAuthentication=enabled username=admin password=admin / /add /change-set ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Rules in App Server Error
I'm having a problem that I can't seem to figure out. I have rules that run in a client program with no problem - about 125 rules in all. When I try to run these same rules in an App Server (GlassFish) I get several rules (about 5) that have an error on initialization. Here is the error message followed by the rule. *** SEVERE: java.lang.RuntimeException: Unable to build expression for 'consequence': [Error: not a statement, or badly formed structure] [Near : {... $severity; }] ^ [Line: 1, Column: 233] '$severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; // Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); ' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule'] ** rule medicalHistoryBleedingRiskFactors.gastritis rule salience 20 when # find patients who indicated that they have MedicalHistoryBleedingRiskFactors: gastritis $patient : Patient(medicalHistoryBleedingRiskFactors.gastritis 0) then $severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; # Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); end As I said, this rule runs fine in a client app - when I run the same rules in app server I get an error. This is only happening in 5 out of 125 rules, and only during initialization using builder.add(ResourceFactory.newClassPathResource(file). Thanks. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rules in App Server Error
Thanks for the reply Mauricio. I tried what you said using this modified rule: rule medicalHistoryBleedingRiskFactors.gastritis rule salience 20 when # find patients who indicated that they have MedicalHistoryBleedingRiskFactors: gastritis $patient : Patient(medicalHistoryBleedingRiskFactors.gastritis 0) then String severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; # Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); end But I got this exception in the client (I am using 5.1.1 by the way): Exception in thread Thread-4 java.lang.RuntimeException: Unable to build expression for 'consequence': [Error: Failed to compile: 1 compilation error(s): - (1,9) unqualified type in strict mode for: $severity] [Near : {... Unknown }] ^ [Line: 1, Column: 0] 'String severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; // Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); ' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule'] at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin.createLevel1Knowl edgeBase(LocalRuleEnginePlugin.java:107) at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin.access$100(LocalR uleEnginePlugin.java:22) at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin$InitializeRuleEng ine.run(LocalRuleEnginePlugin.java:192) When I took out the String severity and used just $severity: it works fine. Just on the App server does it fail. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino Sent: Friday, December 03, 2010 3:36 PM To: Rules Users List Subject: Re: [rules-users] Rules in App Server Error that's weird.. you are using a varible that you never define in the Right Hand Side. $severity was never defined. In the RHS remember that you can write pure java. So if you want a variable called severity you should declare it as: String severity = $patient. medicalHistoryBleedingRiskFactors.gastritis; Greetings. 2010/12/3 John McKim jmc...@comcast.net I'm having a problem that I can't seem to figure out. I have rules that run in a client program with no problem - about 125 rules in all. When I try to run these same rules in an App Server (GlassFish) I get several rules (about 5) that have an error on initialization. Here is the error message followed by the rule. *** SEVERE: java.lang.RuntimeException: Unable to build expression for 'consequence': [Error: not a statement, or badly formed structure] [Near : {... $severity; }] ^ [Line: 1, Column: 233] '$severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; // Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); ' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule'] ** rule medicalHistoryBleedingRiskFactors.gastritis rule salience 20 when # find patients who indicated that they have MedicalHistoryBleedingRiskFactors: gastritis $patient : Patient(medicalHistoryBleedingRiskFactors.gastritis 0) then $severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; # Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); end As I said, this rule runs fine in a client app - when I run the same rules in app server I get an error. This is only happening in 5 out of 125 rules, and only during initialization using builder.add(ResourceFactory.newClassPathResource(file). Thanks. ___ rules-users mailing list rules
Re: [rules-users] Rules in App Server Error
First off, yes, I am an expert Java programmer, not just a Drools expert - yet. If you took the time to read the post, you would have found that the answer that was provided to me “DIDN’T WORK”. Never mind, I’ll figure it out myself. Goodby! From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Greg Barton Sent: Friday, December 03, 2010 7:26 PM To: Rules Users List Subject: Re: [rules-users] Rules in App Server Error You made the same error in three other places. Fix them. Are you familiar with the java language? GreG On Dec 3, 2010, at 15:15, John McKim jmc...@comcast.net wrote: Thanks for the reply Mauricio. I tried what you said using this modified rule: rule medicalHistoryBleedingRiskFactors.gastritis rule salience 20 when # find patients who indicated that they have MedicalHistoryBleedingRiskFactors: gastritis $patient : Patient(medicalHistoryBleedingRiskFactors.gastritis 0) then String severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; # Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); end But I got this exception in the client (I am using 5.1.1 by the way): Exception in thread Thread-4 java.lang.RuntimeException: Unable to build expression for 'consequence': [Error: Failed to compile: 1 compilation error(s): - (1,9) unqualified type in strict mode for: $severity] [Near : {... Unknown }] ^ [Line: 1, Column: 0] 'String severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; // Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); ' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule'] at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin.createLevel1KnowledgeBase(LocalRuleEnginePlugin.java:107) at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin.access$100(LocalRuleEnginePlugin.java:22) at com.kai.framework.plugins.ruleengine.LocalRuleEnginePlugin$InitializeRuleEngine.run(LocalRuleEnginePlugin.java:192) When I took out the String severity and used just $severity: it works fine. Just on the App server does it fail. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mauricio Salatino Sent: Friday, December 03, 2010 3:36 PM To: Rules Users List Subject: Re: [rules-users] Rules in App Server Error that's weird.. you are using a varible that you never define in the Right Hand Side. $severity was never defined. In the RHS remember that you can write pure java. So if you want a variable called severity you should declare it as: String severity = $patient. medicalHistoryBleedingRiskFactors.gastritis; Greetings. 2010/12/3 John McKim jmc...@comcast.net I'm having a problem that I can't seem to figure out. I have rules that run in a client program with no problem - about 125 rules in all. When I try to run these same rules in an App Server (GlassFish) I get several rules (about 5) that have an error on initialization. Here is the error message followed by the rule. *** SEVERE: java.lang.RuntimeException: Unable to build expression for 'consequence': [Error: not a statement, or badly formed structure] [Near : {... $severity; }] ^ [Line: 1, Column: 233] '$severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor = .1; $tempScore = $factor; $tempScore = $tempScore * $weight; $tempScore = $tempScore * $severity; // Now add this risk score to the accumlated risk score $patient.score = $patient.score + $tempScore; $patient.problem = new String(MedicalHistoryBleedingRiskFactors.gastritis); ' : [Rule name='medicalHistoryBleedingRiskFactors.gastritis rule'] ** rule medicalHistoryBleedingRiskFactors.gastritis rule salience 20 when # find patients who indicated that they have MedicalHistoryBleedingRiskFactors: gastritis $patient : Patient(medicalHistoryBleedingRiskFactors.gastritis 0) then $severity = $patient.medicalHistoryBleedingRiskFactors.gastritis; $weight = 5; $factor
Re: [rules-users] @role( event ) in guvnor
Message: 3 Date: Tue, 30 Nov 2010 02:16:05 -0800 (PST) From: Pankaj Khattar pankaj.khatt...@alcatel-lucent.com Subject: Re: [rules-users] @role( event ) in guvnor To: rules-users@lists.jboss.org Message-ID: 1291112165767-1991857.p...@n3.nabble.com Content-Type: text/plain; charset=us-ascii Thanks for the info. Is there any workaround for the same as i am migerating my existing drl file to guvnor the drl file contains @role( event ) @expires( 5m ) -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/role-event-in-guvnor -tp1991538p1991857.html Sent from the Drools - User mailing list archive at Nabble.com. Pankaj, Try this - go into Guvnor and create a technical rule. Clear out the WHEN-THEN (i.e. make it blank). In the rule editor, type: declare factName @role(event) @expires(5m) end It should validate without any problems. I think this might solve your problem. The other thing I discovered is that the Guided Editor won't support entry-points, but you can use the Technical Editor for it, or you can try to put the verbiage in the DSL translations. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules-users Digest, Vol 48, Issue 72
Message: 2 Date: Fri, 19 Nov 2010 09:07:33 +1100 From: Xinhua Zhu xh...@it.uts.edu.au Subject: [rules-users] Integrate Fusion into Guvnor To: rules-users@lists.jboss.org Message-ID: aanlktimqfjttdmj=mfner9nqckttpdvyfoh-not1s...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi When Fusion can be integrated into Guvnor? BR Xinhua -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101119/a77038 b9/attachment-0001.html -- I asked this question about a month ago and never got a response, but, through experimentation with it, I did learn some things: 1. There does not appear to be an easy was to define a Fact as an Event. What I found out, though, is that if you create a technical rule, clear out the WHEN-THEN stuff, you could put the declare in its place and it seemed to work okay. 2. You can put Accumulates in your rules with Free Form DRL (Guided Editor) or just use the Technical Rule Editor. I also found that DSL was easier for it since you could parameterize your sliding windows, etc., so all you had to do is pop in the values. 3. I don't think your event streams can be built in the Guided Editor (at least in 5.0.1), so that may force you to do Technical Rules/DRL or DSL. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Integrate Fusion into Guvnor
Message: 4 Date: Fri, 19 Nov 2010 07:01:36 -0700 From: John Peterson john.peterson.g...@statefarm.com Subject: Re: [rules-users] rules-users Digest, Vol 48, Issue 72 To: rules-users@lists.jboss.org Message-ID: d3a6e68928c9104bb815c83f43a36bdf0ed54...@wpscv6nh.opr.statefarm.org Content-Type: text/plain; charset=us-ascii Message: 2 Date: Fri, 19 Nov 2010 09:07:33 +1100 From: Xinhua Zhu xh...@it.uts.edu.au Subject: [rules-users] Integrate Fusion into Guvnor To: rules-users@lists.jboss.org Message-ID: aanlktimqfjttdmj=mfner9nqckttpdvyfoh-not1s...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi When Fusion can be integrated into Guvnor? BR Xinhua -- next part -- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101119/a77038 b9/attachment-0001.html -- I asked this question about a month ago and never got a response, but, through experimentation with it, I did learn some things: 1. There does not appear to be an easy was to define a Fact as an Event. What I found out, though, is that if you create a technical rule, clear out the WHEN-THEN stuff, you could put the declare in its place and it seemed to work okay. 2. You can put Accumulates in your rules with Free Form DRL (Guided Editor) or just use the Technical Rule Editor. I also found that DSL was easier for it since you could parameterize your sliding windows, etc., so all you had to do is pop in the values. 3. I don't think your event streams can be built in the Guided Editor (at least in 5.0.1), so that may force you to do Technical Rules/DRL or DSL. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] User Experience with multiple users in Guvnor
I have a question for users out there working with Guvnor. Do you have more than one user working on rules within the same package at the same time? How are you handling versioning and testing, especially if the changes are not going out at the same time? We've been experimenting with Guvnor (5.0.1) and multiple users and we're finding that if user A gets something that parses with an error, it carries over to all the other users when they attempt to validate their rules. This has been confusing because the error is not with their code but with something else completely (like a Function with an error, and they're working on a rule). It seems to us that multiple users working on the same package in Guvnor would require a lot of coordination. Anyone have some wisdom or lessons learned you'd be willing to share? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Error with update in Guvnor
Hi all, I'm getting a strange error when I run my rules deployed from Guvnor. Here's the rule: WHEN Fact1 [f1] Flag1 = false Flag2 = false Fact2 [f2] KeyField = f1.KeyField THEN f1.Flag2 = true; update(f1); f2.count1 = f2.count1 - 1; f2.count2 = f2.count2 - 1; f2.count3 = f2.count3 - 1; f2.count4 = f2.count4 - 1; f2.count5 = f2.count5 - 1; update(f2); I get the following error in my console when I run: Exception in readKnowledgeBase: [Error: illegal use of operator: PROJECT] [Near : {... Unknown }] ^ [Line: 1, Column: 0] If I remove the second update, it runs without error (but my rules dependent on the updated f2 don't work). I'm doing this in the Guided Editor. I've tried both Modify the values of f2 and doing the update as free form DRL (update(f2);). As listed above, if I put a print between the last assignment and the update, I get the print results before the error. If I put the print last, I never see it, so I'm 99.9% certain it is choking on my update. Version Specifics: - Guvnor 5.0.1 - Drools 5.0.1 - JBoss 4.2.3.GA Any help/guidance would be appreciated! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Starting a process in Guvnor with ruleflow-group
Hi all, I'm doing some experimentation for a business problem and I've hit a snag when it comes to Guvnor and Ruleflow-Groups. I'm using Guvnor 5.0.1 and Drools 5.0.1. I've uploaded a simple 4 step (plus start and end) ruleflow-group to Guvnor. I've added ruleflow-group attributes to all my rules, associating them to one of the four steps in my ruleflow. My code for the execution is as follows: cmds.add(CommandFactory.newInsertElements(recordsToRun)); try { KnowledgeBase kbase = readKnowledgeBase(); StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(); ExecutionResults results = ksession.execute(CommandFactory.newBatchExecution(cmds)); } catch(Exception e) { System.out.println(Exception in readKnowledgeBase: + e.getMessage()); } I've seen in other documentation that a startProcess is in order (e.g. ksession.startProcess(ruleflowname)), however, startProcess is not available for StatelessKnowledgeSession and the process is in Guvnor already, not locally. I'm guessing it is something simple I've overlooked, but it isn't clicking for me at this point and my search online for answers hasn't found one yet. Any suggestions would be appreciated. Thanks! ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Some rule packages have disappeared in Guvnor
Hey all, We restarted our JBoss Server (version 4.2.3.GA) on Linux and after the restart completed, we noticed that some of our packages (2) have disappeared. I've gone through the server log and there is an error (PathNotFoundException) for one of the missing packages, which I've pasted below. Included in Guvnor is the default package (still present), the mortgages example package (still present), and another working package for testing ideas (also still present). Has anyone seen this type of error before? Also, can someone tell me where these packages are stored in Guvnor so we can verify that the missing package is still out there? Any help would be appreciated. Thanks! 2010-10-15 13:41:48,241 INFO [STDOUT] Checking access for : Home Mortgage 2010-10-15 13:41:48,241 INFO [STDOUT] Checking access for : Commercial Mortgage 2010-10-15 13:42:43,975 INFO [STDOUT] ERROR 15-10 13:42:43,971 (RulesRepository.java:loadPackage:369) Unable to load a rule package. javax.jcr.PathNotFoundException: com.rulepackage at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2470) at org.drools.repository.RulesRepository.loadPackage(RulesRepository.java:3 64) at org.drools.guvnor.server.files.FileManagerUtils.getLastModified(FileMana gerUtils.java:367) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationCon text.java:31) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon text.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInte rceptor.java:28) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon text.java:68) at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionIntercept or.java:77) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon text.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextI nterceptor.java:44) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon text.java:68) at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterce ptor.java:157) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationCon text.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107 ) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBea nInterceptor.java:166) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor. java:102) at org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_8.getLastMo dified(FileManagerUtils_$$_javassist_8.java) at org.drools.guvnor.server.files.PackageDeploymentServlet.getLastModified( PackageDeploymentServlet.java:61) at javax.servlet.http.HttpServlet.service(HttpServlet.java:705) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42) at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpSe rvletRequest.java:53) at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte r.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs sociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j ava:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :102) at
Re: [rules-users] Is it possible to use CEP features in Guvnor?
I've done some additional experimentation and verified that you can't run Test Scenarios (at least, can't run them successfully). I did discover that I could create a Technical Rule that has the declare to establish our object as an event. I'm sure this isn't intended, but it works For technical rules, adding the from entry-point X is easy. For DSL rules, I can hide it in the translation for the literal values the user can specify For the Guided Rule Editor, it appears that adding Free Form DRL to the LHS of the rule under the Fact block to enter the from entry-point X part as well and it parses and runs okay. jp Date: Tue, 12 Oct 2010 20:50:28 +0100 From: Michael Anstis michael.ans...@gmail.com Subject: Re: [rules-users] Is it possible to use CEP features in Guvnor? To: Rules Users List rules-users@lists.jboss.org Message-ID: aanlktingb2zotr3wzskkn6reqfagclg60axgzuylv...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 I assume you mean using ther guided editor rather than a vanilla DRL Rule (free format text)? If the former then I don't believe it is possible (nor would testing with Guvnor's QA facility). DRL rules could be defined but not tested. 2010/10/12 John Peterson john.peterson.g...@statefarm.com I was wondering if it was possible to leverage the CEP features in Guvnor. I am not sure how we?d set the ?...@role(event)? in Guvnor or putting the ?entry-point? in the rule unless you use DSL (embedding it in the translation) or doing technical rules. ___ 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] Is it possible to use CEP features in Guvnor?
I was wondering if it was possible to leverage the CEP features in Guvnor. I am not sure how we'd set the @role(event) in Guvnor or putting the entry-point in the rule unless you use DSL (embedding it in the translation) or doing technical rules. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules update not working properly .
Hi All, If i modify the rule as follows it will work . what could be the issue . Is it bug in rules 5.1 rule Referback when $workflow : Workflow(workflowActorId==2) $workflow1 : Workflow() $workflowactor11 : WorkflowActor(actorId== 1) $workflowactor : WorkflowActor( $actoremail :actorEmail ) $workflowaction : WorkflowActions(currentUser==$actoremail actions=='referback', $prevActions : prevActions ) $workflowactor1 : WorkflowActor( actorId== 1 actorSign!=null) then System.out.println(drl2 action finally + $workflowaction.getActions() + $actoremail +$workflowactor1.getActorEmail() + $prevActions + $workflow.getWorkflowActorId() ); $workflow.setWorkflowActorId(1); $workflowactor1.setActorSign(null); $workflowaction.setActions(not need further actions); System.out.println(worklfow id + $workflow.getWorkflowActorId() + $workflowactor1.getActorId() ++ $workflowactor1.getActorSign()); $workflow1.setWorkflowActorId(0); $workflowactor11.setActorSign(null); update($workflowactor1); update($workflowaction); update($workflow); update($workflow1); update($workflowactor11); end Thanks in advance. sony.j...@kie.com .sg Sent by: To rules-users-bounc rules-users@lists.jboss.org e...@lists.jboss.or cc g Subject [rules-users] rules update not 08/25/2010 02:02 working properly . PM Please respond to Rules Users List rules-us...@list s.jboss.org Hi All, When i try to update three object in rules its changes the values in rules . But after update its not reflecting on my calling code. But workflowAction object has been updated. What could be the problem anything i missed out here. Please help me . rule Referback when $workflow : Workflow(workflowActorId==2) $workflowactor : WorkflowActor( $actoremail :actorEmail ) $workflowaction : WorkflowActions(currentUser==$actoremail actions=='referback', $prevActions : prevActions ) $workflowactor1 : WorkflowActor( actorId== 1 actorSign!=null) then System.out.println(drl2 action finally + $workflowaction.getActions() + $actoremail +$workflowactor1.getActorEmail() + $prevActions + $workflow.getWorkflowActorId() ); $workflow.setWorkflowActorId(1); $workflowactor1.setActorSign(null); $workflowaction.setActions(not need further actions); System.out.println(worklfow id + $workflow.getWorkflowActorId() + $workflowactor1.getActorId() ++ $workflowactor1.getActorSign()); update($workflowactor1); update($workflowaction); update($workflow); end Thanks in advance Regards Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner.
[rules-users] More Information - NoClassDefFoundError when inserting
We've discovered that if we create a class in Java corresponding to our DerivedValues class, we do not get the error, however, this takes away the flexibility we were trying to provide our Guvnor users. Interestingly enough, if we put a print statement into the setter for appID in the Java class, we DO NOT see the print message until the 52 record. It appears that Drools does not start looking for the Class Definition until we've hit some sort of maximum limit of records in Guvnor. Is there some limit (number of instances, memory, etc.)? -- Message: 5 Date: Tue, 24 Aug 2010 09:30:37 -0700 From: John Peterson john.peterson.g...@statefarm.com Subject: [rules-users] NoClassDefFoundError when inserting Guvnor-declared Fact To: rules-users@lists.jboss.org Message-ID: d3a6e68928c9104bb815c83f43a36bdf0e27c...@wpscv6nh.opr.statefarm.org Content-Type: text/plain; charset=us-ascii I'm experiencing a stack trace error (which I've pasted below) with a sample Drools/Guvnor application. I'm running version 5.0.1 right now. Here's the scenario: I have a Java application loading data (56 records right now) from a flat file, creating objects (one per row), parsing the individual fields on the file into the attributes of the objects, putting them into an array, and then inserting them into my Guvnor session. In Guvnor, I have a POJO model to receive the data plus a Declarative Model that enables the Guvnor user to set derived values based on the input data. There is a very basic rule that says the following (using the Guided Editor): When AppData[ad] Then System.out.println(Creating DerivedValues for + ad.getAwards_id()); /* Added as Free Form DRL Insert DerivedValues appID=ad.getAwards_ID(); System.out.println(DerivedValus for Awards_id + dv.getAwardsID()); /* Added as Free Form DRL Essentially, for each Fact of AppData, I'm creating and linking it to a Fact of DerivedValues that the user can add attributes to. I runs fine for the first 51 rows, then blows up on the rule when it is processing the 52 row (with 4 more to go after that). If I cut the file down to only have 51 rows, it doesn't blow up. The error - java.lang.NoClassDefFoundError: com/statefarm/DerivedValues is confusing because it has used DerivedValues 51 times without issue up to this point. I've been trying to a handle on this for a couple days without any luck. Here is my stack trace: RuleAgent(default) INFO (Tue Aug 24 11:17:12 CDT 2010): Configuring with newInstance=false, secondsToRefresh=-1 RuleAgent(default) INFO (Tue Aug 24 11:17:12 CDT 2010): Configuring package provider : URLScanner monitoring URLs: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com .statefarm/LATEST RuleAgent(default) INFO (Tue Aug 24 11:17:15 CDT 2010): Applying changes to the rulebase. RuleAgent(default) INFO (Tue Aug 24 11:17:16 CDT 2010): Adding package called com.statefarm (53 blank rows removed to save space) Creating DerivedValues for 122932 DerivedValus for Awards_id 122932 Creating DerivedValues for 122440 DerivedValus for Awards_id 122440 Creating DerivedValues for 122433 DerivedValus for Awards_id 122433 Creating DerivedValues for 122295 DerivedValus for Awards_id 122295 Creating DerivedValues for 119677 DerivedValus for Awards_id 119677 Creating DerivedValues for 118089 DerivedValus for Awards_id 118089 Creating DerivedValues for 118055 DerivedValus for Awards_id 118055 Creating DerivedValues for 118047 DerivedValus for Awards_id 118047 Creating DerivedValues for 118001 DerivedValus for Awards_id 118001 Creating DerivedValues for 117969 DerivedValus for Awards_id 117969 Creating DerivedValues for 117750 DerivedValus for Awards_id 117750 Creating DerivedValues for 117685 DerivedValus for Awards_id 117685 Creating DerivedValues for 117679 DerivedValus for Awards_id 117679 Creating DerivedValues for 117607 DerivedValus for Awards_id 117607 Creating DerivedValues for 117520 DerivedValus for Awards_id 117520 Creating DerivedValues for 117492 DerivedValus for Awards_id 117492 Creating DerivedValues for 117432 DerivedValus for Awards_id 117432 Creating DerivedValues for 117413 DerivedValus for Awards_id 117413 Creating DerivedValues for 117292 DerivedValus for Awards_id 117292 Creating DerivedValues for 117230 DerivedValus for Awards_id 117230 Creating DerivedValues for 117137 DerivedValus for Awards_id 117137 Creating DerivedValues for 116971 DerivedValus for Awards_id 116971 Creating DerivedValues for 116748 DerivedValus for Awards_id 116748 Creating DerivedValues for 116662 DerivedValus for Awards_id 116662 Creating DerivedValues for 116579 DerivedValus for Awards_id 116579 Creating DerivedValues for 116101 DerivedValus for Awards_id 116101 Creating DerivedValues for 115834 DerivedValus for Awards_id 115834 Creating DerivedValues for 115730 DerivedValus for Awards_id 115730 Creating DerivedValues for 114885 DerivedValus for Awards_id 114885 Creating DerivedValues for 114837
Re: [rules-users] Referenced file contains errors (http://drools.org/schema/drools-spring.xsd)
Hi, I used spring 3.0 with drools 5.1 ?xml version=1.0 encoding=windows-1252? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:drools=http://drools.org/schema/drools-spring; xsi:schemaLocation=http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd drools:resource id=resource1 type=DRL source=classpath:springtest.drl/ drools:resource id=resource2 type=DRL source=classpath:springtest1.drl/ drools:kbase id=kbase1 drools:resources drools:resource type=DRL source=classpath:springtest.drl/ drools:resource ref=resource1/ drools:resource ref=resource2/ /drools:resources /drools:kbase drools:ksession id=ksession2 type=stateful kbase=kbase1 / nanic23 nani...@hotmail. com To Sent by: rules-users@lists.jboss.org rules-users-bounc cc e...@lists.jboss.or g Subject [rules-users] Referenced file contains errors 08/26/2010 01:05 (http://drools.org/schema/drools-sp AMring.xsd) Please respond to Rules Users List rules-us...@list s.jboss.org I wasn't getting this error before but all of a sudden eclipse started showing this error message. I'm using drools 5.1.1 (it also happens with 5.1.0). Here is how my schema definition looks: http://drools-java-rules-engine.46999.n3.nabble.com/file/n1335740/drools-xsd.jpg and here is the eclipse error message [ 10, 1 for each flow I have :) ] http://drools-java-rules-engine.46999.n3.nabble.com/file/n1335740/drools-xsd-error-message.jpg Drools Spring integration is working fine and all my flows run without problems but nonetheless the error messages are annoying and I would like to have a clean project. I saw in other posts that a couple of ppl had the same problem. Anyone has been able to solve it? I appreciate the comments! Thanks, Nick. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Referenced-file-contains-errors-http-drools-org-schema-drools-spring-xsd-tp1335740p1335740.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 __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] NoClassDefFoundError when inserting Guvnor-declared Fact
I'm experiencing a stack trace error (which I've pasted below) with a sample Drools/Guvnor application. I'm running version 5.0.1 right now. Here's the scenario: I have a Java application loading data (56 records right now) from a flat file, creating objects (one per row), parsing the individual fields on the file into the attributes of the objects, putting them into an array, and then inserting them into my Guvnor session. In Guvnor, I have a POJO model to receive the data plus a Declarative Model that enables the Guvnor user to set derived values based on the input data. There is a very basic rule that says the following (using the Guided Editor): When AppData[ad] Then System.out.println(Creating DerivedValues for + ad.getAwards_id()); /* Added as Free Form DRL Insert DerivedValues appID=ad.getAwards_ID(); System.out.println(DerivedValus for Awards_id + dv.getAwardsID()); /* Added as Free Form DRL Essentially, for each Fact of AppData, I'm creating and linking it to a Fact of DerivedValues that the user can add attributes to. I runs fine for the first 51 rows, then blows up on the rule when it is processing the 52 row (with 4 more to go after that). If I cut the file down to only have 51 rows, it doesn't blow up. The error - java.lang.NoClassDefFoundError: com/statefarm/DerivedValues is confusing because it has used DerivedValues 51 times without issue up to this point. I've been trying to a handle on this for a couple days without any luck. Here is my stack trace: RuleAgent(default) INFO (Tue Aug 24 11:17:12 CDT 2010): Configuring with newInstance=false, secondsToRefresh=-1 RuleAgent(default) INFO (Tue Aug 24 11:17:12 CDT 2010): Configuring package provider : URLScanner monitoring URLs: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com .statefarm/LATEST RuleAgent(default) INFO (Tue Aug 24 11:17:15 CDT 2010): Applying changes to the rulebase. RuleAgent(default) INFO (Tue Aug 24 11:17:16 CDT 2010): Adding package called com.statefarm (53 blank rows removed to save space) Creating DerivedValues for 122932 DerivedValus for Awards_id 122932 Creating DerivedValues for 122440 DerivedValus for Awards_id 122440 Creating DerivedValues for 122433 DerivedValus for Awards_id 122433 Creating DerivedValues for 122295 DerivedValus for Awards_id 122295 Creating DerivedValues for 119677 DerivedValus for Awards_id 119677 Creating DerivedValues for 118089 DerivedValus for Awards_id 118089 Creating DerivedValues for 118055 DerivedValus for Awards_id 118055 Creating DerivedValues for 118047 DerivedValus for Awards_id 118047 Creating DerivedValues for 118001 DerivedValus for Awards_id 118001 Creating DerivedValues for 117969 DerivedValus for Awards_id 117969 Creating DerivedValues for 117750 DerivedValus for Awards_id 117750 Creating DerivedValues for 117685 DerivedValus for Awards_id 117685 Creating DerivedValues for 117679 DerivedValus for Awards_id 117679 Creating DerivedValues for 117607 DerivedValus for Awards_id 117607 Creating DerivedValues for 117520 DerivedValus for Awards_id 117520 Creating DerivedValues for 117492 DerivedValus for Awards_id 117492 Creating DerivedValues for 117432 DerivedValus for Awards_id 117432 Creating DerivedValues for 117413 DerivedValus for Awards_id 117413 Creating DerivedValues for 117292 DerivedValus for Awards_id 117292 Creating DerivedValues for 117230 DerivedValus for Awards_id 117230 Creating DerivedValues for 117137 DerivedValus for Awards_id 117137 Creating DerivedValues for 116971 DerivedValus for Awards_id 116971 Creating DerivedValues for 116748 DerivedValus for Awards_id 116748 Creating DerivedValues for 116662 DerivedValus for Awards_id 116662 Creating DerivedValues for 116579 DerivedValus for Awards_id 116579 Creating DerivedValues for 116101 DerivedValus for Awards_id 116101 Creating DerivedValues for 115834 DerivedValus for Awards_id 115834 Creating DerivedValues for 115730 DerivedValus for Awards_id 115730 Creating DerivedValues for 114885 DerivedValus for Awards_id 114885 Creating DerivedValues for 114837 DerivedValus for Awards_id 114837 Creating DerivedValues for 114760 DerivedValus for Awards_id 114760 Creating DerivedValues for 114728 DerivedValus for Awards_id 114728 Creating DerivedValues for 114652 DerivedValus for Awards_id 114652 Creating DerivedValues for 114317 DerivedValus for Awards_id 114317 Creating DerivedValues for 113944 DerivedValus for Awards_id 113944 Creating DerivedValues for 113908 DerivedValus for Awards_id 113908 Creating DerivedValues for 113251 DerivedValus for Awards_id 113251 Creating DerivedValues for 113230 DerivedValus for Awards_id 113230 Creating DerivedValues for 112949 DerivedValus for Awards_id 112949 Creating DerivedValues for 112397 DerivedValus for Awards_id 112397 Creating DerivedValues for 111749 DerivedValus for Awards_id 111749 Creating DerivedValues for 111313 DerivedValus for Awards_id 111313 Creating DerivedValues for 111035 DerivedValus for Awards_id 111035 Creating DerivedValues
[rules-users] rules update not working properly .
Hi All, When i try to update three object in rules its changes the values in rules . But after update its not reflecting on my calling code. But workflowAction object has been updated. What could be the problem anything i missed out here. Please help me . rule Referback when $workflow : Workflow(workflowActorId==2) $workflowactor : WorkflowActor( $actoremail :actorEmail ) $workflowaction : WorkflowActions(currentUser==$actoremail actions=='referback', $prevActions : prevActions ) $workflowactor1 : WorkflowActor( actorId== 1 actorSign!=null) then System.out.println(drl2 action finally + $workflowaction.getActions() + $actoremail +$workflowactor1.getActorEmail() + $prevActions + $workflow.getWorkflowActorId() ); $workflow.setWorkflowActorId(1); $workflowactor1.setActorSign(null); $workflowaction.setActions(not need further actions); System.out.println(worklfow id + $workflow.getWorkflowActorId() + $workflowactor1.getActorId() ++ $workflowactor1.getActorSign()); update($workflowactor1); update($workflowaction); update($workflow); end Thanks in advance Regards Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules un end looping when update
hi thomas, Thanks for reply , I want to set values in workflow Object. How i can do it. I try without update(m) but pojo is not updated. How i can accomplish the below after calling rules i need to get workflowid that has been updated in rules. { ksession.insert(workflow); ksession.fireAllRules(); System.out.println( workflow.getWorkflowId()); } rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowId(0); update(m); end On Tue, Aug 17, 2010 at 6:30 PM, Swindells, Thomas tswinde...@nds.com wrote: You are calling update(m), which means that you are telling drools that m has changed, which means that any rule that has a condition based upon that rule gets re-evaluated, which causes Your First Rule to be fired again, which will then update m again... Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:28 To: rules-users@lists.jboss.org Subject: [rules-users] rules un end looping when update Hi all, Iam using rules 5.1 iam getting un endded printout in my console. What could be the issue. Thanks in advance. #created on: Aug 16, 2010 package com.test.supplier #list any import classes here. #declare any global variables here import com.test.supplier.dao.Workflow; rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); update(m); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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 un end looping when update
Hi Thomas, thanks Its my mistake i am able to solve it . rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowActorId(0); update(m); end On Tue, Aug 17, 2010 at 6:47 PM, sony john sonyt...@gmail.com wrote: hi thomas, Thanks for reply , I want to set values in workflow Object. How i can do it. I try without update(m) but pojo is not updated. How i can accomplish the below after calling rules i need to get workflowid that has been updated in rules. { ksession.insert(workflow); ksession.fireAllRules(); System.out.println( workflow.getWorkflowId()); } rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowId(0); update(m); end On Tue, Aug 17, 2010 at 6:30 PM, Swindells, Thomas tswinde...@nds.com wrote: You are calling update(m), which means that you are telling drools that m has changed, which means that any rule that has a condition based upon that rule gets re-evaluated, which causes Your First Rule to be fired again, which will then update m again... Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:28 To: rules-users@lists.jboss.org Subject: [rules-users] rules un end looping when update Hi all, Iam using rules 5.1 iam getting un endded printout in my console. What could be the issue. Thanks in advance. #created on: Aug 16, 2010 package com.test.supplier #list any import classes here. #declare any global variables here import com.test.supplier.dao.Workflow; rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); update(m); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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 un end looping when update
Thanks Thomas, I am able to update now. One more question i would like to ask you. I i need to insert one more object called WorkflowMail and call WorkflowMail when the above rule condition is True how i can do it. I can insert the object but how i can call that object in rules. REgards Sony John On Tue, Aug 17, 2010 at 7:05 PM, Swindells, Thomas tswinde...@nds.com wrote: I prefer using modify rather than update but that is a minor issue. Your key problem is that your rule fires regardless whether it needs to or not, you need to write your rule so it only fires when it is valid for the action to be performed. In your current rule you seem to be doing a null check against workflowActorId and then setting workflowId; you probably want to make these consistent so you do a null check and then set that same property to an appropriate value. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:47 To: Rules Users List Subject: Re: [rules-users] rules un end looping when update hi thomas, Thanks for reply , I want to set values in workflow Object. How i can do it. I try without update(m) but pojo is not updated. How i can accomplish the below after calling rules i need to get workflowid that has been updated in rules. { ksession.insert(workflow); ksession.fireAllRules(); System.out.println( workflow.getWorkflowId()); } rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); m.setWorkflowId(0); update(m); end On Tue, Aug 17, 2010 at 6:30 PM, Swindells, Thomas tswinde...@nds.com wrote: You are calling update(m), which means that you are telling drools that m has changed, which means that any rule that has a condition based upon that rule gets re-evaluated, which causes Your First Rule to be fired again, which will then update m again... Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of sony john Sent: 17 August 2010 11:28 To: rules-users@lists.jboss.org Subject: [rules-users] rules un end looping when update Hi all, Iam using rules 5.1 iam getting un endded printout in my console. What could be the issue. Thanks in advance. #created on: Aug 16, 2010 package com.test.supplier #list any import classes here. #declare any global variables here import com.test.supplier.dao.Workflow; rule Your First Rule when m: Workflow(workflowActorId==null,myid:workflowActorId) then System.out.println(myid + its null values); update(m); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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 ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users
[rules-users] Rule flow persistence MY SQL
Hi , Iam trying to persistence drools workflow using my sql as back end . But iam getting Could not commit sessions Iam trying with example code, drool.session.conf file contains drools.workItemHandlers = MyWorkItemHandlers.conf #drools.commandService = org.drools.persistence.session.SingleSessionCommandService #drools.processInstanceManagerFactory = org.drools.persistence.processinstance.JPAProcessInstanceManagerFactory #drools.workItemManagerFactory = org.drools.persistence.processinstance.JPAWorkItemManagerFactory #drools.processSignalManagerFactory = org.drools.persistence.processinstance.JPASignalManagerFactory Folllwoing are my rf file My RF file ?xml version=1.0 encoding=UTF-8? process xmlns=http://drools.org/drools-5.0/process; xmlns:xs=http://www.w3.org/2001/XMLSchema-instance; xs:schemaLocation=http://drools.org/drools-5.0/process drools-processes-5.0.xsd type=RuleFlow name=droolsflow id=org.plugtree.labs.droolsflow package-name=org.plugtree.labs header imports import name=org.kie.lab.variablepersistence.MyEntity / import name=org.kie.lab.variablepersistence.MyVariableSerializable / /imports variables variable name=x type name=org.drools.process.core.datatype.impl.type.StringDataType / /variable variable name=y type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyEntity / /variable variable name=z type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyVariableSerializable / /variable variable name=a type name=org.drools.process.core.datatype.impl.type.StringDataType / /variable variable name=b type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyEntity / /variable variable name=c type name=org.drools.process.core.datatype.impl.type.ObjectDataType className=org.kie.lab.variablepersistence.MyVariableSerializable / /variable /variables /header nodes humanTask id=4 name=Human Task x=208 y=16 width=93 height=48 work name=Human Task parameter name=ActorId type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Comment type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Content type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Priority type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Skippable type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=TaskName type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter /work /humanTask humanTask id=9 name=Human Task x=713 y=16 width=100 height=48 work name=Human Task parameter name=ActorId type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Comment type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Content type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Priority type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=Skippable type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter parameter name=TaskName type name=org.drools.process.core.datatype.impl.type.StringDataType / /parameter /work /humanTask actionNode id=8 name=Action x=601 y=20 width=80 height=40 action type=expression dialect=java System.out.println(x = + x); System.out.println(y = + y); System.out.println(z = + z); System.out.println(a = + a); System.out.println(b = + b); System.out.println(c = + c); kcontext.setVariable(a, Some changed String); kcontext.setVariable(b, new MyEntity(This is a changed test Entity)); kcontext.setVariable(c, new MyVariableSerializable(This is a changed test SerializableObject));/action /actionNode actionNode id=6 name=Action x=333 y=20 width=80 height=40 action type=expression dialect=java System.out.println(x = + x); System.out.println(y = + y); System.out.println(z = + z); kcontext.setVariable(a, Some new String); kcontext.setVariable(b, new MyEntity(This is a new test Entity)); kcontext.setVariable(c, new MyVariableSerializable(This is a new test SerializableObject));/action /actionNode start id=1 name=Start x=16 y=16 width=48 height=48 / end id=3 name=End
Re: [rules-users] How to use Drools Flow?
Hi Xiao , Could you explain to me also how done the workflow , becuase iam also looking same solutions. If you have sample code please update tha too. Regards Sony John XiaoMiTang dingyongch...@ho tmail.com To Sent by: rules-users@lists.jboss.org rules-users-bounc cc e...@lists.jboss.or g Subject Re: [rules-users] How to use Drools Flow? 08/04/2010 09:38 AM Please respond to Rules Users List rules-us...@list s.jboss.org I have omitted DefaultProcessEventListener,so the workflow can not be finished automatically when user B finished the task. now all is ok,thank you~ -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-use-Drools-Flow-tp1014591p1021025.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 __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ Information in this e-mail is intended solely for the person(s) to whom it is addressed and may contain confidential information. If you are not the intended recipient, please notify the sender and delete this e-mail message and any other record of it from your system immediately. You should not disclose or disseminate the information to any person, use it for any purpose or store or copy the information in any form or manner. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] FW: how to fire a subset of rules in KB?
Date: Mon, 7 Jun 2010 17:28:12 +0800 From: wenjinchao wenjinchao0...@gmail.com Subject: [rules-users] how to fire a subset of rules in KB? To: rules-users rules-users@lists.jboss.org Message-ID: 201006071728086572...@gmail.com Content-Type: text/plain; charset=us-ascii Hi all, I'm a newbie for drools. And i want to know how to fire a subset of rules in KB, suppose there are three rules named A,B,C, and I want to fire rule A only. by the way, suppose there is a drl file containing rule, and i have set up KB, and call fireAllRules through statefulKnowledgeSession. After that, the rule file is changed, how to load rules dynamicly? Is there any solution? Thanks in advance! best regards. 2010-06-07 Wenjinchao Hi, I'll take a crack at you first question Check out Agenda Filters: http://legacy.drools.codehaus.org/Agenda The example listed is using Rule Names, but you can use the following to look at Meta Attribute values instead: AgendaFilter filter = new AgendaFilter() { @Override public boolean accept(Activation activation) { // Filter out rule Hello World from Sample.drl for execution if (activation.getRule().getMetaAttribute(Purpose).equals(Print Hello World)) { return true; } return false; } }; On your rules, you'll want to add a meta attribute for groups A, B, and C. Here's an example: rule Hello World @Purpose(Print Hello World)--- THIS IS YOUR META-ATTRIBUTE when m : Message( status == Message.HELLO, myMessage : message ) then System.out.println( myMessage ); m.setMessage( Goodbye cruel world ); m.setStatus( Message.GOODBYE ); update( m ); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Working on Selectors - getting 'The Selector named onlyNonDraftRules is not available'
I'm working off of Jarosław Kijanowski's blog post from 7/8/2009 on using Selectors: http://www.kijanowski.eu/index.php?site=articlesarticle=guvnor_selectorslang=en I've followed the instructions for a DRL selector, including adding a line to the selector.properties file as follows: onlyNonDraftRules=/NonDraft.drl Both the NonDraft.drl file and selector.properties file are here: parent directory\jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-INF\classes My NonDraft.drl is as follows: package org.drools.guvnor.server.selector import org.drools.repository.AssetItem import org.drools.guvnor.server.selector.Allow rule 'non draft rules' dialect 'mvel' when AssetItem(stateDescription != Draft) then insert(new Allow()); end When I try to do a Build Package in Guvnor, I get the following error: Name: com.sample, Format: package, Message: The Selector named onlyNonDraftRules is not available My package in Guvnor has a few rules, only one of which is not in Draft status. Everything is built in Guvnor (including Facts - no code is written in Eclipse). Has anyone seen this error before and know how to correct it? I'm using 5.0.1. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using Drools as a glorified Hashmap
Hey Daniel, My suggestion was that a single default rule could be fired to indicate that the prescription was invalid if all the matching rules failed to create a valid match. Example: - Match Rule 1, Salience 50, Activation-group Match Rules - Match Rule 2, Salience 50, Activation-group Match Rules - Match Rule 3, Salience 50, Activation-group Match Rules - Match Rule 4, Salience 50, Activation-group Match Rules - Match Rule 5, Salience 50, Activation-group Match Rules - Match Rule 6, Salience 50, Activation-group Match Rules - Match Rule 7, Salience 50, Activation-group Match Rules - Match Rule 8, Salience 50, Activation-group Match Rules - Match Rule 9, Salience 50, Activation-group Match Rules - No Match Rule 1, Salience 0, Activation-group Match Rules Activation-group allows only one rule to fire from all the rules sharing that activation-group. By putting a positive salience (priority) on all the match rules, if any one of them matches, that's all that can fire per the activation-group. However, if the No Match rule is fired, that means that the prescription was not matched by any of the match rules. It is a default. The rule can be as simple as: Rule No Match salience 0 activation-group Match Rules When Eval(true) // Always true Then Do your no match logic End The activation-group is doing your heavy lifting, so to speak jp Message: 3 Date: Wed, 19 May 2010 06:20:39 -0700 (PDT) From: djb dbrownel...@hotmail.com Subject: Re: [rules-users] Using Drools as a glorified Hashmap To: rules-users@lists.jboss.org Message-ID: 1274275239719-829059.p...@n3.nabble.com Content-Type: text/plain; charset=us-ascii Hi John, Wolfgang, Thanks for your suggestions. Though I didn't use either of your suggestions as described, it helped me work it out. I added tokens describing the prescriptions, then as they are matched (using RETE), the tokens are retracted. Then any tokens left over are invalid. It is probably as fast as a HashMap. I don't think John's solution would have worked, because no single rule can determine whether a prescription is invalid. Regards, Daniel -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-Drools-as-a-gl orified-Hashmap-tp825851p829059.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] Using Drools as a glorified Hashmap
How many match rules do you have? You could always set a single invalid rule with a low salience (at least lower than your match rules) that is always true and sets the flag that it is invalid. Then put all the rules into the same activation-group so that only one can fire. If the invalid flag is set, that means that the 'no match' rule was the only one that could have fired. If it matches, the activation-group will prevent the 'no match' rule from firing -- Message: 3 Date: Tue, 18 May 2010 02:56:21 -0700 (PDT) From: djb dbrownel...@hotmail.com Subject: [rules-users] Using Drools as a glorified Hashmap To: rules-users@lists.jboss.org Message-ID: 1274176581461-825851.p...@n3.nabble.com Content-Type: text/plain; charset=us-ascii Hi Drools users, I've got a situation where I've got a list of Drug codes which can only be used for certain prescription codes. The traditional method for implementing this is to simply pre-load the values in a static Hashmap. Then if get() returns null, it is not a valid combination. O(1), blazingly fast. The issue with using Drools for this, is that Drools can match a code to a code, and mark it as valid, but cannot call it invalid, as another rule may still be relevant. Therefore, using Drools for this would require marking combinations as valid, and afterwards, doing a linear traversal of the prescriptions to see if there are any combinations that are not valid. Is this the case? I would like to try implement it in Drools just for the sake of consistency, but it seems a bit of a hack. Thanks, Daniel -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-Drools-as-a-gl orified-Hashmap-tp825851p825851.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
[rules-users] Questions about using Knowledge Agent
Hi all, I'm trying to get the sample code in the Drools 5.0.1 User Manual to work locally for a Knowledge Agent, but I'm missing some info (from my perspective) to get it to run. Question #1: From the User Manual (3.2.6): KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( MyAgent ); kagent.applyChangeSet( ResourceFactory.newUrlResource( url ) ); KnowledgeBase kbase = kagent.getKnowledgeBase(); In the third line, what is url and how is it defined in the java code? I don't know what to set up here to make it work. I've found this same code on multiple sites, but no answer to the question. Question #2: How do I set up a Change Set XML file? I see the XML, but I don't know where to put the file and how to link it into the code. Question #3: Does KnowledgeAgent replace RuleAgent for invoking Guvnor-deployed packages in 5.0.1? If so, how do you specify the url of the deployed package from Guvnor? Sorry if my questions are ignorant. I've been trying to find these answers for several days and hit the point where I needed to get some help. Thanks, John ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules not wrking
If you really wanted to see your text string there, you might be able to invoke a method that takes that text string and prints it and then returns true in all cases. You'd most likely need to put it in an Eval as suggested below. You can't directly use java code inside the LHS of a rule. You can though use eval to call a java method inside your LHS. Also remember that you don't have to use ; in the patterns. 2010/4/30 Puneet duggal duggalpu...@gmail.com frnds i have a rule and its not working and i for checking i have put a Sop in my when but it not prints the Inside Area_SqFt_1_10-01-09_12-31-14 so how can we put SOP inside when clause. rule Area_SqFt_1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when System.out.println(Inside Area_SqFt_1_10-01-09_12-31-14); objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SqFt_1_10-01-09_12-31-14); objectP2483.setFid31003(new Double(497)); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users