Re: [rules-users] conditions getting removed from Guided Rule
Thanks for your clarifications. The problem was in mvel. I reproduced and fixed it ( https://github.com/mvel/mvel/commit/874b03a8c5700661b503d96ad5d2ce1397cde18a ). The fix will be available when we will drop another mvel release and integrate it. For now I can only confirm that field names starting with an underscore cannot work with the current release. Thanks again and regards, Mario -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030331.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] conditions getting removed from Guided Rule
Hello, Class ProducerMasterForRules isn't valid; it references getPCuisines() that isn't in the class. Since your rule uses the affected public methods getPrimaryCuisine() and getSecondaryCuisine() can you provide the missing implementation? I could mock something up, but want to be sure to use exactly what you are. With kind regards, Mike On 12 July 2014 12:17, sumit dhaniya sumitdhan...@gmail.com wrote: Michael I really appreciate all the help from the forum and the time invested by the people to answer the queries. I'm working as a freelance developer so if support is something affordable then please let me know. DRL :- 2.| 3.|import java.lang.Number;4. |import com.sophic.foodeemee.offers.dto.SearchContext;5.| import com.sophic.foodeemee.offers.dto.ProducerMasterForRules;6.|import com.sophic.foodeemee.offers.dto.RuleFactor; 7.|8.|rule SecondaryCuisineRepeatUsage 9.|dialect mvel10. |when11.| $searchContext : SearchContext( lastThreeCuisines != null ) 12.| ProducerMasterForRules( primaryCuisine != null , primaryCuisine != $searchContext.lastThreeCuisines , secondaryCuisine != null , secondaryCuisine == $searchContext.lastThreeCuisines ) 13.| $secondaryCuisineRepeatUsageFactor : RuleFactor( )14.| then15.| $secondaryCuisineRepeatUsageFactor.setWeightageImpact( -30 ); 16.|update( $secondaryCuisineRepeatUsageFactor );17.| end object models are attached. On Sat, Jul 12, 2014 at 3:40 PM, Michael Anstis michael.ans...@gmail.com wrote: Asking (at least) three questions at the same time on the same thread is really going to annoy people. It's the weekend; most people are not working and you are not paying for our support. When I am at my computer on Monday I will be happy to answer more. For now; please provide the DRL for the rule that does not reopen correctly and your object model. Sent on the move On 12 Jul 2014 10:54, Sumit Dhaniya sumitdhan...@gmail.com wrote: I create the rule by comparing properties of two objects as shown in image attached. Till I don't close the window generated source looks fine but when I open this rule after closing it. But when I open the rule next time it removes the highlighted condition from the rule and also removes them from drl. Just wondering is there anything I'm doing wrong or issue is something else. http://drools.46999.n3.nabble.com/file/n4030322/rule_snapshot.png -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030322.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
Hello, I wrote a test that checks the marshalling of the DRL and it passes OK. It could be that the workbench is failing fast midway through trying to marshal due to the MVEL issue Mario mentions (the test doesn't pro grammatically build meta-data from the classes in the model; whereas the workbench does). Can you re-try with alterations to your public getters/setters names (getId instead of get_id)? Thanks, Mike On 14 July 2014 13:39, Michael Anstis michael.ans...@gmail.com wrote: Hello, Class ProducerMasterForRules isn't valid; it references getPCuisines() that isn't in the class. Since your rule uses the affected public methods getPrimaryCuisine() and getSecondaryCuisine() can you provide the missing implementation? I could mock something up, but want to be sure to use exactly what you are. With kind regards, Mike On 12 July 2014 12:17, sumit dhaniya sumitdhan...@gmail.com wrote: Michael I really appreciate all the help from the forum and the time invested by the people to answer the queries. I'm working as a freelance developer so if support is something affordable then please let me know. DRL :- 2.| 3.|import java.lang.Number;4. |import com.sophic.foodeemee.offers.dto.SearchContext;5.| import com.sophic.foodeemee.offers.dto.ProducerMasterForRules;6.|import com.sophic.foodeemee.offers.dto.RuleFactor; 7.|8.|rule SecondaryCuisineRepeatUsage 9.|dialect mvel10. |when11.| $searchContext : SearchContext( lastThreeCuisines != null ) 12.| ProducerMasterForRules( primaryCuisine != null , primaryCuisine != $searchContext.lastThreeCuisines , secondaryCuisine != null , secondaryCuisine == $searchContext.lastThreeCuisines ) 13.| $secondaryCuisineRepeatUsageFactor : RuleFactor( )14. | then15.| $secondaryCuisineRepeatUsageFactor.setWeightageImpact( -30 ); 16.|update( $secondaryCuisineRepeatUsageFactor );17.| end object models are attached. On Sat, Jul 12, 2014 at 3:40 PM, Michael Anstis michael.ans...@gmail.com wrote: Asking (at least) three questions at the same time on the same thread is really going to annoy people. It's the weekend; most people are not working and you are not paying for our support. When I am at my computer on Monday I will be happy to answer more. For now; please provide the DRL for the rule that does not reopen correctly and your object model. Sent on the move On 12 Jul 2014 10:54, Sumit Dhaniya sumitdhan...@gmail.com wrote: I create the rule by comparing properties of two objects as shown in image attached. Till I don't close the window generated source looks fine but when I open this rule after closing it. But when I open the rule next time it removes the highlighted condition from the rule and also removes them from drl. Just wondering is there anything I'm doing wrong or issue is something else. http://drools.46999.n3.nabble.com/file/n4030322/rule_snapshot.png -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030322.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
FYI, test http://github.com/droolsjbpm/drools/commit/ee232266c On 14 July 2014 13:54, Michael Anstis michael.ans...@gmail.com wrote: Hello, I wrote a test that checks the marshalling of the DRL and it passes OK. It could be that the workbench is failing fast midway through trying to marshal due to the MVEL issue Mario mentions (the test doesn't pro grammatically build meta-data from the classes in the model; whereas the workbench does). Can you re-try with alterations to your public getters/setters names (getId instead of get_id)? Thanks, Mike On 14 July 2014 13:39, Michael Anstis michael.ans...@gmail.com wrote: Hello, Class ProducerMasterForRules isn't valid; it references getPCuisines() that isn't in the class. Since your rule uses the affected public methods getPrimaryCuisine() and getSecondaryCuisine() can you provide the missing implementation? I could mock something up, but want to be sure to use exactly what you are. With kind regards, Mike On 12 July 2014 12:17, sumit dhaniya sumitdhan...@gmail.com wrote: Michael I really appreciate all the help from the forum and the time invested by the people to answer the queries. I'm working as a freelance developer so if support is something affordable then please let me know. DRL :- 2.| 3.|import java.lang.Number;4. |import com.sophic.foodeemee.offers.dto.SearchContext;5.| import com.sophic.foodeemee.offers.dto.ProducerMasterForRules;6.|import com.sophic.foodeemee.offers.dto.RuleFactor; 7.|8.|rule SecondaryCuisineRepeatUsage 9.|dialect mvel10. |when11.| $searchContext : SearchContext( lastThreeCuisines != null ) 12.| ProducerMasterForRules( primaryCuisine != null , primaryCuisine != $searchContext.lastThreeCuisines , secondaryCuisine != null , secondaryCuisine == $searchContext.lastThreeCuisines ) 13.| $secondaryCuisineRepeatUsageFactor : RuleFactor( )14. | then15.| $secondaryCuisineRepeatUsageFactor.setWeightageImpact( -30 ); 16.|update( $secondaryCuisineRepeatUsageFactor );17.| end object models are attached. On Sat, Jul 12, 2014 at 3:40 PM, Michael Anstis michael.ans...@gmail.com wrote: Asking (at least) three questions at the same time on the same thread is really going to annoy people. It's the weekend; most people are not working and you are not paying for our support. When I am at my computer on Monday I will be happy to answer more. For now; please provide the DRL for the rule that does not reopen correctly and your object model. Sent on the move On 12 Jul 2014 10:54, Sumit Dhaniya sumitdhan...@gmail.com wrote: I create the rule by comparing properties of two objects as shown in image attached. Till I don't close the window generated source looks fine but when I open this rule after closing it. But when I open the rule next time it removes the highlighted condition from the rule and also removes them from drl. Just wondering is there anything I'm doing wrong or issue is something else. http://drools.46999.n3.nabble.com/file/n4030322/rule_snapshot.png -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030322.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
Upgraded to 6.1CR2 it's fixed now. On Mon, Jul 14, 2014 at 6:26 PM, Michael Anstis michael.ans...@gmail.com wrote: FYI, test http://github.com/droolsjbpm/drools/commit/ee232266c On 14 July 2014 13:54, Michael Anstis michael.ans...@gmail.com wrote: Hello, I wrote a test that checks the marshalling of the DRL and it passes OK. It could be that the workbench is failing fast midway through trying to marshal due to the MVEL issue Mario mentions (the test doesn't pro grammatically build meta-data from the classes in the model; whereas the workbench does). Can you re-try with alterations to your public getters/setters names (getId instead of get_id)? Thanks, Mike On 14 July 2014 13:39, Michael Anstis michael.ans...@gmail.com wrote: Hello, Class ProducerMasterForRules isn't valid; it references getPCuisines() that isn't in the class. Since your rule uses the affected public methods getPrimaryCuisine() and getSecondaryCuisine() can you provide the missing implementation? I could mock something up, but want to be sure to use exactly what you are. With kind regards, Mike On 12 July 2014 12:17, sumit dhaniya sumitdhan...@gmail.com wrote: Michael I really appreciate all the help from the forum and the time invested by the people to answer the queries. I'm working as a freelance developer so if support is something affordable then please let me know. DRL :- 2.| 3.|import java.lang.Number;4. |import com.sophic.foodeemee.offers.dto.SearchContext;5.| import com.sophic.foodeemee.offers.dto.ProducerMasterForRules;6.|import com.sophic.foodeemee.offers.dto.RuleFactor; 7.|8.|rule SecondaryCuisineRepeatUsage 9.|dialect mvel10. |when11.| $searchContext : SearchContext( lastThreeCuisines != null ) 12.| ProducerMasterForRules( primaryCuisine != null , primaryCuisine != $searchContext.lastThreeCuisines , secondaryCuisine != null , secondaryCuisine == $searchContext.lastThreeCuisines ) 13.| $secondaryCuisineRepeatUsageFactor : RuleFactor( )14. | then15.| $secondaryCuisineRepeatUsageFactor.setWeightageImpact( -30 ); 16.|update( $secondaryCuisineRepeatUsageFactor );17.| end object models are attached. On Sat, Jul 12, 2014 at 3:40 PM, Michael Anstis michael.ans...@gmail.com wrote: Asking (at least) three questions at the same time on the same thread is really going to annoy people. It's the weekend; most people are not working and you are not paying for our support. When I am at my computer on Monday I will be happy to answer more. For now; please provide the DRL for the rule that does not reopen correctly and your object model. Sent on the move On 12 Jul 2014 10:54, Sumit Dhaniya sumitdhan...@gmail.com wrote: I create the rule by comparing properties of two objects as shown in image attached. Till I don't close the window generated source looks fine but when I open this rule after closing it. But when I open the rule next time it removes the highlighted condition from the rule and also removes them from drl. Just wondering is there anything I'm doing wrong or issue is something else. http://drools.46999.n3.nabble.com/file/n4030322/rule_snapshot.png -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030322.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users 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] conditions getting removed from Guided Rule
added a maven project as dependency in my project which contains mode pojo - Create a guided rule - In config of guided rule add the class which contains _id variable - add a condition to the rule (the class object which contains _id) - apply restriction on the fields (_id will be listed as one of the options to apply restriction on) On Sat, Jul 12, 2014 at 2:51 AM, Michael Anstis michael.ans...@gmail.com wrote: I don't have access to the code here, but it sounds like _ prefixes are invalid, which means we have a potential bug. Where/how did you manage to set _id binding? Sent on the move On 11 Jul 2014 22:13, sumit dhaniya sumitdhan...@gmail.com wrote: I can create rule by selecting the field from fields dropdown but when I try to validate it throws error given below :- 2014-07-12 02:36:24,203 [http-bio-8080-exec-3] ERROR Unable to build KieBaseMode l:defaultKieBase Unable to Analyse Expression _id == $searchContext.lastThreeProducerId: [Error: no such identifier: _id] [Near : {... _id == $searchContext.lastThre }] ^ : [Rule name='EateryRepeatUsage'] data type of _id is string and same rule gets successfully validated if I use any other variable of string type. On Sat, Jul 12, 2014 at 2:30 AM, Michael Anstis michael.ans...@gmail.com wrote: When you say it doesn't allow me to use can you be a little more descriptive? Does the UI prevent it (I am thinking this is the case) or does the DRL generate errors? Sent on the move On 11 Jul 2014 21:44, sumit dhaniya sumitdhan...@gmail.com wrote: Thanks Mike I'll try with 6.1 and if issue still comes I'll share the drl. Can you please also confirm if I can use variables whose names start with _ cause it seems it doesn't allows me to use _id On Sat, Jul 12, 2014 at 2:01 AM, Michael Anstis michael.ans...@gmail.com wrote: What version? Have you tried 6.1.CR2 there were lots of improvements in this area. The issue is guided rules are stored as DRL and we need to reverse engineer the model used by the UI from the DRL. Failing that we'll need your DRL so we can fix whatever issue exists in your scenario. Thanks Sent on the move On 11 Jul 2014 21:27, Sumit Dhaniya sumitdhan...@gmail.com wrote: I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
Hi Michael can you confirm the download link for 6.1.CR2 http://downloads.jboss.org/drools/release/snapshot/6.1.x/kie-drools-wb-6.1.0-SNAPSHOT-tomcat7.0.war On Sat, Jul 12, 2014 at 12:09 PM, sumit dhaniya sumitdhan...@gmail.com wrote: added a maven project as dependency in my project which contains mode pojo - Create a guided rule - In config of guided rule add the class which contains _id variable - add a condition to the rule (the class object which contains _id) - apply restriction on the fields (_id will be listed as one of the options to apply restriction on) On Sat, Jul 12, 2014 at 2:51 AM, Michael Anstis michael.ans...@gmail.com wrote: I don't have access to the code here, but it sounds like _ prefixes are invalid, which means we have a potential bug. Where/how did you manage to set _id binding? Sent on the move On 11 Jul 2014 22:13, sumit dhaniya sumitdhan...@gmail.com wrote: I can create rule by selecting the field from fields dropdown but when I try to validate it throws error given below :- 2014-07-12 02:36:24,203 [http-bio-8080-exec-3] ERROR Unable to build KieBaseMode l:defaultKieBase Unable to Analyse Expression _id == $searchContext.lastThreeProducerId: [Error: no such identifier: _id] [Near : {... _id == $searchContext.lastThre }] ^ : [Rule name='EateryRepeatUsage'] data type of _id is string and same rule gets successfully validated if I use any other variable of string type. On Sat, Jul 12, 2014 at 2:30 AM, Michael Anstis michael.ans...@gmail.com wrote: When you say it doesn't allow me to use can you be a little more descriptive? Does the UI prevent it (I am thinking this is the case) or does the DRL generate errors? Sent on the move On 11 Jul 2014 21:44, sumit dhaniya sumitdhan...@gmail.com wrote: Thanks Mike I'll try with 6.1 and if issue still comes I'll share the drl. Can you please also confirm if I can use variables whose names start with _ cause it seems it doesn't allows me to use _id On Sat, Jul 12, 2014 at 2:01 AM, Michael Anstis michael.ans...@gmail.com wrote: What version? Have you tried 6.1.CR2 there were lots of improvements in this area. The issue is guided rules are stored as DRL and we need to reverse engineer the model used by the UI from the DRL. Failing that we'll need your DRL so we can fix whatever issue exists in your scenario. Thanks Sent on the move On 11 Jul 2014 21:27, Sumit Dhaniya sumitdhan...@gmail.com wrote: I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
Hi, This seems more a problem of the drools compiler. I'll try to reproduce it and check what happens. Just one more question: is the field public or is it accessed through a getter method in your Java class? In case you're using a getter did you named it get_id or get_Id ? Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030318.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] conditions getting removed from Guided Rule
field is private and below are getter and setter :- private String _id; public String get_id() { return _id; } public void set_id(String _id) { this._id = _id; } On Sat, Jul 12, 2014 at 1:35 PM, Mario Fusco mario.fu...@gmail.com wrote: Hi, This seems more a problem of the drools compiler. I'll try to reproduce it and check what happens. Just one more question: is the field public or is it accessed through a getter method in your Java class? In case you're using a getter did you named it get_id or get_Id ? Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030318.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
Can you please provide me the link to download 6.1.CR2 tomcat war On Sat, Jul 12, 2014 at 1:54 PM, sumit dhaniya sumitdhan...@gmail.com wrote: field is private and below are getter and setter :- private String _id; public String get_id() { return _id; } public void set_id(String _id) { this._id = _id; } On Sat, Jul 12, 2014 at 1:35 PM, Mario Fusco mario.fu...@gmail.com wrote: Hi, This seems more a problem of the drools compiler. I'll try to reproduce it and check what happens. Just one more question: is the field public or is it accessed through a getter method in your Java class? In case you're using a getter did you named it get_id or get_Id ? Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030318.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
I create the rule by comparing properties of two objects as shown in image attached. Till I don't close the window generated source looks fine but when I open this rule after closing it. But when I open the rule next time it removes the highlighted condition from the rule and also removes them from drl. Just wondering is there anything I'm doing wrong or issue is something else. http://drools.46999.n3.nabble.com/file/n4030322/rule_snapshot.png -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030322.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] conditions getting removed from Guided Rule
Asking (at least) three questions at the same time on the same thread is really going to annoy people. It's the weekend; most people are not working and you are not paying for our support. When I am at my computer on Monday I will be happy to answer more. For now; please provide the DRL for the rule that does not reopen correctly and your object model. Sent on the move On 12 Jul 2014 10:54, Sumit Dhaniya sumitdhan...@gmail.com wrote: I create the rule by comparing properties of two objects as shown in image attached. Till I don't close the window generated source looks fine but when I open this rule after closing it. But when I open the rule next time it removes the highlighted condition from the rule and also removes them from drl. Just wondering is there anything I'm doing wrong or issue is something else. http://drools.46999.n3.nabble.com/file/n4030322/rule_snapshot.png -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030322.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
Michael I really appreciate all the help from the forum and the time invested by the people to answer the queries. I'm working as a freelance developer so if support is something affordable then please let me know. DRL :- 2.|3.|import java.lang.Number;4.|import com.sophic.foodeemee.offers.dto.SearchContext;5.|import com.sophic.foodeemee.offers.dto.ProducerMasterForRules;6.|import com.sophic.foodeemee.offers.dto.RuleFactor;7.|8.|rule SecondaryCuisineRepeatUsage9.|dialect mvel10.|when11.| $searchContext : SearchContext( lastThreeCuisines != null )12.|ProducerMasterForRules( primaryCuisine != null , primaryCuisine != $searchContext.lastThreeCuisines , secondaryCuisine != null , secondaryCuisine == $searchContext.lastThreeCuisines )13.| $secondaryCuisineRepeatUsageFactor : RuleFactor( )14.|then15.| $secondaryCuisineRepeatUsageFactor.setWeightageImpact( -30 );16.|update( $secondaryCuisineRepeatUsageFactor );17.|end object models are attached. On Sat, Jul 12, 2014 at 3:40 PM, Michael Anstis michael.ans...@gmail.com wrote: Asking (at least) three questions at the same time on the same thread is really going to annoy people. It's the weekend; most people are not working and you are not paying for our support. When I am at my computer on Monday I will be happy to answer more. For now; please provide the DRL for the rule that does not reopen correctly and your object model. Sent on the move On 12 Jul 2014 10:54, Sumit Dhaniya sumitdhan...@gmail.com wrote: I create the rule by comparing properties of two objects as shown in image attached. Till I don't close the window generated source looks fine but when I open this rule after closing it. But when I open the rule next time it removes the highlighted condition from the rule and also removes them from drl. Just wondering is there anything I'm doing wrong or issue is something else. http://drools.46999.n3.nabble.com/file/n4030322/rule_snapshot.png -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308p4030322.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 SearchContext.java Description: Binary data RuleFactor.java Description: Binary data ProducerMasterForRules.java Description: Binary data ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] conditions getting removed from Guided Rule
I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.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] conditions getting removed from Guided Rule
What version? Have you tried 6.1.CR2 there were lots of improvements in this area. The issue is guided rules are stored as DRL and we need to reverse engineer the model used by the UI from the DRL. Failing that we'll need your DRL so we can fix whatever issue exists in your scenario. Thanks Sent on the move On 11 Jul 2014 21:27, Sumit Dhaniya sumitdhan...@gmail.com wrote: I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
Thanks Mike I'll try with 6.1 and if issue still comes I'll share the drl. Can you please also confirm if I can use variables whose names start with _ cause it seems it doesn't allows me to use _id On Sat, Jul 12, 2014 at 2:01 AM, Michael Anstis michael.ans...@gmail.com wrote: What version? Have you tried 6.1.CR2 there were lots of improvements in this area. The issue is guided rules are stored as DRL and we need to reverse engineer the model used by the UI from the DRL. Failing that we'll need your DRL so we can fix whatever issue exists in your scenario. Thanks Sent on the move On 11 Jul 2014 21:27, Sumit Dhaniya sumitdhan...@gmail.com wrote: I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
When you say it doesn't allow me to use can you be a little more descriptive? Does the UI prevent it (I am thinking this is the case) or does the DRL generate errors? Sent on the move On 11 Jul 2014 21:44, sumit dhaniya sumitdhan...@gmail.com wrote: Thanks Mike I'll try with 6.1 and if issue still comes I'll share the drl. Can you please also confirm if I can use variables whose names start with _ cause it seems it doesn't allows me to use _id On Sat, Jul 12, 2014 at 2:01 AM, Michael Anstis michael.ans...@gmail.com wrote: What version? Have you tried 6.1.CR2 there were lots of improvements in this area. The issue is guided rules are stored as DRL and we need to reverse engineer the model used by the UI from the DRL. Failing that we'll need your DRL so we can fix whatever issue exists in your scenario. Thanks Sent on the move On 11 Jul 2014 21:27, Sumit Dhaniya sumitdhan...@gmail.com wrote: I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] conditions getting removed from Guided Rule
I can create rule by selecting the field from fields dropdown but when I try to validate it throws error given below :- 2014-07-12 02:36:24,203 [http-bio-8080-exec-3] ERROR Unable to build KieBaseMode l:defaultKieBase Unable to Analyse Expression _id == $searchContext.lastThreeProducerId: [Error: no such identifier: _id] [Near : {... _id == $searchContext.lastThre }] ^ : [Rule name='EateryRepeatUsage'] data type of _id is string and same rule gets successfully validated if I use any other variable of string type. On Sat, Jul 12, 2014 at 2:30 AM, Michael Anstis michael.ans...@gmail.com wrote: When you say it doesn't allow me to use can you be a little more descriptive? Does the UI prevent it (I am thinking this is the case) or does the DRL generate errors? Sent on the move On 11 Jul 2014 21:44, sumit dhaniya sumitdhan...@gmail.com wrote: Thanks Mike I'll try with 6.1 and if issue still comes I'll share the drl. Can you please also confirm if I can use variables whose names start with _ cause it seems it doesn't allows me to use _id On Sat, Jul 12, 2014 at 2:01 AM, Michael Anstis michael.ans...@gmail.com wrote: What version? Have you tried 6.1.CR2 there were lots of improvements in this area. The issue is guided rules are stored as DRL and we need to reverse engineer the model used by the UI from the DRL. Failing that we'll need your DRL so we can fix whatever issue exists in your scenario. Thanks Sent on the move On 11 Jul 2014 21:27, Sumit Dhaniya sumitdhan...@gmail.com wrote: I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users 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] conditions getting removed from Guided Rule
I don't have access to the code here, but it sounds like _ prefixes are invalid, which means we have a potential bug. Where/how did you manage to set _id binding? Sent on the move On 11 Jul 2014 22:13, sumit dhaniya sumitdhan...@gmail.com wrote: I can create rule by selecting the field from fields dropdown but when I try to validate it throws error given below :- 2014-07-12 02:36:24,203 [http-bio-8080-exec-3] ERROR Unable to build KieBaseMode l:defaultKieBase Unable to Analyse Expression _id == $searchContext.lastThreeProducerId: [Error: no such identifier: _id] [Near : {... _id == $searchContext.lastThre }] ^ : [Rule name='EateryRepeatUsage'] data type of _id is string and same rule gets successfully validated if I use any other variable of string type. On Sat, Jul 12, 2014 at 2:30 AM, Michael Anstis michael.ans...@gmail.com wrote: When you say it doesn't allow me to use can you be a little more descriptive? Does the UI prevent it (I am thinking this is the case) or does the DRL generate errors? Sent on the move On 11 Jul 2014 21:44, sumit dhaniya sumitdhan...@gmail.com wrote: Thanks Mike I'll try with 6.1 and if issue still comes I'll share the drl. Can you please also confirm if I can use variables whose names start with _ cause it seems it doesn't allows me to use _id On Sat, Jul 12, 2014 at 2:01 AM, Michael Anstis michael.ans...@gmail.com wrote: What version? Have you tried 6.1.CR2 there were lots of improvements in this area. The issue is guided rules are stored as DRL and we need to reverse engineer the model used by the UI from the DRL. Failing that we'll need your DRL so we can fix whatever issue exists in your scenario. Thanks Sent on the move On 11 Jul 2014 21:27, Sumit Dhaniya sumitdhan...@gmail.com wrote: I'm creating a rule in which I'm comparing properties of two objects. All works well I'm able to compare their properties and rule gets validated as well and then I close the rule, but when I open the rule again properties of second object in condition don't show up in guided editor however they are present if I check the source of the guided rule. Moreover it also doesn't allows me to use _id variable which is present in my class whereas there is no issue if I use any other variable name id this due to _? -- View this message in context: http://drools.46999.n3.nabble.com/conditions-getting-removed-from-Guided-Rule-tp4030308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users 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