Re: [rules-users] Guvnor data enumeration issue
You'll need to raise a JIRA for an enhancement. Dependent enumerations are currently only designed to operate between enumerations. With kind regards, Mike 2011/10/28 gpa...@tsys.com I am trying to use data enumerations and running into a problem. Following the Vehicle engineType/fuelType data enumeration example in the Guvnor manual, I created the following enumeration list and it works: 'Vehicle.engineType' : (new test.VehicleHelper()).getEngineTypes() 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' VehicleHelper: public class VehicleHelper { public ListString getEngineTypes(){ ListString engineTypes = new ArrayListString(); engineTypes.add(Petrol); engineTypes.add(Diesel); return engineTypes; } public ListString getFuelTypes(String engineType){ ListString fuelTypes = new ArrayListString(); if(Petrol.equalsIgnoreCase(engineType)){ fuelTypes.add(ULP); fuelTypes.add(PULP); } else if(Diesel.equalsIgnoreCase(engineType)){ fuelTypes.add(BIO); fuelTypes.add(NORMAL); } else{ fuelTypes.add(Default Fuel 1); fuelTypes.add(Default Fuel 2); } return fuelTypes; } } Above works as expected. Problem: I want to only have an enumeration on Vehicle.fuelType that depends on the value of engineType, without specifying an enumeration on engineType. So, I took out the first line in my enumeration list so that it is now: 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' But that does not work. When I create a rule, VehicleHelper.getFuelTypes does not get called and the dropdown for fuelType is not a list. How do I get this working? Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ 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] how can i get document of ruleflow?
HI: can anybody tell me .how can i get document of ruleflow? i didnt find it in droolsjbpm-integration-distribution-5.2.0.Final.and i didnt find any document about rf. i want know the means of Event,Event Wait ..etc. if somebody can give me a link,think you very much. -- View this message in context: http://drools.46999.n3.nabble.com/how-can-i-get-document-of-ruleflow-tp3460258p3460258.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] Java Drools developer
Hi Everyone Firstly, apologies for the impersonal nature of this email - I am working with a client to short timescales and need to cast a quick net... Your details have been highlighted from my database in reference to a Java Developer assignment based in Cork Ireland, which I am presently resourcing. I'd like to find out if you are interested or whether you know of someone else more appropriate whom we could help... The high level requirements are as follow: * 6-month initial contract * Java/JEE * JBOSS Rules -DROOLS * PL/SQL * Struts * Hibernate * Spring If this is the type of opportunity you are interested in hearing about from Modis International, I would be most grateful if you could forward me your most up to date CV, indicating your availability; I will call you to discuss the assignment and to provide you with more specific details. If however, this isn't relevant to your current skills or requirements - it is likely that we hold an out of date CV. In this instance, apologies again, but please still forward me your most up to date CV alongside a brief outline of what you are looking for in order to ensure that we do only contact you with relevant opportunities in the future... Thanks in advance! Please send your Uptodate CV to: danielle.sl...@modisintl.commailto:danielle.sl...@modisintl.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Fwd: Accumulate and Collect issue - Guvnor 5.2 Final
-- Forwarded message -- From: praveen.sa...@gmail.com Date: 28 October 2011 10:48 Subject: Accumulate and Collect issue - Guvnor 5.2 Final Hi, We gave a try with 5.2 Final version, and see that all collect clauses appears in grey and are not editable (such conditions are also not deletable). Everything was OK with the M2 version (rules were edited with this version). It is quite strange because all the collect condition is greyed, just like a disabled field, and seems to be done by purpose. Is collect deprecated ? http://drools.46999.n3.nabble.com/rules-users-Guvnor-5-2-CR1-problem-with-collect-in-guided-editor-td3062287.html Above Forum link says to import what is required into the package definition. Could you please provide a detailed step-by-step procedure to get this accomplished. Our intention is to get all the Collection types in the Guvnor UI. Thanks Regards, Praveen. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Accumulate and Collect issue - Guvnor 5.2 Final
I assume you have not tried adding the import? Select the package, edit the package, add an import for java.util.List. On 28 October 2011 10:55, Michael Anstis michael.ans...@gmail.com wrote: -- Forwarded message -- From: praveen.sa...@gmail.com Date: 28 October 2011 10:48 Subject: Accumulate and Collect issue - Guvnor 5.2 Final Hi, We gave a try with 5.2 Final version, and see that all collect clauses appears in grey and are not editable (such conditions are also not deletable). Everything was OK with the M2 version (rules were edited with this version). It is quite strange because all the collect condition is greyed, just like a disabled field, and seems to be done by purpose. Is collect deprecated ? http://drools.46999.n3.nabble.com/rules-users-Guvnor-5-2-CR1-problem-with-collect-in-guided-editor-td3062287.html Above Forum link says to import what is required into the package definition. Could you please provide a detailed step-by-step procedure to get this accomplished. Our intention is to get all the Collection types in the Guvnor UI. Thanks Regards, Praveen. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Does window:length work in Drools version 5.1.1 ?
Drools-expert 5.1.1 Does window:length work in Drools version 5.1.1 ? It seems that over window:length( 5 ) in rule PossibleFFF_launch_level1 does not work. It seems that it returns only the last MMMBean added in trackers in rules PossibleFFF_Level1_update_tracker_count and PossibleFFF_Level2_update_tracker_count. The idea here is that trackers keep count of how many MMMBeans have entered the system, after incoming ean with bbbEmpty == true have initiated the tracking (PossibleFFF). App domain specific operations are launched if there is no active counts (actCount) in a series of MMMBeans (PossibleFFF_launch_level1 and PossibleFFF_launch_level2). actCount is an integer but accumulate function sum apparently returns a floating point number, hence the check doubleValue 0.5. Rules PossibleFFF_kill_tracker_with_bbb and PossibleFFF_kill_tracker_with_count are to retract the trackers from memory, so ending the tracking. Rule PossibleFFF_kill_tracker_with_bbb kills this profileID's tracker if bbbEmpty == false. Rule PossibleFFF_kill_tracker_with_count kills tracker if count 5, count indicating that no operations were launched (PossibleFFF_launch_level1 and PossibleFFF_launch_level2). Problem is, that the condition $theSum : Number(doubleValue 0.5) from accumulate( // MMMBean( $actCount : activeCount) over window:length( 5 ) from $tracker.mdsBeanList, MMMBean( $actCount : activeCount) over window:length( 5 ) from $tracker.getMdsBeanList(), sum( $actCount ) ) in rules PossibleFFF_launch_level1 and PossibleFFF_launch_level2 does not seem to work as expected. I expected that the sum would be calculated from field MMMBean.actCount over all MMMBean members of list $tracker.mdsBeanList. It seems that sum returns only the actCount of last MMMBean which was inserted in $tracker.mdsBeanList. Is there something wrong with the rules ? Rules are like these: // RULES -- rule PossibleFFF dialect mvel when $bsb : ean(bbbEmpty == true) not FFFTracker(profileID == $bsb.profileID) then FFFTracker $tracker = new FFFTracker(); $tracker.level = 1; $tracker.count = 0; $tracker.profileID = $bsb.profileID; $tracker.location = $bsb.location; retract($bsb); $tracker.sensorBean = $bsb; insert($tracker); end rule PossibleFFF_Level1_update_tracker_count dialect mvel when $tracker : FFFTracker(level == 1) $mds : MMMBean(profileID == $tracker.profileID, this after $tracker) then drools.retract($mds); $tracker.addMdsBean($mds); $tracker.count = $tracker.count + 1; drools.update($tracker); end rule PossibleFFF_launch_level1 dialect mvel when $tracker : FFFTracker(level == 1, count == 5, $prof : profileID) $theSum : Number(doubleValue 0.5) from accumulate( // MMMBean( $actCount : activeCount) over window:length( 5 ) from $tracker.mdsBeanList, MMMBean( $actCount : activeCount) over window:length( 5 ) from $tracker.getMdsBeanList(), sum( $actCount ) ) then retract($tracker); FFFTracker $tracker2 = new FFFTracker(); $tracker2.level = 2; $tracker2.profileID = $tracker.profileID; $tracker2.location = $tracker.location; $tracker2.sensorBean = $tracker.sensorBean; $tracker2.count = 0; // Tracker2 is set to track further conditions insert($tracker2); // launch the app domain specific things end rule PossibleFFF_Level2_update_tracker_count dialect mvel when $tracker : FFFTracker(level == 2) $mds : MMMBean(profileID == $tracker.profileID, this after $tracker) then drools.retract($mds); $tracker.addMdsBean($mds); $tracker.count = $tracker.count + 1; drools.update($tracker); end rule PossibleFFF_launch_level2 dialect mvel when $tracker : FFFTracker(level == 2, count == 5, $prof : profileID) $theSum : Number(doubleValue 0.5) from accumulate( // MMMBean( $actCount : activeCount, profileID == $prof) over window:length( 5 ) from $tracker.mdsBeanList, MMMBean( $actCount : activeCount, profileID == $prof) over window:length( 5 ) from $tracker.getMdsBeanList(), sum( $actCount ) ) then retract($tracker); // launch the app domain specific things end rule PossibleFFF_kill_tracker_with_bbb dialect mvel when $tracker : FFFTracker($prof : profileID, $loc : location) $bsb : ean(profileID == $prof, location == $loc, bbbEmpty == false, this after $tracker) then retract($tracker); end rule PossibleFFF_kill_tracker_with_count dialect mvel when $tracker : FFFTracker(count 5, $prof : profileID) then retract($tracker); end // -- RULES ean, MMMBean, FFFTracker are declared as events. class FFFTracker: public class FFFTracker extends Tracker { private ArrayListBean mdsBeanList = new ArrayListBean(); public ArrayListMMMBean getMdsBeanList() { return mdsBeanList; } public void setMdsBeanList(ArrayListMMMBean pmdsbeanlist) {
Re: [rules-users] Accumulate and Collect issue - Guvnor 5.2 Final
Thanks Mike! It works. Regards, Praveen. 2011/10/28 Michael Anstis michael.ans...@gmail.com I assume you have not tried adding the import? Select the package, edit the package, add an import for java.util.List. On 28 October 2011 10:55, Michael Anstis michael.ans...@gmail.com wrote: -- Forwarded message -- From: praveen.sa...@gmail.com Date: 28 October 2011 10:48 Subject: Accumulate and Collect issue - Guvnor 5.2 Final Hi, We gave a try with 5.2 Final version, and see that all collect clauses appears in grey and are not editable (such conditions are also not deletable). Everything was OK with the M2 version (rules were edited with this version). It is quite strange because all the collect condition is greyed, just like a disabled field, and seems to be done by purpose. Is collect deprecated ? http://drools.46999.n3.nabble.com/rules-users-Guvnor-5-2-CR1-problem-with-collect-in-guided-editor-td3062287.html Above Forum link says to import what is required into the package definition. Could you please provide a detailed step-by-step procedure to get this accomplished. Our intention is to get all the Collection types in the Guvnor UI. Thanks Regards, Praveen. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- praveen kumar ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Regression 5.1-5.2 with conflicting ClassNames
I second that problem. Switching from Drools 5.1 to 5.2 or 5.3 brought issues that were resolved by fully qualifying fact names. Here are samples illustrating the problem: *Sample1:* *Sample2:* *Sample3 (continues Sample2 as the following is in the same DRL file):* Like thomas, adding namespace where there was a name conflict resolved the issues. However, something seem to go wrong when parsing and, sometimes, executing. Alexis -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Regression-5-1-5-2-with-conflicting-ClassNames-tp3268164p3460816.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] Regression 5.1-5.2 with conflicting ClassNames
Added code examples... * Sample1:* import namespace1.MyObject; rule r when namespace2.MyObject( value == 3 ) MyObject( attr1 == foo ) //Here, got a parsing error stating attr1 is not a field because it looks it up from namespace2.MyObject then // ... end *Sample2:* import namespace1.MyObject; declare MyLocalType val: namespace2.MyObject end rule r1 when MyObject( attr1 == foo ) //Here, got a parsing error stating attr1 is not a field because it looks it up from namespace2.MyObject then MyLocalType $mlt = new MyLocalType(); $mlt.setVal( new namespace2.MyObject() ); insert( $mlt ); end *Sample3 (continues Sample2 as the following is in the same DRL file):* rule r2 when MyObject() //Here: there is no name conflict but, at execution time, the rule is not activated; //fully qualifying the fact type solved the issue (meaning activation seems to wait for namespace2.MyObject to fire the rule...) then // ... end On 28 October 2011 13:34, abr alexis.brou...@haulogy.net wrote: I second that problem. Switching from Drools 5.1 to 5.2 or 5.3 brought issues that were resolved by fully qualifying fact names. Here are samples illustrating the problem: *Sample1:* *Sample2:* *Sample3 (continues Sample2 as the following is in the same DRL file):* Like thomas, adding namespace where there was a name conflict resolved the issues. However, something seem to go wrong when parsing and, sometimes, executing. Alexis -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Regression-5-1-5-2-with-conflicting-ClassNames-tp3268164p3460816.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] 5.3.0 Faster Complation?
Hi, From documentation of 5.3.0: 2.1.1.4. Faster compilation Thanks to many improvements and optimizations made on both MVEL library and Drools internals, the DRL compilation is now at least 3 times faster for both MVEL and Java dialects. Does it really affect the runtime execution of already compiled serialized rules in production? Any technical details will help. Thanks, saleem ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] confusing behaviour of enum comparison
I reverted to the proper mvel for 5.2.0.Final (mvel2-2.1.0.drools2.jar) but the behaviour is the same. I am using the same test with the same objects, and the only thing I change is the syntax of the rule. the Status of the object being put in working memory is PENDING, and if the rule says: $step : Step(status == Status.ACTIVE, task.status.active == false) the rule fires (there is a match), but if I change the rule to say: $step : Step(status == Status.ACTIVE, task.status != Status.ACTIVE) the rule does not fire (no match) We are not migrating to 5.3.0.Final due to the problem discussed here: http://drools.46999.n3.nabble.com/5-3-0-Final-resource-change-scanner-bug-td3449420.html -- View this message in context: http://drools.46999.n3.nabble.com/confusing-behaviour-of-enum-comparison-tp3455245p3461454.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how can i get document of ruleflow?
now you can take a look into the documentation section of the jbpm5 project here: www.jbpm.org Cheers On Fri, Oct 28, 2011 at 4:24 AM, xdyl xdylx...@163.com wrote: HI: can anybody tell me .how can i get document of ruleflow? i didnt find it in droolsjbpm-integration-distribution-5.2.0.Final.and i didnt find any document about rf. i want know the means of Event,Event Wait ..etc. if somebody can give me a link,think you very much. -- View this message in context: http://drools.46999.n3.nabble.com/how-can-i-get-document-of-ruleflow-tp3460258p3460258.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 -- - CTO @ http://www.plugtree.com - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 5.3.0 Faster Complation?
On 28/10/2011 08:36, Saleem Lakhani wrote: Hi, *From documentation of 5.3.0:* *2.1.1.4. Faster compilation* Thanks to many improvements and optimizations made on both MVEL library and Drools internals, the DRL compilation is now at least 3 times faster for both MVEL and Java dialects. Does it really affect the runtime execution of already compiled serialized rules in production? Any technical details will help. It's related to compilation performance. There is nothing here that will change runtime execution performance. Thanks, saleem ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor data enumeration issue
created jira 3270 for this. Also created 3271 along the same lines. From: Michael Anstis michael.ans...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 10/28/2011 12:07 AM Subject:Re: [rules-users] Guvnor data enumeration issue Sent by:rules-users-boun...@lists.jboss.org You'll need to raise a JIRA for an enhancement. Dependent enumerations are currently only designed to operate between enumerations. With kind regards, Mike 2011/10/28 gpa...@tsys.com I am trying to use data enumerations and running into a problem. Following the Vehicle engineType/fuelType data enumeration example in the Guvnor manual, I created the following enumeration list and it works: 'Vehicle.engineType' : (new test.VehicleHelper()).getEngineTypes() 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' VehicleHelper: public class VehicleHelper { public ListString getEngineTypes(){ ListString engineTypes = new ArrayListString(); engineTypes.add(Petrol); engineTypes.add(Diesel); return engineTypes; } public ListString getFuelTypes(String engineType){ ListString fuelTypes = new ArrayListString(); if(Petrol.equalsIgnoreCase(engineType)){ fuelTypes.add(ULP); fuelTypes.add(PULP); } else if(Diesel.equalsIgnoreCase(engineType)){ fuelTypes.add(BIO); fuelTypes.add(NORMAL); } else{ fuelTypes.add(Default Fuel 1); fuelTypes.add(Default Fuel 2); } return fuelTypes; } } Above works as expected. Problem: I want to only have an enumeration on Vehicle.fuelType that depends on the value of engineType, without specifying an enumeration on engineType. So, I took out the first line in my enumeration list so that it is now: 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' But that does not work. When I create a rule, VehicleHelper.getFuelTypes does not get called and the dropdown for fuelType is not a list. How do I get this working? Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users