[rules-users] Multiple independent Assertions
Hi, In stateless Session: If List of A1,B1,C1 are executed - execute(List) and at the same time in a paralell thread A2,B2,C2 are executed - execute(List) In Theory (Conceptually), I want to confirm if A1 will interfere with the rule using A2? Just want to ensure what is appropriate or expecteed behavior. ...assuming both threads hit the same session for that delta t period of time. thanks, arjun ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] How can i write reactive rules
Hi, Iam new to drools, iam trying to write rules which should be invoked based on some event.Instead of writing the IF...THEN rules, the rules specific to an event should be invoke when an event occurs. Please help me out with sample examples. -- View this message in context: http://www.nabble.com/How-can-i-write-reactive-rules-tf4199149.html#a11942753 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] Multiple independent Assertions
shadow proxies protect you a little from this, but you can still end up with garbage. What a shadow proxy does is copy all the fields, so that during insertion time anychange to the original data will not impact what th network sees. Mark Arjun Dhar wrote: Hi, In stateless Session: If List of A1,B1,C1 are executed - execute(List) and at the same time in a paralell thread A2,B2,C2 are executed - execute(List) In Theory (Conceptually), I want to confirm if A1 will interfere with the rule using A2? Just want to ensure what is appropriate or expecteed behavior. ...assuming both threads hit the same session for that delta t period of time. thanks, arjun ___ 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] Does Drools 4.0 rules have downward compatibility with lower versions.?
Hi , I just found the below statements from the documentation As mentioned before Drools 4.0 is a major update over the previous Drools 3.0.x series. Unfortunatelly, in order to achieve the goals set for this release, some backward compatibility issues were introduced, as discussed in the maiil list and blogs. Where can i get more information on the backward compatibility issues ? Thanks , Kingston kingston wrote: -- View this message in context: http://www.nabble.com/Does-Drools-4.0-rules-have-downward-compatibility-with-lower-versions.--tf4200050.html#a11945559 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] Does Drools 4.0 rules have downward compatibility with lower versions.?
Hi Kingston! kingston wrote: Where can i get more information on the backward compatibility issues ? Sorry, my last answer to your question maybe was not really complete. A better overview give the following pages: http://blog.athico.com/2007/07/drools-apilanguage-changes-break.html http://labs.jboss.com/file-access/default/members/drools/freezone/docs/4.0.0.13773GA/html_single/index.html#d0e191 HTH, Christian begin:vcard fn:Christian Spurk n:Spurk;Christian org:DFKI GmbH;Language Technology Lab adr;quoted-printable:;;Stuhlsatzenhausweg 3;Saarbr=C3=BCcken;;66123;Germany email;internet:[EMAIL PROTECTED] title:Dipl.-Ling. (Computerlinguistik) tel;work:+49681/302-5354 note;quoted-printable:Deutsches Forschungszentrum f=C3=BCr K=C3=BCnstliche Intelligenz GmbH=0D=0A= Firmensitz: Trippstadter Stra=C3=9Fe 122, D-67663 Kaiserslautern=0D=0A= =0D=0A= Gesch=C3=A4ftsf=C3=BChrung:=0D=0A= Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender),=0D=0A= Dr. Walter Olthoff=0D=0A= =0D=0A= Vorsitzender des Aufsichtsrats:=0D=0A= Prof. Dr. h.c. Hans A. Aukes=0D=0A= =0D=0A= Amtsgericht Kaiserslautern, HRB 2313=0D=0A= x-mozilla-html:FALSE version:2.1 end:vcard ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Does Drools 4.0 rules have downward compatibility with lower versions.?
-- View this message in context: http://www.nabble.com/Does-Drools-4.0-rules-have-downward-compatibility-with-lower-versions.--tf4200050.html#a11945450 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] Does Drools 4.0 rules have downward compatibility with lower versions.?
No. See: http://blog.athico.com/2007/07/jboss-drools-40-released.html kingston wrote: begin:vcard fn:Christian Spurk n:Spurk;Christian org:DFKI GmbH;Language Technology Lab adr;quoted-printable:;;Stuhlsatzenhausweg 3;Saarbr=C3=BCcken;;66123;Germany email;internet:[EMAIL PROTECTED] title:Dipl.-Ling. (Computerlinguistik) tel;work:+49681/302-5354 note;quoted-printable:Deutsches Forschungszentrum f=C3=BCr K=C3=BCnstliche Intelligenz GmbH=0D=0A= Firmensitz: Trippstadter Stra=C3=9Fe 122, D-67663 Kaiserslautern=0D=0A= =0D=0A= Gesch=C3=A4ftsf=C3=BChrung:=0D=0A= Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender),=0D=0A= Dr. Walter Olthoff=0D=0A= =0D=0A= Vorsitzender des Aufsichtsrats:=0D=0A= Prof. Dr. h.c. Hans A. Aukes=0D=0A= =0D=0A= Amtsgericht Kaiserslautern, HRB 2313=0D=0A= x-mozilla-html:FALSE version:2.1 end:vcard ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] nested accessors with Sets
Hello, Please excuse me if I have double posted - my first did not seem to appear. I am wondering if the following is valid rule syntax. I am getting a stacktrace when the rules fire that points to a ClassCastException on a HashSet I am using v4.0 GA. Thank you, Mark rule StateMatch when $ca:CandidateAssociation(nurseDetails.stateLicensures excludes patientDetails.state ) then retract( $ca ); end public class CandidateAssociation { private PatientDetails patientDetails; private NurseDetails nurseDetails; private int overlapHours; public CandidateAssociation( PatientDetails patientDetails, NurseDetails nurseDetails) { super(); this.patientDetails = patientDetails; this.nurseDetails = nurseDetails; overlapHours = participantDetails.getNumberOverlapHourCnt(nurseDetails); } [...] } public class NurseDetails { private Set stateLicensures = new HashSet(); [...] } public class PatientDetails { private String state; [...] } -- Firing Rules ** org.drools.RuntimeDroolsException: Exception executing predicate [EMAIL PROTECTED] at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:197) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159) at org.drools.reteoo.Rete.assertObject(Rete.java:175) at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190) at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:64) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:58) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0.consequence(Rule_InitializeCandidateForEachNurse_0.java:13) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.evaluate(Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.java:25) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:503) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:467) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:403) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:384) at primarynursePOC.PrimaryNursePOC.selectPrimaryNurse(PrimaryNursePOC.java:136) at primarynursePOC.PrimaryNursePOC.main(PrimaryNursePOC.java:91) Caused by: java.lang.ClassCastException: java.util.HashSet at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:35) at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:191) ... 17 more org.drools.RuntimeDroolsException: Exception executing predicate [EMAIL PROTECTED] at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:197) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159) at org.drools.reteoo.Rete.assertObject(Rete.java:175) at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190) at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:64) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:58) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0.consequence(Rule_InitializeCandidateForEachNurse_0.java:13) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.evaluate(Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.java:25) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:503) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:467) at org.drools.common.AbstractWorkingMemory.doOtherwise(AbstractWorkingMemory.java:430) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:412) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:384) at
[rules-users] Drools RuleFlow gains subflow and milestone support
http://blog.athico.com/2007/08/drools-ruleflow-gains-subflow-and.html ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] generating a DSLMapping
Hi, Is there a methode to generate a DSLMapping from a dsl reader ? -- View this message in context: http://www.nabble.com/generating-a-DSLMapping-tf4200795.html#a11947983 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] nested accessors with Sets
My rule now appears to be working after switching from the excludes operator to the newer not contains. This works: $ca:CandidateAssociation(nurseDetails.stateLicensures not contains patientDetails.state ) This does not: $ca:CandidateAssociation(nurseDetails.stateLicensures excludes patientDetails.state ) Mark -- Original message -- From: [EMAIL PROTECTED] Hello, Please excuse me if I have double posted - my first did not seem to appear. I am wondering if the following is valid rule syntax. I am getting a stacktrace when the rules fire that points to a ClassCastException on a HashSet I am using v4.0 GA. Thank you, Mark rule StateMatch when $ca:CandidateAssociation(nurseDetails.stateLicensures excludes patientDetails.state ) then retract( $ca ); end public class CandidateAssociation { private PatientDetails patientDetails; private NurseDetails nurseDetails; private int overlapHours; public CandidateAssociation( PatientDetails patientDetails, NurseDetails nurseDetails) { super(); this.patientDetails = patientDetails; this.nurseDetails = nurseDetails; overlapHours = participantDetails.getNumberOverlapHourCnt(nurseDetails); } [...] } public class NurseDetails { private Set stateLicensures = new HashSet(); [...] } public class PatientDetails { private String state; [...] } -- Firing Rules ** org.drools.RuntimeDroolsException: Exception executing predicate [EMAIL PROTECTED] at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:197) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObje ctSinkAdapter.java:317) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159) at org.drools.reteoo.Rete.assertObject(Rete.java:175) at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190) at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:64) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:58) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0.consequence(Rule_Init ializeCandidateForEachNurse_0.java:13) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.eva luate(Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.java:25) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:503) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:467) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java: 403) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java: 384) at primarynursePOC.PrimaryNursePOC.selectPrimaryNurse(PrimaryNursePOC.java:136) at primarynursePOC.PrimaryNursePOC.main(PrimaryNursePOC.java:91) Caused by: java.lang.ClassCastException: java.util.HashSet at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.ja va:35) at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:191) ... 17 more org.drools.RuntimeDroolsException: Exception executing predicate [EMAIL PROTECTED] at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:197) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObje ctSinkAdapter.java:317) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159) at org.drools.reteoo.Rete.assertObject(Rete.java:175) at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190) at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:64) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:58) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0.consequence(Rule_Init ializeCandidateForEachNurse_0.java:13) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.eva luate(Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.java:25) at
[rules-users] rule name regular expression
Hi, When can I find the regular expression to check the validity of a rule name ? thanks -- View this message in context: http://www.nabble.com/rule-name-regular-expression-tf4201280.html#a11949495 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] Drools Rule Workbench - Debug in Eclipse Issues
What is going on? I'm trying to get the debugger working in Eclipse but I don't see a JBoss Application in the Debug menu. I currently have installed: * Eclipse 3.2.2 * GEF 3.2.2 * Drools Rule Workbench 3.0.5 Is there a possibility that the Drools Rule Workbench is out of date? DP -- View this message in context: http://www.nabble.com/Drools-Rule-Workbench---Debug-in-Eclipse-Issues-tf4202586.html#a11953521 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] Drools Rule Workbench - Debug in Eclipse Issues
Attaching a screen shot. As well, will there be a version of the plugin compatible with Eclipse 3.3/Callisto? dpark wrote: What is going on? I'm trying to get the debugger working in Eclipse but I don't see a JBoss Application in the Debug menu. I currently have installed: * Eclipse 3.2.2 * GEF 3.2.2 * Drools Rule Workbench 3.0.5 Is there a possibility that the Drools Rule Workbench is out of date? DP http://www.nabble.com/file/p11953785/debug.jpg -- View this message in context: http://www.nabble.com/Drools-Rule-Workbench---Debug-in-Eclipse-Issues-tf4202586.html#a11953785 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] rule name regular expression
There is no regexp for this. Easiest thing to do is make a package with a single rule in it and pass it into a packagebuilder session. Mark hypnosat7 wrote: Hi, When can I find the regular expression to check the validity of a rule name ? thanks ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] nested accessors with Sets
Actually, it is still broken. This does not complain but it always executes the consequence, even when the stateLicensures includes the state that in patientDetails.state $ca:CandidateAssociation(nurseDetails.stateLicensures not contains patientDetails.state ) I also tried the following but it complains with an Exception $ca:CandidateAssignment(participantDetails.state not memberof nurseDetails.stateLicensures ) org.drools.rule.InvalidRulePackage: [13,50]: unknown:13:50 Unexpected token 'not'[13,93]: unknown:13:93 mismatched token: [EMAIL PROTECTED],574:574=')',13,13:93]; expecting type LEFT_PAREN at org.drools.rule.Package.checkValidity(Package.java:408) at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288) Is what I am trying to do supported by Drools? Thank you, Mark -- Original message -- From: [EMAIL PROTECTED] My rule now appears to be working after switching from the excludes operator to the newer not contains. This works: $ca:CandidateAssociation(nurseDetails.stateLicensures not contains patientDetails.state ) This does not: $ca:CandidateAssociation(nurseDetails.stateLicensures excludes patientDetails.state ) Mark -- Original message -- From: [EMAIL PROTECTED] Hello, Please excuse me if I have double posted - my first did not seem to appear. I am wondering if the following is valid rule syntax. I am getting a stacktrace when the rules fire that points to a ClassCastException on a HashSet I am using v4.0 GA. Thank you, Mark rule StateMatch when $ca:CandidateAssociation(nurseDetails.stateLicensures excludes patientDetails.state ) then retract( $ca ); end public class CandidateAssociation { private PatientDetails patientDetails; private NurseDetails nurseDetails; private int overlapHours; public CandidateAssociation( PatientDetails patientDetails, NurseDetails nurseDetails) { super(); this.patientDetails = patientDetails; this.nurseDetails = nurseDetails; overlapHours = participantDetails.getNumberOverlapHourCnt(nurseDetails); } [...] } public class NurseDetails { private Set stateLicensures = new HashSet(); [...] } public class PatientDetails { private String state; [...] } -- Firing Rules ** org.drools.RuntimeDroolsException: Exception executing predicate [EMAIL PROTECTED] at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:197) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObje ctSinkAdapter.java:317) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159) at org.drools.reteoo.Rete.assertObject(Rete.java:175) at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190) at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:64) at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:58) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0.consequence(Rule_Init ializeCandidateForEachNurse_0.java:13) at org.drools.examples.Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.eva luate(Rule_InitializeCandidateForEachNurse_0ConsequenceInvoker.java:25) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:503) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:467) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java: 403) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java: 384) at primarynursePOC.PrimaryNursePOC.selectPrimaryNurse(PrimaryNursePOC.java:136) at primarynursePOC.PrimaryNursePOC.main(PrimaryNursePOC.java:91) Caused by: java.lang.ClassCastException: java.util.HashSet at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.ja va:35) at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:191) ... 17 more org.drools.RuntimeDroolsException: Exception executing predicate [EMAIL PROTECTED] at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:197) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121) at
[rules-users] correlating two collects
I am finally having some time to use collects. What I basically need to do is to collect items from a list using a specific criteria, then collect items from a diff list using another criteria, and finally compare the groups collected using a 3rd criteria Here is what I am thinking: i : Item(type==A) ig : ItemGroup(size1) collect Item(a==i.a, b==i.b, ... n==i.n) i2: Item(type==B) ig2 : ItemGroup( size1, ga==ig.ga, gb==i.gb, ) collect Item(a==i.a, b==i.b, ... n==i.n) 1) It is quite nice that any implementation of java.util.Collection can be the resut of collect. ItemGroup here not only keeps hold of all Items returned but has some aggregate properties (afaik, I cannot use the aggregate functions with accumulate since I have multiple column aggregation). 2) Am I on the right track? Or is there a better way? 3) Is the collect recomputed from scratch or incrementally every time a new fact is asserted or updated? thanks ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: nested accessors with Sets
Q1) So would either or both not contains or not in work? Q2) Or is not contains only for List or Collection type? what about HashMaps then? Q3) Stretching my actual use case to its limits; if I want to write conditions over objects that were never asserted into the working memory (need to OR them with existing) ones, how do I do that? Sorry for Question 1, slight typo in my RULE using In, I was trying to say: obj: Composer( MyComposedObject not in this ) ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Re: nested accessors with Sets
mark.mcnally at comcast.net writes: My rule now appears to be working after switching from the excludes operator to the newer not contains. This works: $ca:CandidateAssociation(nurseDetails.stateLicensures not contains patientDetails.state ) This does not: $ca:CandidateAssociation(nurseDetails.stateLicensures excludes patientDetails.state ) Mark I was just about to post a question and I think this may be the answer to my problem as well. So let me confirm. Question) I hvae a rule When obj: MyComposedObject(active == false) Then //Action End .. the problem is, if the above object was never asserted; I still want it to execute. Luckily MyComposedObject is composend inside another object, so can i use the technique above as When obj: Composer( this not contains MyComposedObject) End or even obj: Composer( this not in MyComposedObject) ... My Composer simply composes the object and does not contain it in a list. Q1) So would either or both not contains or not in work? Q2) Or is not contains only for List or Collection type? what about HashMaps then? Q3) Stretching my actual use case to its limits; if I want to write conditions over objects that were never asserted into the working memory (need to OR them with existing) ones, how do I do that? I understand technically it does not make sense to want conditions over objects one never asserted; ... but please think a moment. A person asserts Objects and due to some external factor some objects do not get asserted. Since he is aware of it, can he trap that conidtion in the rule itself? Example: Assertions -- (Object Type) A1, A2, A4 RULES: I never got Object type A3 so Do Notify Admin -- How to write such a rule? I hope I'm able to express my use case. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users