Common Practices for warning or debug rules/messages
by wendy
Hi,
I'm working on a system that has a large number of rules and we are
getting to the point where we think it would be useful to have some 'debug'
or 'warning' type rules (for lack of a better word). The warning rules
would be rules that would signal to us that something is wrong with the
underlying data and would require someone to go in and fix something. I was
wondering if there are some standard practice as to how to write, maintain,
format... these rules. I can think of a couple of ways to do this but I
would like the communities opinion. We would also like the ability to turn
on/off these debug or warning rules easily while the rest of the system
keeps on processing.
Thank you,
Wendy
--
View this message in context: http://drools.46999.n3.nabble.com/Common-Practices-for-warning-or-debug-r...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Drools Ruleflow deadlock issue[thread]
by vdhinesh
Hi,
i am getting the below error while creating the ksession.startProcess()
instance in multithread.
i.e. two thread calling the ksession.startprocess() with the ruleflow as
http://drools.46999.n3.nabble.com/file/n3136706/ruleflow.bmp
based on initial testing i identified due to delete or update sql operation
the below is appearing. Please let me know how to solve this issue
ERROR LOG:
Hibernate: delete from ProcessInstanceInfo where InstanceId=? and OPTLOCK=?
Hibernate: delete from ProcessInstanceInfo where InstanceId=? and OPTLOCK=?
2011/07/04 11:20:06.475{UTC} [JDBCExceptionReporter :
JDBCExceptionReporter.java: logExceptions: 100] [RMI TCP
Connection(6)-10.50.53.32]: WARN: : SQL Error: 60, SQLState: 61000
2011/07/04 11:20:06.475{UTC} [JDBCExceptionReporter :
JDBCExceptionReporter.java: logExceptions: 101] [RMI TCP
Connection(6)-10.50.53.32]: ERROR: : ORA-00060: deadlock detected while
waiting for resource
2011/07/04 11:20:06.475{UTC} [AbstractFlushingEventListener :
AbstractFlushingEventListener.java: performExecutions: 324] [RMI TCP
Connection(6)-10.50.53.32]: ERROR: : Could not synchronize database state
with session
org.hibernate.exception.LockAcquisitionException: could not delete:
[org.drools.persistence.processinstance.ProcessInstanceInfo#8130]
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:112)......
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Ruleflow-deadlock-issue-thread-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Re: [rules-users] Drools 5.0 -> 5.2 Migration Issue
by Steven Waldren
Wolfgang,
The ActorType definition is here: https://github.com/openhealthdata/CCR-Validator/blob/drools5.0/src/main/j...
The point of this rule (and the other rules in this package) is to "walk" through a very complex object graph and insert the objects into working memory.
I do not use the rule attribute "dialect". The drl in question is here: https://github.com/openhealthdata/CCR-Validator/blob/drools5.0/src/main/r...
I tried to create a simple project that caused the same error, but I create a Class with inner classes similar to ActorType and write a rule like the one in question, but it does not cause the error.
Thanks,
Steven
--
Steven E. Waldren, MD MS
Co-founder, Open Health Data
On Jun 29, 2011, at 2:49 AM, rules-users-request(a)lists.jboss.org wrote:
> Date: Wed, 29 Jun 2011 09:49:10 +0200
> From: Wolfgang Laun <wolfgang.laun(a)gmail.com>
> Subject: Re: [rules-users] Drools 5.0 -> 5.2 Migration Issue
> To: Rules Users List <rules-users(a)lists.jboss.org>
> Message-ID: <BANLkTin04ytQVP6T3tdR6j8ZjUKCO9Rvyw(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Please provide the type declaration for ActorType.Person, field gender and
> typicial examples how gender fields are used in other rules. Ideally, if you
> could reduce your rule set to this simple rule and one other rule, still
> causeing the same problem.
>
> Also, do you use "dialect 'mvel'"?
>
> -W
14 years, 8 months
Removing rule (DRL) from resource throwing NullPointerException...
by prashant.badhe
Hi,
I am using Drools Kbase stateful sessions and using "changeset.xml" file to
dynamically load resources (DRL files) from a folder.
The KnowledgeAgent configuration property 'drools.agent.newInstance' is set
to false.
And the 'drools.resource.scanner.interval' property is set to 1.
As I am using Spring, these properties are passed-in to the agent from
spring-beans.xml.
Now, when I start tomcat, everything works fine (some rules also get fired),
But when I remove a DRL rule from my resource folder following exception is
thrown:
Exception in thread "Thread-8" java.lang.NullPointerException
at
org.drools.reteoo.RuleTerminalNode$RTNCleanupAdapter.cleanUp(RuleTerminalNode.java:507)
at org.drools.reteoo.BetaNode.doRemove(BetaNode.java:253)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at
org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:411)
at org.drools.common.BaseNode.remove(BaseNode.java:109)
at
org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:237)
at
org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:432)
at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:831)
at
org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:809)
at
org.drools.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:206)
at
org.drools.agent.impl.KnowledgeAgentImpl.removeKnowledgeDefinitionFromBase(KnowledgeAgentImpl.java:842)
at
org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:763)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:586)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
at
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1106)
at java.lang.Thread.run(Thread.java:662)
Is there anything more that needs to be set for 'changeset' to work for
add/update/remove of resources?
FYI - I am using Drools 5.1.1
Thanks,
Prashant
--
View this message in context: http://drools.46999.n3.nabble.com/Removing-rule-DRL-from-resource-throwin...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Date arithmetic in when part
by rouvas@mm.di.uoa.gr
Hi list,
I feel this should be an elementary question but unfortunately I haven't
been able to find a solution.
I would like to perform date arithmetic in the when part of a rule.
For example, I would like to express something like:
rule "Date compare rule"
dialect "mvel"
when
a : A()
b : B( a.creationDate <= b.creationDate after 3 months)
then
...
end
Apart from using eval()'s is there any other way to express these types of
comparisons?
Thank you for your time,
-Stathis
14 years, 8 months