Guvnor Calendars
by Anton Nikulin
Hi
I have a problem with calendars in guvnor. I want to use calendars feature
in my rules and I've defined such rule in Guvnor:
rule "CalendarTest"
calendars "AUD Home Loans"
no-loop true
dialect "mvel"
when
then
System.out.println("CALENDAR IS WORKING!!!");
end
When in my application I consume ChangeSet.xml in which i specify recources
in binary format as PKG type, it always fires this rule even if there is no
calendar in session. However, if i defined sources in changeset in DRL
format, everything is ok.
Can you help me, why is it so?
Thanks, Anton
13 years
Drools Planner 5.5.0.Final Memory corruption issues
by duggal
I am using Drools Planner for an optimization problem and facing weird memory
corruption issues.
The problem facts and planning entities are JPA entities which have lots of
relationships and are large in size.
When I use a few of the entities, then the solving works ok.
However when I use large number of these entities, then I get strange
exceptions indicating memory corruption in the result. E.g. the serialized
best solution (serialized by me for persistence purposes) appears to be have
invalid class types in members.
I see that there are the following exceptions in the log (for both small and
large data sets) -
Exception in thread "Thread-106" java.lang.RuntimeException: Unknown
accessor type:
org.mvel2.optimizers.impl.refl.collection.ArrayCreator@e7d1626d
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeAccessor(ConditionAnalyzer.java:264)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeNode(ConditionAnalyzer.java:250)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.statementToExpression(ConditionAnalyzer.java:467)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.readInvocationParams(ConditionAnalyzer.java:457)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeAccessor(ConditionAnalyzer.java:345)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeExpressionNode(ConditionAnalyzer.java:326)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeAccessor(ConditionAnalyzer.java:286)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeNode(ConditionAnalyzer.java:250)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeSingleCondition(ConditionAnalyzer.java:133)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:99)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:70)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:83)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:270)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.MvelConstraint.access$200(MvelConstraint.java:51)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
org.drools.rule.constraint.MvelConstraint$ConditionJitter.run(MvelConstraint.java:250)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
[2/12/13 12:35:34:309 IST] 00000174 SystemErr R at
java.lang.Thread.run(Thread.java:770)
Are these exceptions (which appear benign in the small data set solution)
causing my issue?
Are there any further troubleshooting that I can perform to isolate the root
cause?
Any help will be much appreciated. Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-5-5-0-Final-Memory-corru...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
NullPointerException when using RuleAgent
by IPatel
Hi,
I have been trying to write the following code to automatically deploy any
changes made to the rules. However i am getting nullpointerexception errors.
I see many posts regarding this topic and have tried different options but
the error won;t go away.
public static void main(String[] args) {
try {
FileInputStream file = new
FileInputStream("C:\\Users\\folderabc\\workspace\\Drools
Sample\\bin\\Guvnor.properties");
Properties p = new Properties();
p.load(file);
RuleAgent agent = RuleAgent.newRuleAgent(p); *<-- this is where
it is failing* RuleBase rb = agent.getRuleBase();
WorkingMemory ksession = rb.newStatefulSession();
Car c = new Car("yellow", 2100);
Driver d = new Driver("Isha", 18, c, "lets try it" );
ksession.insert(d);
ksession.fireAllRules();
//logger.close();
} catch (Throwable t) {
t.printStackTrace();
}
}
/Here are the errors i am getting on my console:/
java.lang.NullPointerException
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:384)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:368)
at org.drools.agent.RuleAgent.init(RuleAgent.java:268)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:208)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:168)
at kijanowski.GuvnorTest.main(GuvnorTest.java:43)
Any help will be greatly appreciated. Thank you
--
View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-using-RuleAge...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 1 month
Pattern order affects activation
by DOLECEK Ales
Hello,
I have following rule:
rule "Remove unsued phones"
when
exists Customer()
not Customer(phone == $value)
$unused: Phone($value: value)
then
retract($unused);
end
There might be multiple Customer and Phone facts in the working memory and the purpose of the rule is to remove phones that do not belong to any of the customers. The rule should not be activated while there are no Customers in WM - hence the "exists Customer()". This is becaus there are other rules, taht might use the phones to lookup customers.
There Phone with value = "test" in working memory when Customer with phone = "test" is inserted. BTW: Both facts are immutable.
The behavior differs depending on order of the 3 patterns in the LHS of the rule.
1) If the "exists Customer()" is first activation is created
- this is wrong since the "exists Customer()" shall be false
2) if I move the "exists Customer()" between the other patterns activation is created and immediatelly canceled
- this is also wrong since, although in my case (where are no side effects) it works
3) Finally if the "exists Customer()" comes last the then activation is not created at all
- this is correct
Is this bug or am I missing something important about rule language? Rewriting the LHS with expicit infix and does not help:
(exists Customer()) and
(not Customer(phone == $value)) and
($unused: Phone($value: value))
Ales
FYI: I'm using 5.5.0.Final
13 years, 1 month
RuleML 2013: 7th International Web Rule Symposium - Extended Call for Papers, Demos and Phd Papers
by Adrian Paschke
++++ Abstract/Paper Deadline Extended to Feb. 21st/Feb. 28th ++++++
Call for Papers, Call for Demos, Call for PhD Papers
RuleML 2013: 7th International Web Rule Symposium
University of Washington, Seattle,USA, July 11-13, 2013
http://2013.ruleml.org
The RuleML2013 Conference is also hosting:
- The 7th International Rule Challenge
- The 3rd Doctoral Consortium on Rules
- The OASIS Legal RuleML TC Meeting and Tutorial
=================================
The annual International Web Rule Symposium (RuleML) is an international conference on research, applications, languages and standards for rule technologies. RuleML is the leading conference for building bridges between academia and industry in the field of rules and its applications, especially as part of the semantic technology stack. It is devoted to rule-based programming and rule-based systems including production rules systems, logic programming rule engines, and business rules engines/business rules management systems; Semantic Web rule languages and rule standards (e.g., RuleML, SWRL, RIF, PRR, SBVR); Legal RuleML; rule-based event processing languages (EPLs) and technologies; hybrid rule-based methods; and research on inference rules, transformation rules, decision rules, production rules, and ECA rules.
The 7th International Symposium on Rules and the Web (RuleML 2013) will be held on July 11-13, 2013 just prior to the AAAI conference at the University of Washington, Seattle, USA. Selected papers will be published in book form in the Springer Lecture Notes in Computer Science (LNCS) series.
Objectives
==========
RuleML-2013 will stimulate cooperation and interoperability between research and business in a community of researchers and practitioners who are interested in the theory and applications of rules. The symposium's areas of research and development have helped drive the rapid progress in technologies for practical rule and event processing. As a result,
RuleML-2013 promises to be an exciting venue for the exchange of new ideas and experiences on issues related to engineering, management, integration, interoperability of rule systems, and interchange of rules in distributed enterprise, intranets, and open distributed environments. Industry practitioners, rule-system providers, users of rules, technical experts and developers, and researchers who are exploring foundational issues, developing systems and applications, or using rule-based systems are invited to share ideas, results, and experiences.
Topics
=======
We invite high-quality submissions related (but not limited) to one or more of the following topics:
* Rules and automated reasoning
* Rule-based policies, reputation, and trust
* Rule-based event processing and reaction rules
* Rules and the web
* Fuzzy rules and uncertainty
* Logic programming and nonmonotonic reasoning
* Non-classical logics and the web (e.g modal and epistemic logics)
* Hybrid methods for combining rules and statistical machine learning techniques (e.g., conditional random fields, PSL)
* Rule transformation, extraction, and learning
* Vocabularies, ontologies, and business rules
* Rule markup languages and rule interchange formats
* Rule-based distributed/multi-agent systems
* Rules, agents, and norms
* Rule-based communication, dialogue, and argumentation models
* Vocabularies and ontologies for pragmatic primitives (e.g. speech acts and deontic primitives)
* Pragmatic web reasoning and distributed rule inference / rule execution
* Rules in online market research and online marketing
* Applications of rule technologies in health care and life sciences
* Legal rules and legal reasoning
* Industrial applications of rules
* Controlled natural language for rule encoding (e.g. SBVR, ACE, CLCE)
* Standards activities related to rules
* General rule topics
Conference Chair
=================
Adrian Paschke (Freie Universitaet Berlin, Germany)
Program Chairs
===============
Leora Morgenstern (Science Applications International Corporation, USA)
Petros Stefaneas (NTUA, Greece)
Important Dates
===============
Abstract submission (extended): Feb. 21, 2013 23:59 UTC-12
Paper submission (extended): Feb. 28, 2013, 23:59 UTC-12
Notification of acceptance/rejection: April 12, 2013
Camera-ready copy due: May 3, 2013
RuleML-2013 dates: July 11-13, 2013
Submission guidelines
=====================
Papers must be original contributions written in English and must be submitted at http://www.easychair.org/conferences/?conf=ruleml2013 as:
* Full Papers (15 pages in the proceedings)
* Short Papers (8 pages in the proceedings)
Please upload all submissions in LNCS format (http://www.springer.de/comp/lncs/authors.html). To ensure high quality, submitted papers will be carefully peer-reviewed by 3 PC members based on originality, significance, technical soundness, and clarity of exposition.
Selected papers will be published in book form in the Springer Lecture Notes in Computer Science (LNCS) series.
7th International Rule Challenge
==========================
Open Call for Demos:
http://www.csw.inf.fu-berlin.de/ruleml2013/content/7th-international-rule...
Submission deadlines - RuleML-2013 Challenge:
Submission deadline for demo papers and demo systems: May 3rd, 2013
Notification of accepted demo papers and demo systems: June 7th, 2013
Camera-ready deadline: June 21st, 2013
3rd Doctoral Consortium
==========================
Call for PhD Papers:
http://www.csw.inf.fu-berlin.de/ruleml2013/content/3rd-ruleml-doctoral-co...
Submission deadlines - RuleML 2013 Doctoral Consortium:
Submission deadline for demo papers and demo systems: May 3rd, 2013
Notification of accepted demo papers and demo systems: June 7th, 2013
Camera-ready deadline: June 21st, 2013
13 years, 1 month
Stateless or stateful knowledge session in drools server
by Tim Slonaker
Hello all,
I am new to drools. My company is looking into switching from a commercial
rule engine to drools. Our existing codebase is .net not Java. We are
trying to integrate drools into our existing .net application by calling
into a drools-server using it’s restful interface.
Our current rule engine only works in a stateless mode so I am trying to
figure out how to get drools-server to work in a stateless mode. I have
posted before that I have been having difficulty using a stateless session
with ruleflows (
http://drools.46999.n3.nabble.com/Ruleflow-not-working-with-stateless-ses...).
I have noticed that the stateful sessions seem to work fine as far as
ruleflows are concerned. I am wondering if I can use a stateful session
instead of stateless.
Our application could have 100s of unique users per minute. The rule
engine provides a unique decision for each user based on their specific
data. So, each user’s data / facts should be isolated. There can’t be any
data sharing between users, that would make the rule engine decisions
invalid. How would I configure a stateful session to work in this
scenario? Is it possible?
Thanks,
Tim S.
13 years, 1 month
Guvnor Web-guided DecisionTable - calls function with parameters from cells values
by nbe42
Hello,
I'm pretty new with Guvnor (5.5) and I need some help to write a rule.
I have to write a rule with the web guided decision table editor. I have in
my working memory a calendar object with a function for verify if the
current date is in an time interval.
Now, I'm using a predicate and writes this in the cell :
myCal.isInInterval("08:00","12:00")
So the source code is like :
WHEN
eval( myCal.isInInterval("08:00","12:00") )
THEN
…
The problem is that it's really not user friendly. I want to be able to
write values in one or two cell(s) and the source code remains like above.
Is there a way to do this ?
Thanks a lot for your help
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-Web-guided-DecisionTable-calls-f...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 1 month
Drools upgrade from 5.1.0 to 5.5.0.Final
by SuchitraKrishna
Hello,
I am trying to upgrade our project to jdk7 and in the process,
upgrading from drools 5.1.0 to drools 5.5.0.Final and I have a few
questions.
1. Is 5.5.0.Final compatible with jdk7 and is it the production version?
2. When I compile our code with 5.5.0.Final, I see the following
compilation error
/drools/util/DroolsRuleHandler.java:[58,25]
setClassLoader(java.lang.ClassLoader...) has private access in
org.drools.compiler.PackageBuilderConfiguration
DroolsRuleHandler.java has this piece of code
PackageBuilderConfiguration builderCfg = new PackageBuilderConfiguration();
builderCfg.setClassLoader( this.getClass().getClassLoader() );
In the new version of drools, this setClassLoader is private whereas in
5.1.0 this used to be public. Is there a way to get around this error? I
would be most grateful if you could point me in the right direction. I have
looked at the archives since 2011 and could not find anything in there. Is
there a drools migration page somewhere that I missed? Thanks a lot for
your help.
13 years, 1 month
Anyone using JSR94?
by Mark Proctor
I've asked this on the developer list, thought I'd ask it here too.
Is anyone using JSR94, anyone think we should not nuke it?
Mark
13 years, 1 month