Drools and mobile
by Leonardo Gomes
Since I'm really a noobie on mobile development, this may be a stupid
question, but it doesn't hurt to ask: Does anybody here ever used Drools on
a mobile application? Would its dependencies allow it to be run on an
Android or Blackberry?
Basically, my idea is that with the CEP stuff added on Drools 5, it would be
interesting to capture events generated by the device and do some analysis.
Waiting on your feedback :)
Thanks,
- Leonardo.
14 years, 10 months
Update function usage for java objects to be retrieved for database update
by dbfree75
Hello,
I'm new with Drools and I'm facing a problem I don't know how to solve.
I've defined several (>50 rules) each one is used to set a property of java
objects I inserted in the session (stateful session since I need to update
inserted facts).
As a result I get the updated objects and update my database.
Since rules must be fired depending of the properties set in previous rules,
I made use of the update function.
Since I need properties to be set, I make use of such constraint in When
section : property == null
I suppose that any update on inserted facts make rules be evaluated again.
Thus, any update should fire again rules I know that will never be executed
: property will remain null (I didn't manage easily to create excluding
rules preventing such loop for all created rules).
Consequently, rules are fired again and again as many times as I update the
object.
How can I solve my problem and get acceptable perfomance in rules processing
?
Should I use update function for any property set or only for the last set
property to get the updated object ?
Thanks for your reply
--
View this message in context: http://drools.46999.n3.nabble.com/Update-function-usage-for-java-objects-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 10 months
drools dynamic LHS
by marunam
Hello,
I have a question about having dynamic LHS in drool rules. Below is what I
am looking for
rule "Check Age"
when
Person(age > 24)
then
do something...
end
What is the best way to keep the actual fact data dynamic(i.e. 24 in this
case) and how do I feed it do drools
This is very simple rule and the only fact value(hardcoded) that I have is
"24". I may have complex rules in which I could have many fact values for
different attributes. I am looking for a solution where I don't hard code
any value in the rule
Thank you for looking into this and your response
--
View this message in context: http://drools.46999.n3.nabble.com/drools-dynamic-LHS-tp2980536p2980536.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 10 months
Business Logic in Java
by sdinoo
I have a claim object that I want to subject to a Rule
there is a Java class that contains the complex business logic
Rule Class DurBusinessRules has the following method
public DurRuleResponse executeHardCodedTDAlertRule(DurClaim incomingClaim)
DurRuleResponse is an response object that contains the contributing claims
I want to be able to send just the incoming claim to the Rule
and in the rule I want to print just the values from the DurRuleResponse
object
something like
when
executeHardCodedRule(incoming claim)
then
print each contributing claim from the DurRuleResponse
end
Can someone help?
--
View this message in context: http://drools.46999.n3.nabble.com/Business-Logic-in-Java-tp2979079p297907...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 10 months
Re-insert modified instance of same fact and Truth maintenance
by Abhay B. Chaware
Could be a basic question, but thought I should get clarified.
I insert a fact say, a Computer object with some attributes ( hdd=10GB ) set, in working memory. Then I have a rule that checks if a Computer with 10GB hdd is inserted .. if yes, then it does a logicalInsert of an Alert object with computerId = this computer's id.
Now I would like to re-insert the same fact with HDD changed to '20gb' and would like drools to automatically retract the Alert for this computerId .. how do I achieve this ?
-abhay
14 years, 10 months
Throws NPE when comparing one property to another of the same bean class
by Miles Wen
That's almost all the details in the mail subject; When I am running this
rule in drools 5.1.0:
package com.sample
import com.sample.Msg;
import java.util.Date;
rule "Hello World"
when
m1:Msg()
m:Msg(dbl > lo || m1.in == in)
then
end
The java bean named 'Msg' definition:
package com.sample;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
public class Msg {
private Long lo = 5l;
private double dbl = 5.5;
private Date date = new Date();
private int in = 4;
private boolean bool;
private Set<String> set = new HashSet<String>();
... // getter and setters ignored
then it throws exception :
java.lang.NullPointerException
at org.drools.reteoo.LeftTuple.get(LeftTuple.java:399)
at org.drools.reteoo.LeftTuple.get(LeftTuple.java:434)
at
org.drools.rule.VariableRestriction$DoubleVariableContextEntry.updateFromTuple(VariableRestriction.java:563)
at
org.drools.rule.AbstractCompositeConstraint$MultiFieldConstraintContextEntry.updateFromTuple(AbstractCompositeConstraint.java:306)
at
org.drools.common.SingleBetaConstraints.updateFromTuple(SingleBetaConstraints.java:123)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:77)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:189)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:138)
at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:148)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:378)
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)
at com.sample.DroolsTest.main(DroolsTest.java:43)
I think I am doing nothing wrong with the code, is this a bug or something?
Or just comparing properties in the same bean class is illegal?
14 years, 11 months
CfP: edBPM 2011 Workshop deadline ends May 27th
by Adrian Paschke
Apologies for cross-posting...
---------------------------------------------------------------------
Call for Papers
5th International Workshop on Event-Driven Business Process Management,
edBPM 2011 to be held alongside the Busines Process Management Conference
BPM 2011 on August 29th 2011 in Clermont-Ferrand, France
http://icep-edbpm11.fzi.de
Submission Deadline ends May 27, 2011
=====================================================================
TOPICS
Authors are invited to submit novel contributions in the above mentioned
problem domain. Specifically, the relevant topics include, but are not
limited to:
- Event-driven BPM: Concepts
e.g. role of event processing in BPM, business events: types and
representation, vent stream processing in business processes, process event
processing in CEP, data- and event-driven business processes, event and
process interaction patterns
- Design-time CEP and BPM
e.g. modelling modelling events in human-oriented tasks,
semantics/ontologies for event-driven BPM, BPMN and event processing,
interaction modelling of process model and event processing network.
- Run-time CEP and BPM
e.g. event pattern detection, BPEL and event processing, reasoning about
unknown/ similar events
- Applications/ Use use cases for event-driven BPM
e.g. event-driven monitoring/ BAM , event-driven SLA monitoring,
context-aware BPM
The Workshop is planned as a full-day event, including a keynote, paper
presentations, lightning talks, demos, posters, and a moderated, open
discussion with the clear goal of agreeing upon a research roadmap for
event-driven Business Process Management research, by taking into account
new challenges, described earlier.
Additional information
http://icep-edbpm11.fzi.de
--------------------------------------------------------
14 years, 11 months
viewing working memory
by Hezi Stern
I am working with stateless session (Drools 5.1.1) and I wish to view the
objects in the working memory (debug purposes)
I understand that in stateless session the audit does not work (not working
for me, on breakpoint I get the message "the selected working memory is
empty" ).
How can I view in breakpoint (or print in runtime) the working memory?
Regards,
Hezi
14 years, 11 months
Rule of rules
by Abhay B. Chaware
Is it possible to write rule of rules with Drools ? e.g. I write two complex rules in drools and then I want a third rule that can be defined to process facts
1. which passed both rule 1 and rule 2 OR
2. which passed rule 1 but not rule 2 OR
3. which passed rule 2 but not Rule 1 OR
4. which did not pass rule 1 and rule 2 and so on ..
Kind of a new 'layer' on top of drools .. ?
I can think of a crud way, that is to flag the fact object when it passed rule 1 and rule 2 and check the flag in rule 3 .. but am looking for a more sophisticated way using drools features ..
-ahbay
14 years, 11 months