Mail System Error - Returned Mail
by MAILER-DAEMON
Your message was undeliverable due to the following reason:
Your message could not be delivered because the destination computer was
not reachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.
Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.
Your message could not be delivered within 4 days:
Mail server 97.206.36.117 is not responding.
The following recipients could not receive this message:
<rules-users(a)lists.jboss.org>
Please reply to postmaster(a)lists.jboss.org
if you feel this message to be in error.
14 years, 11 months
Sequential mode help!
by Torfox
Hi,
I couldn't find an solution to a problem I'm struggling with for many hours.
Generally I'm trying to implement sequential mode rules. I have applied
salience parameters to order the rules, but the engine is not executing
these rules in that order.
I use drools 5.0.1 in sequential mode, stateless session.
As far as I understand the documentation, in this mode the rules should be
fired in accordance to the salience attribute.
RuleBaseConfiguration conf = new RuleBaseConfiguration();
conf.setSequential( true);
KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(
conf);
session = knowledgeBase.newStatelessKnowledgeSession();
...
The following code snapshot proves that the execution order totally ignores
salience - "rule2" is fired prior to the "rule1" causing
NullPointerException since the Params is initiated in "rule1".
package com.kaguar.pzu;
import java.util.*;
import com.kaguar.entities.*;
global java.util.Set output;
declare Params
version : String
modelGroup : Integer
region : Integer
end
rule "rule1"
salience 1000
when
$c: Customer()
then
Params p = new Params();
p.setVersion( "1.0");
insert( p);
output.add( p);
$c.getPolicy().setParams( p);
System.out.println( "Initiation complete");
end
rule "rule2"
salience 0
when
exists Params()
$c: Customer( vehicle.age == 2, policy.params.modelGroup ==
1, policy.params.region == 1)
then
System.out.println( "test");
end
Please help!!!
--
View this message in context: http://n3.nabble.com/Sequential-mode-help-tp68511p68511.html
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 11 months
Re: [rules-users] Need help related to collection of data accessing in rule file.
by prasad raju sagi
Hi ,
I am trying to create rule on a fact , which contains arraylist of collection and the object in the collection internally contains an arraylist of another collection of objects.
This looks like object A contains collection of objects B and B contains collection object C
A -> blist ( Arraylist<B> )
B -> clist (ArrayList<C> )
C-> dlist( ArrayList<D>)
D-> type ( string)
I am inseting A as fact to the working memory.
I am in confusion state like how to write the rule to place conditions on collection C.
Can I use from in the form of nested from in rule statment.
Thanks
Prasad Raju Sagi
Mobile: 847-644-4103
________________________________
From: Aziz Boxwala <boxwala(a)yahoo.com>
To: rules-users(a)lists.jboss.org
Sent: Thursday, June 11, 2009 1:58:28 PM
Subject: [rules-users] process order example not working fully
I am trying to execute a ruleflow and use rules to assign tasks within the ruleflow in Drools 5.0.1. I have a drl file included in my knowledge base that tries to assign a task to a user when a new human task is created. This is based on the example in org.drools.example.process.order. I can't get my code to work. I don't the rules in the example are working either (dslr for the task assignment or the drl for dynamic logging). After some attempts, I found that this condition
WorkItemNodeInstance()
does not evaluate to true ever.
Do I have to do anything special to make the WorkItemNodeInstance appear in working memory?
Thanks for any help.
--Aziz
14 years, 11 months
Rules returning unexpected results
by Tim S
When I run a test case against drools from within eclipse, it will return the
expected results the first time, but fails every time after that. I'd like
to know what's going on and if my rules are written correctly.
The object of the rule is to check to see a particular IP address has
submitted more than 5 failed payments in the last 24 hours (indicated by
responseCode == 0). The input to this is a List containing all payments from
the IP address and a helper object to indicate whether further action needs
to be taken by way of a boolean flag.
declare Payment
@role( event )
@timestamp( created )
end
rule "Block IP with more than 5 failed payments in the last 24 hours"
when
$fact : BlockRuleResponse()
$count : Number( intValue > 4 ) from accumulate(
Payment(responseCode == 0, $id : id) over window:time(
24h ),
count( $id ) )
then
System.out.println("More than 5 failures in 24 hours");
System.out.println( $count );
$fact.setBlocked( true );
end
The code in my test case which runs this is:
BlockRuleResponse result = new BlockRuleResponse();
result.setBlocked(false);
// Add all commands to this rule session
List<Command> cmds = new ArrayList<Command>();
cmds.add(CommandFactory.newInsert(result));
cmds.add(CommandFactory.newInsertElements(payments));
StatelessKnowledgeSession ksession =
getBase().newStatelessKnowledgeSession();
ksession.execute(CommandFactory.newBatchExecution(cmds));
log.debug(result.isBlocked());
return result.isBlocked();
The getBase() method just returns a KnowlegdeBase containing the rule above.
I then create two Lists of payment objects, one with creation dates set to
new Date(), the other with creation dates set more than 24 hours ago. I run
these through the rules engine and the result returned is always true.
I've tried using cloud + stream mode and also using a stateful session and
inserting the donations then firing all rules but none of this seems to
work. Stream mode always returns false, likewise stateful sessions always
return false whereas stateless cloud mode always returns true after the
first run.
Anyone have any idea what I'm missing?
--
View this message in context: http://n3.nabble.com/Rules-returning-unexpected-results-tp68205p68205.html
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 11 months
Drools Design Patterns
by Ross H
I've been using Drools for about a year now, but still consider myself a
newbie,
although I'm starting to get a better idea of how to implement solutions,
for the
experts this is probably second nature.
Whilst the Drools doco is very good, and the blog/mailing lists are a great
source of info,
and there are now some very good books on Drools, there is a hugh amount of
functionality emerging in the Drools project, it's almost becoming a full
time activity just
to keep up. I wonder if the time is coming to start collecting real
experiences into a form that
makes it easier for new users to work out how to attack their problem.
I hate to re-invent the wheel and if this exists in some form elsewhere, I'd
like to know.
If not, then it might be good to capture this knowledge in some way. I'm
interested in
some views from the user community on what they would like to see.
Maybe the way to go is add some pages to the JBoss Drools wiki and evolve it
from there,
and provide a way for the drools user community to contribute to the overall
success of Drools,
rather than just ask questions.
14 years, 11 months