Add another "result" to execution results in Drools Server
by dunnlow
Hi, I'm using Drools Server 5.4.
I have a bean that I am sending to the drools execution server. The server
is processing the object and modifying it as expected - I see the expected
changes to the object in the XML (execution results) returned from the
server.
I would LOVE for my rules to be able to insert *another* object into the
execution results (currently it just returns the one I sent in - with
changes).
Is that possible? I have tried *insert*, but that clearly just adds it to
working memory.
ps. I am thinking about sending an empty instance of the second object
(which I'm guessing..hoping I would be able to update). Is there a better
way?
Thanks,
-J
--
View this message in context: http://drools.46999.n3.nabble.com/Add-another-result-to-execution-results...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
RuleML 2013: 7th International Web Rule Symposium
by Adrian Paschke
-----Original Message-----
From: Adrian Paschke [mailto:paschke@inf.fu-berlin.de]
Sent: Freitag, 11. Januar 2013 09:24
To: 'logic(a)math.uni-bonn.de'
Subject: RuleML 2013: 7th International Web Rule Symposium
Call for Papers
RuleML 2013: 7th International Web Rule Symposium
Seattle Metropolitan Area, USA, July 11-13, 2013
http://2013.ruleml.org
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 in the Seattle Metropolitan Area, Washington. 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.
The RuleML2013 Conference is also hosting
- The 7th Int. Rule Challenge: Further information and a separate call for papers and demos for the challenge will be forthcoming.
- The 3rd Doctoral Consortium on Rules: Further information and a separate call for papers and demos for the challenge will be forthcoming
- An OASIS Legal RuleML TC Meeting and Tutorial
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 Chairs
=================
Adrian Paschke (Freie Universitaet Berlin, Germany)
Program Chairs
===============
Leora Morgenstern (Science Applications International Corporation, USA)
Petros Stefaneas (NTUA, Greece)
Important Dates
===============
Abstract submission: Feb. 19, 2013
Paper submission: Feb. 20, 2013
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.
11 years, 10 months
14GB of NotNodeLeftTuples produced by one rule?
by Svenja Brunstein
Hi all,
we observe a strange behavior with one of our rules. After deployment
and sending lots of events (~150,000 of type "a"), the server slows down
rapidly until it runs out of memory.
We checked with VisualVM which objects are filling the memory: In one
moment there were almost 14GB of NotNodeLeftTuples (88,933,186 Instances)!
This is our rule:
rule "example"
when
$evt1:EventObject(type=='a', $id:data['id'], $user:user) from entry-point
internalstream
$evt2:EventObject(type=='a', data['id']==$id, user!=$user, $user2:user)
from entry-point internalstream
not(EventObject(type=='b', user==$user, data['friendid']==$user2) from
entry-point internalstream)
then
EventObject evt = new EventObject();
evt.setType('b');
evt.setUser($evt1.getUser());
evt.put('friendid', $evt2.getUser());
entryPoints['internalstream'].insert(evt);
end
Is that behavior correct for such a size of event combinations when using a
NOT in the rule?
Thanks,
Svenja
11 years, 10 months
Drools planner Score corruption issue: how to tackle?
by Michiel Vermandel
Hi,
While running a planning I get after about 5 minutes a score corruption:
Exception in thread "main" java.lang.IllegalStateException: Score corruption: the workingScore (-33hard/0soft) is not the uncorruptedScore (-23hard/0soft):
The workingMemory has 1 ConstraintOccurrence(s) in excess:
noConsecutiveIV/NEGATIVE_HARD:[Inspection of B747-AX145.I#1 -233344192, Inspection of B737-AC126.I#1 -24157252, Andy]=10
Check the score rules who created those ConstraintOccurrences. Verify that each ConstraintOccurrence's causes and weight is correct.
This occurs in the localSearch phase (when only running the construction heuristic phase, I do not get this exception).
How do I start in tackling this issue?
Thanks a lot!
Michiel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
11 years, 10 months
Listen event in different package
by Marco Malziotti
Hello
I am a beginner in Drools 5.1.1 and try to listen a event in a packageX
inserted by a rule in another packageY.
I have following 2 drl file :
---inserter.drl----
package packageY
import internal.event.*;
declare EventItem
@role (event)
end
rule "insert EventItem"
when
...
then
EventItem ei = new EventItem(...);
insert(ei);
end
----------------
---listener.drl---
package packageX
import internal.event.*;
rule "listen EventItem temporal constraint"
when
ei: EventItem()
oi: OtherItem(this after ei)
then
System.out.println("Hello word");
end
----------------
EventItem and OtherItem are defined in 'internal.event' package.
If I run with a StatefulKnowledgeSession configured in 'pseudo clock',
I have following stack trace:
java.lang.ClassCastException: org.drools.common.DefaultFactHandle
cannot be cast to org.drools.common.EventFactHandle
at
org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedRight(AfterEvaluatorDefinition.java:322)
at
org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:117)
at
org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:121)
at
org.drools.common.SingleBetaConstraints.isAllowedCachedRight(SingleBetaConstraints.java:151)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:125)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:190)
at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:145)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1174)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1123)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:917)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:251)
...
Moving listener.drl in packageY, all works.
I don't know if it is already open a related issue, perhaps the :
https://issues.jboss.org/browse/JBRULES-2774
Thanks for your attention.
Regards.
Marco Malziotti
Tecnologie nelle Reti e nei Sistemi T.R.S. S.p.A.
Integration Test Engineer
Tel. + 39 06.87281.407
Fax. + 39 06.87281.550
E-mail: marco.malziotti(a)trs.it
Tecnologie nelle Reti e nei Sistemi T.R.S. SpA
Via della Bufalotta, 378 - 00139 Roma
Tel +39.06.87.28.1.1 - Fax +39.06.87.28.1.550
-------------------------------------------------------
Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in questo messaggio
sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le
fosse pervenuto per errore, la preghiamo di eliminarlo senza copiarlo e di non inoltrarlo
a terzi, dandocene gentilmente comunicazione. Grazie.
This message, for the law 196/2003, 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.
-------------------------------------------------------
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
11 years, 10 months
retracting facts based on fact properties
by Jeremy Ary
I've found myself in need of something similar to what Wolfgang described
in an archived post in order to handle retractions based on dynamic
properties found on the fact itself:
*****
Just in case anybody wonders about the effort for building a mechanism for
retracting facts based on fact attributes or other data, I outline the
solution I have implemented.
My class FactWiper implements WorkingMemoryEventListener and Runnable.
- The implementation of objectInserted( ObjectInsertedEvent event )
determines whether the object needs handling and, if so, the retraction
Date, based upon whatever strategy you care to implement, e.g., reflection
method call, Map<Class,Long>, etc. If it is to be handled, it signals
Condition "change" to the thread.
- A SortedMap<Date,Object> expiry2fact keeps track of pending
retractions.
- The thread loops into an awaitUntil( x ) on the "change" condition,
where x is (generally) the first retraction Date. If reached, it retracts
according to the foremost Map entry; if signalled it reasesses the
situation and reenters the awaitUntil.
-W
*****
However, I've been thus far unable to beat an IllegalMonitorStateException
I encounter when looping back in from an insertLogical. Below is my
Listener class and my example rules that demonstrate the exception. Anyone
see what I'm doing wrong with the thread conditions? Thanks for your time.
- Jeremy
--------------------- LISTENER CLASS ------------------------
@Slf4j
@Component
class RetractionListener implements WorkingMemoryEventListener, Runnable {
/** allow a sorted map to track dates and objects to be retracted */
NavigableMap<Date, Object> retractionSchedule = new TreeMap<Date,
Object>();
/** allow some condition to signify when we have a new retractable fact
to consider */
Condition change
/** session wrapper */
@Autowired
SessionManager sessionManager
/**
* runnable task entry point for executor
*/
void run() {
Lock lock = new ReentrantLock()
change = lock.newCondition()
lock.lock()
while (retractionSchedule.isEmpty()) {
change.await()
}
try {
while (System.currentTimeMillis() <
retractionSchedule.firstKey().time) {
log.debug("issuing wait")
change.awaitUntil(retractionSchedule.firstKey())
}
FactHandle handle =
sessionManager.factHandleMap.get(retractionSchedule.firstEntry().value)
sessionManager.session.retract(handle)
} catch (InterruptedException e) {
log.error("RetractionListener thread
${Thread.currentThread().name} interrupted!")
throw e
} finally {
lock.unlock()
}
}
/**
* detect new facts, determine if they are retractable, and add to the
tracker map if needed
*
* @param event
*/
void objectInserted(ObjectInsertedEvent event) {
if (event.object.isRetractable) {
log.debug("retractable object of type
${event.object.class.simpleName} detected")
try {
long duration = event.object.duration
if (!duration) {
// go ahead and throw up a similar exception to missing
property for a missing value
throw new MissingPropertyException("no value specified
for retractable object's duration")
} else {
Calendar calendar = GregorianCalendar.getInstance()
log.debug("duration of object noted to be ${duration}
milliseconds")
log.debug("current time: ${calendar.time}")
calendar.add(Calendar.MILLISECOND, duration.toInteger())
log.debug("setting schedule for ${calendar.time}")
retractionSchedule.put(calendar.time, event.object)
log.debug("signaling change condition")
change.signal()
}
} catch (MissingPropertyException e) {
log.error("retractable object ${event.object} missing
needed property/value 'duration'")
throw e
}
}
}
...[REST OF CLASS IRRELEVANT]...
}
--------------------- RULE FILE -------------------------
declare Fire
@role(event)
end
declare SprinklerInterval
@role(event)
fire : Fire
isRetractable : boolean
duration : long
end
rule "fire detected"
when
$f : Fire ( )
not SprinklerInterval ( fire == $f )
then
insertLogical ( new SprinklerInterval($f, true, 500) );
end
rule "add sprinklers running notification"
when
$s : SprinklerInterval ( )
then
log.info("Sprinklers running on fire located in: " +
$s.getFire().getName());
end
11 years, 10 months
Documentation for Drools Expert 5.1
by veit.guna@nightprogrammer.org
Hi.
I'm trying to find the old documentation for Drools Expert 5.1 but
without luck. On the servers I find >=5.2 versions only.
Any chance to get the 5.1 version somewhere?
Thanks.
11 years, 10 months