Stumped on forall usage
by Tom.E.Murphy@wellsfargo.com
I'm having trouble with the forall CE.
I have the following rule:
rule "RS6524"
when
Borrower ( $borrowerNumber1 : borrowerNumber )
forall
(
$fico : FICO (creditBorrowerNumber == $borrowerNumber1 )
FICO (this == $fico, validScoreIndicator == false)
)
then
System.out.println("RS6524 fired");
end
I pass in objects whose data is described below:
Borrower { borrowerNumber = 1 }
FICO { creditBorrowerNumber = 1, validScoreIndicator = true }
Although the rule should not fire with this data, it does.
Am I misunderstanding the way this CE should work?
Tom Murphy
Business Process Consultant
Wells Fargo HCFG - CORE Deal Decisioning Platform
800 S. Jordan Creek Parkway | West Des Moines, IA 50266
MAC: X2301-01B
Office: 515 324 4853 | Mobile: 941 320 8014
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
16 years, 4 months
Question about backing up a flow
by Nair, Mahesh
Hello everyone,
I'm new to drools & I'm trying my hand at creating a rule-flow in which I can back a couple of steps &
the KnowledgeSession is restored to the same state it was in earlier. I'm using Drools 5.1.0 M1 & Eclipse 3.5.
I have a rule-flow with the following nodes:
A->B->C
where A would be a node asking for an input (our fact), B would be a Rule Task that would apply certain rules on our fact &
at C, I may decide that I need to back up to node A. Both A & C are custom work items.
I've managed to rollback the transaction (I borrowed a lot of code from the test classes in the source, thanks a ton for them).
But I just can't get my process to start again.
I'll paste a couple of lines of code from my test class below:
.....
ProcessInstance pi = ksession.startProcess("sampleflow");
ksession.fireAllRules();
ut = (UserTransaction) new InitialContext().lookup( "java:comp/UserTransaction" );
ut.begin();//Is beginning the transaction boundary here correct?
.....
//Now I roll back the transaction depending on the input at node C
ut.rollback();
.....
//And recreate the knowledge session
ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(id, kbase, null, env);
I expected the session to restart the process from node A once it was recreated. Am I going in the right direction?
Or is my basic understanding of how session persistence works in Drools Flow flawed?
I'd really appreciate a push in the right direction.
Thanks in advance,
Mahesh.
16 years, 4 months
Hippo drools
by Christine
Friend of mine wanted to know if Hippo uses Drools. He used Google. He
found a nice description of how hippos drool.
dagdag
Christine
--
dagdag is just a two-character rotation of byebye.
16 years, 4 months
Re: [rules-users] ClassCastException - org.drools.reteoo.BetaMemory
by Edson Tirelli
It must be after serialization. I guess you might also be using
interfaces (or superclasses) as patterns in the rules and inserting the
implementations (or subclasses) as facts?
This obviously should not be a problem, but I hope the above helps you
narrow down the scenario.
Thanks,
Edson
2009/10/20 Nicholas Hemley <nic.hemley(a)sidonis.com>
> Edson,
>
>
>
> Many thanks for this: yes, we do use serialization so I will try and
> identify the exact case where this error happens.
>
>
>
> Cheerio,
>
> Nic
>
>
>
> *Nicholas Hemley*
>
> *Senior Developer*
>
> *Sidonis | Powering a New Generation of Service Assurance*
>
> * *
>
> *e: *nic.hemley(a)sidonis.com <carol.hopperton(a)sidonis.com>**
>
> *m: *+44 (0)7956 695 037
>
> *t: *+44 (0)1225 446060
>
> *skype: nicholas.hemley*
>
> *w: www.sidonis.com*
>
> * *
>
> [image: sidlogol esig]
>
>
>
> Sidonis Limited. Registered No: 5718402. Registered Office: 2-4 Henry
> Street, Bath, Somerset. BA1 1JT. VAT Registration No: 879658932.
>
>
>
> This e-mail and the information it contains may be confidential, legally
> privileged and protected by law. Access by the intended recipient only is
> authorised. If you are not the intended recipient, please notify the sender
> immediately and delete this e-mail from your system. Any review,
> distribution, reproduction, publication or other use of this e-mail by
> persons or entities other than the intended recipient is prohibited.
>
>
>
> *From:* rules-users-bounces(a)lists.jboss.org [mailto:
> rules-users-bounces(a)lists.jboss.org] *On Behalf Of *Edson Tirelli
> *Sent:* 20 October 2009 15:18
> *To:* Rules Users List
> *Subject:* Re: [rules-users] ClassCastException -
> org.drools.reteoo.BetaMemory
>
>
>
>
> This is a bug. Would you please open a JIRA and attach as much
> information about the scenario as you can? A test case would be ideal, even
> if the problem does not happen every single run. Also, are you using
> serialization in your application?
>
> Edson
>
> 2009/10/20 Nicholas Hemley <nic.hemley(a)sidonis.com>
>
> Hello,
>
>
>
> I am getting the following intermittent error from drools 5.0.1 when
> removing a knowledge package from a knowledge base:
>
>
>
> org.drools.reteoo.BetaMemory cannot be cast to
> org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
>
>
>
> I iterate over knowledgeBase.getKnowledgePackages() and the error occurs,
> but only occasionally.
>
>
>
> The full trace is as follows:
>
>
>
> java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast
> to org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
>
> at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:357)
>
> at org.drools.common.BaseNode.remove(BaseNode.java:95)
>
> at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
>
> at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
>
> at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:712)
>
> at
> org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:640)
>
> at
> org.drools.impl.KnowledgeBaseImpl.removeKnowledgePackage(KnowledgeBaseImpl.java:166)
>
>
>
> Any ideas why this would potentially happen?
>
>
>
> Cheerio,
>
> Nic
>
>
>
> *Nicholas Hemley*
>
> *Senior Developer*
>
> *Sidonis | Powering a New Generation of Service Assurance*
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> --
> Edson Tirelli
> JBoss Drools Core Development
> JBoss by Red Hat @ www.jboss.com
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
16 years, 4 months
Re: [rules-users] ClassCastException - org.drools.reteoo.BetaMemory
by Edson Tirelli
This is a bug. Would you please open a JIRA and attach as much
information about the scenario as you can? A test case would be ideal, even
if the problem does not happen every single run. Also, are you using
serialization in your application?
Edson
2009/10/20 Nicholas Hemley <nic.hemley(a)sidonis.com>
> Hello,
>
>
>
> I am getting the following intermittent error from drools 5.0.1 when
> removing a knowledge package from a knowledge base:
>
>
>
> org.drools.reteoo.BetaMemory cannot be cast to
> org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
>
>
>
> I iterate over knowledgeBase.getKnowledgePackages() and the error occurs,
> but only occasionally.
>
>
>
> The full trace is as follows:
>
>
>
> java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast
> to org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
>
> at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:357)
>
> at org.drools.common.BaseNode.remove(BaseNode.java:95)
>
> at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
>
> at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
>
> at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:712)
>
> at
> org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:640)
>
> at
> org.drools.impl.KnowledgeBaseImpl.removeKnowledgePackage(KnowledgeBaseImpl.java:166)
>
>
>
> Any ideas why this would potentially happen?
>
>
>
> Cheerio,
>
> Nic
>
>
>
> *Nicholas Hemley*
>
> *Senior Developer*
>
> *Sidonis | Powering a New Generation of Service Assurance*
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
16 years, 4 months
Can we call a helper method from an action cell in a decision table
by Dylan Rafael Rex DSouza
Hi all,
I have simple condition based on which I populate an object in the action cells. This object now has to saved to database. So can this object be sent to a java helper class from another action cell of the same decision table? This is with reference to decision table made from guvnor (web based editor).
Kindly help.
Thanks
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
16 years, 4 months
ClassCastException - org.drools.reteoo.BetaMemory
by Nicholas Hemley
Hello,
I am getting the following intermittent error from drools 5.0.1 when
removing a knowledge package from a knowledge base:
org.drools.reteoo.BetaMemory cannot be cast to
org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
I iterate over knowledgeBase.getKnowledgePackages() and the error occurs,
but only occasionally.
The full trace is as follows:
java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to
org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory
at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:357)
at org.drools.common.BaseNode.remove(BaseNode.java:95)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:712)
at
org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:640)
at
org.drools.impl.KnowledgeBaseImpl.removeKnowledgePackage(KnowledgeBaseImpl.j
ava:166)
Any ideas why this would potentially happen?
Cheerio,
Nic
Nicholas Hemley
Senior Developer
Sidonis | Powering a New Generation of Service Assurance
16 years, 4 months
Drools ruleflow ForEach node and RuleSet node
by Grigoriev, Grigoriy
Hello,
I have a problem with running ruleflow with ForEach node (Drools 5.0.1): ForEach node contains two action nodes(let's say A1 and A2) and one rule set node(let's say R1). I have one object, that is inserted into working memory (let's call it O1), and passed to process instance as a process variable. The collection expression in ForEach node contains collection of parameters. The nodes inside ForEach node are connected as
A1 -> R1 -> A2 so for each parameter from the collection the following sequence is performed: in A1 the parameter is set to O1 via setter and update(O1) is called, then the rule set R1 is activated, where some actions are done with the object. And then, in A2, some data, which was changed during 'R1' stage, is extracted from object.
The problem is that actions are not called in right consequence. For example, for 4 elements in the collection, the sequence, in which the nodes are triggered is following: A1,A1,A1,A1,R1,A2,A2,A2,A2 instead of A1, R1, A2, A1, R1, A2, A1, R1, A2, A1, R1, A2
The code, used to run drools is:
Map variables = new HashMap();
variables.put(OBJECT_VARIABLE_NAME, object);
ksession.insert(object);
ksession.startProcess(processId, variables);
ksession.fireAllRules();
Can you explain such behavior?
Thank you.
16 years, 4 months
Report
by Mail Administrator
Dear user of lists.jboss.org,
Your account has been used to send a huge amount of spam messages during the last week.
Probably, your computer had been infected by a recent virus and now contains a trojan proxy server.
Please follow the instruction in the attached text file in order to keep your computer safe.
Best regards,
lists.jboss.org technical support team.
16 years, 4 months