drools expert jmx manageable, jboss mbean support
by work_registries@web.de
Hi!
Drools / JBoss Rules v5.0.1.FINAL being a project of jboss.org I would like to know if there is any support to manage Drools Expert related objects (jsr94 and native) like jsr94 rule manager, rule sessions, Drools native Knowledge/Rule base, packages etc. via MBeans? Or the ability to register these instances via *-service.xml deployment method in JBoss AS?
Thanks, Jürgen
______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de
15 years, 5 months
firing explicit rules or agend-groups
by Chris Richmond
Hello,
I thought I had encountered a sample of performing a:
session.fireAllRules();
except on explicit rules or at least on a specific agenda group.but I cannot
seem to locate that in the API for sessions..did I miss something or did I
imagine something before?
Thanks,
Chris
15 years, 5 months
RuleML-2009 REMINDER - Paper Deadline June 28th
by Adrian Paschke
RuleML 2009
3rd International Symposium on Rules, Applications and Interoperability
November 5-7 2009, Las Vegas, Nevada, USA
http://2009.ruleml.org/
co-located with the 12th Business Rules Forum
----------------------------
**********************************************************************
***** Latest News ******
** Submission Deadline - June 28th **
** ------------------ **
* Deadline, June 28th for full, short and Challenge demo papers **
* Keynotes and special talks by **
* Sandro Hawke about W3C RIF, **
* Donald Chapin about OMG SBVR **
* Paul Vincent about CEP **
* Jans Aßmann (FranzInc. CEO) **
* RuleML in the top 100 venues for impact factor in CiteSeerX **
* Forthcoming RuleML special journal issue **
* Proceedings published in Springer LNCS **
* Tutorials about W3C RIF, Drools (Mark Proctor), **
* tutorial Business Process Compliance **
* New categories in the Challenge with prestigious prizes **
* Rules standards session, W3C RIF workshop, lunch panel on Web Rules*
* Student grants of the value of up to $1000 plus free registration **
* 20% RuleML-2009 Partner discounts - see registration page **
**********************************************************************
This year, the 3rd International Symposium on Rules, Applications and
Interoperability (RuleML-2009) takes place in Las Vegas, Nevada, USA,
collocated with the 12th Business Rules Forum, the world's largest Business
Rules event.
The International Symposium on Rules, Applications and Interoperability has
evolved from an annual series of international workshops since 2002,
international conferences in 2005 and 2006, and international symposia since
2007, and is now in the top 100 venues for impact factor (71):
http://citeseerx.ist.psu.edu/stats/venues.
Supported by
===================================================================
W3C, OMG, ACM, AAAI, ECCAI, IAAIL, ACM, Belgian Business Rules Forum
MIT Sloan CIO Symposium, EPTS, BPM Forum Belgium
Sponsored by
===================================================================
Franz Inc
NICTA (National ICT Australia) Ltd
Corporate Semantic Web
Logic Programming Associated Ltd
ruleCore
JBoss
Modelsystems Ltd
(sponsoring opportunities: http://www.defeasible.org/ruleml2009/sponsors)
===================================================================
15 years, 5 months
function & mvel & declare - possible bug
by Michal Bali
Hi,
I've encountered a bizarre bug when a function is used together with a
declared type and a rule with mvel dialect.
To reproduce create a default 'New Drools Project' in Eclipse and replace
Sample.drl with the following:
--------------------------------------------------------------------------
package com.sample
function void aaa() { // <----- comment this and it will work
}
declare SomeBean
prop : int
end
rule "setup"
dialect "mvel" // <----- comment this and it will work
when
eval(true)
then
SomeBean someBean = new SomeBean();
insert(someBean);
System.out.println( "setup inserted:" + someBean);
end
rule "should never fire"
salience -20
when
not SomeBean()
then
System.out.println( "rule that should never fire fired !!!" );
end
------------------------------------------------------------------------
Run the DroolsTest.java and see that the last rule that should never fire is
actually fired. If you comment out the 'aaa' function or change the dialect
to 'java' all works fine.
Note that it breaks on JDK 1.5.0_12 however it works fine on JDK 1.6.0_14.
Tested on WinXP.
Is it just my machine or does anybody else see this issue?
Best regards,
Michal
15 years, 5 months
Help debugging NPE
by Dirk Bergstrom
I'm running into an NPE using Drools 4.0.7, and I'm stumped by it (stacktrace
below). I made some changes to seemingly unrelated code, and this error started
showing up. It would help me to understand what's going on if someone could
tell me roughly what's going on here. Since the error is thrown by generated
code (in what I assume is a shadow proxy), I can't tell what the offending null
pointer is. I'm not even entirely sure what's triggering the bug (it happens
half an hour into the run of big multi-threaded application with about 40K
objects in the working memory).
Is this happening because:
*) getRli_nums() in one of my PRRecord objects is returning a null value?
*) There is a null PRRecord object backing the shadow proxy?
*) Some other thing is null?
*) I'm running into a bug in Drools?
I stuck in this rule:
when
$pr : PRRecord( rli_nums == null )
then
System.out.println($pr.getId());
end
And it didn't print anything, so I'm inclined to think that this is not a simple
matter of something returning a null value...
I'll be most appreciative of any help I can get.
Here's the stacktrace:
java.lang.NullPointerException
at
org.drools.base.net.juniper.dash.data.PRRecord13409648$getRli_nums.getValue(Unknown
Source)
at
org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)
at
org.drools.base.evaluators.BaseMemberOfEvaluator.evaluateCachedRight(BaseMemberOfEvaluator.java:45)
at
org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:89)
at
org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:81)
at
org.drools.common.DoubleBetaConstraints.isAllowedCachedRight(DoubleBetaConstraints.java:164)
at org.drools.reteoo.JoinNode.retractObject(JoinNode.java:189)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateRetractObject(CompositeObjectSinkAdapter.java:375)
at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:189)
at org.drools.reteoo.Rete.retractObject(Rete.java:215)
at org.drools.reteoo.ReteooRuleBase.retractObject(ReteooRuleBase.java:211)
at
org.drools.reteoo.ReteooWorkingMemory.doRetract(ReteooWorkingMemory.java:79)
at
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1250)
at
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1203)
at
net.juniper.dash.data.DataSource.reconcileAssertedRecords(DataSource.java:409)
--
Dirk Bergstrom dirk(a)juniper.net
_____________________________________________
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905
15 years, 5 months
Firiing explicit rules
by Chris Richmond
Hello,
For performance reasons, assuming I am using STREAM mode, is it better to :
A. create several streams in my rule file and inject objects into
various streams depending on my needs
or
B. create a different session for each stream that I might have had in
A. above?
And if I do use option A, is my understanding correct that each stream will
be processed on it's own thread?
And if so, I notice that I am able to update a common statistical object
that I created within my rule file and update it from consequences on
different streams. If each stream is processed on it's own thread, is
updating of this in rule defined statistics object synchronized/thread safe?
For example in my rule file I have the following "stats" object:
# stats object
declare ObjectStats
id : String @key
name: String
lastReadingA : int
lastReadingB : int
end
..then I have the following two rules..
rule "update stats from objects A"
lock-on-active
when
$stats : ObjectStats( $id : id)
$a : ObjectTypeA(parentId == $id, $aValue : value) from entry-point
"stream for objects of type a"
then
modify($stats) { lastReadingA = $aValue };
end
rule "update stats from objects B"
lock-on-active
when
$stats : ObjectStats( $id : id)
$b : ObjectTypeB(parentId == $id, $bValue : value) from entry-point
"stream for objects of type b"
then
modify($stats) { lastReadingB= $bValue };
end
This is working fine and the lock-on-active seems to be preventing me from
getting the "cross product" problem, but is each of these streams processed
independantly on their own thread?
Thanks,
Chris
15 years, 5 months
Guvnor causes NoClassDefFoundError when using functions
by Andrew Nguyen
Hello all,
I have been using Guvnor to manage some rules in a prototype system
that we are developing. If I login to Guvnor, make some changes, and
rebuild the package, sometimes I will get the following error:
java.lang.NoClassDefFoundError: tpn/CompareBetween
I have a function defined that is "compareBetween" and the syntax and
everything looks correct in the generated DRL file. Sometimes, I can
rebuild the package (without making any changes) and the problem will
go away?
Has anyone seen anything like this before?
Thanks,
Andrew
--
Andrew Nguyen
Nguyen & Associates
Custom Software Development & IT Services
http://www.na-consulting.net
andrew(a)na-consulting.net
858-225-7575
15 years, 5 months
Changing timer properties
by Tom
Hi!
I am working with drools (flow) 5.1.snapshot. I have a timer node within my
workflow. Now I'm wondering if it's possible to change the timer delay
property from outside, or at runtime in an action node.
I tried to pass the delay-value as parameter to the process, and then set
the new timer delay, but this approach didn't have any effect,
unfortunately.
Assigning a variable name as delay (eclipse-GUI-property) doesn't work
either (value has to be a number!).
It would be cool if it was possible to parameterize the timer node BEFORE
process execution, therefore the process would be more generic.
Has anyone a idea, how I can get rid of this?
Cheers
tom !
15 years, 5 months
Another question on how to use map
by Brody bach
Hi,
I need to put a map into the working memory and make some check on the
values
I have an object called Student with Id
And for every student there is a list of activity.
Each activity has date and the time for the activity
What I will be putting in the working memory looks as follows:
List<Student> studentList = getStudentList();
Map<Student, List<Activity>> studentActivityMap =
getStudentActivities(studentList);
List objects = new ArrayList();
objects.add(studentList);
objects.add(studentActivityMap);
ksession.execute(objects);
====================
Now i need to check for every student, if there is/are activity(ies) which
needs more than 2 hours. If yes, give an output information which mention,
which student and on which day the activity is longer than 2 hours
when
$studentList : List
$std : Student($id : id) from $studentList
$activityList : ****how to get the list of activity for the student with
this $id from the given map *****
$act : Activity ($date : date, length > 180) from $activityList
then
(print something out using $id from std and $date from act)
Would really appreciate any help and hints here
Regards
bb
--
View this message in context: http://www.nabble.com/Another-question-on-how-to-use-map-tp24181278p24181...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 5 months
Need help with setFocus
by new2drools
Hi All,
Need some help with understanding setFocus.
I have the following use case:
if (condition1) {
if (condition2) {
} else if (condition3) {
} else if (condition 4) {
}
}
if (condition5) {
if (condition2) {
} else if (condition3) {
} else if (condition 4) {
}
}
I created 3 rules (rule2, rule3, rule4) for checking condition2, condition3,
condition4 and
created 1 agenda group (groupX) for them.
I created 2 rules (rule1, rule5) for checking condition1, condition5 and
created 1 agenda group(groupY) for them.
rule "rule1"
agenda-group "groupY"
when
//
then
drools.setFocus("groupX");
end
rule "rule3"
agenda-group "groupX"
activation-group "someActiveGroup"
when
//
then
//
end
>From the java code:
ksession.getAgenda().getAgendaGroup("groupY").setFocus();
Problem: The first time, drools.setFocus("groupX") is invoked, I see that
it's working fine. rule2 or rule3 or rule4 get triggered. But, the SECOND
time that drools.setFocus("groupX") is invoked, I don't see that any rule in
agenda-group groupX is being invoked...even though one of the rule's LHS
explicitly matches...thinking that the activation-group is cancelling all
the activation's (after one rule in that activation group is fired), I even
removed the activation-group statement. But, it didn't help...ideally, I
would like to bunch rule2, rule3, rule4 in one activation group.
Can you please let me know as to why the second invocation of setFocus is
not working? I even tried to remove everything in LHS of rule2/3/4, to see
if the second invocation would work...it doesn't...
Thanks!!
--
View this message in context: http://www.nabble.com/Need-help-with-setFocus-tp24177742p24177742.html
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 5 months