Error while importing repository from Guvnor 5.1.1 to 5.3.3.Final
by LaKhI ReDdY!!!!!!!!!!!
Hi,
I am trying to import the whole repository from 5.1.1 to 5.3.3.Final
version.I am getting the below attached error while importing.Please find
the attached file for error details.
We have added new functionality(Rule request) in 5.1.1 and using it for
quite some. Now we want to migrate to 5.3.3.Final and we want to drop the
additional functionality(Rule Request) which we have added earlier in 5.1.1
version.
The repository which we have currently contains the Rule request details
also, does this causes problem in importing to Guvnor 5.3.3.Final?
Regards,
Lakshmi Reddy
11 years, 9 months
Erratic behaviour of Drools
by Poissy.B
Hello,
I am a little bit confused as I don't get what I am doing wrong. Here is my
rule:
**************************
rule "Exchange Pattern"
when
$p2: ProcessAdapter()
$mainProcess: ProcessAdapter( isMainProcess(), this!=$p2)
MessageFlowAdapter ( fromProcess == $mainProcess, toProcess==$p2)
MessageFlowAdapter ( fromProcess == $p2, toProcess==$mainProcess)
exists ItemAwareElementAdapter( ) from
$mainProcess.getReceivedResources($p2)
exists ItemAwareElementAdapter( ) from
$mainProcess.getGivenResources($p2)
then
System.out.println("** FOUND EXCHANGE PATTERN betwwen
"+$mainProcess.getParticipant().getName()+" AND
"+$p2.getParticipant().getName());
System.out.println("Given:
"+$mainProcess.getGivenResources($p2)+$mainProcess.getGivenResources($p2).size());
System.out.println("Received:
"+$mainProcess.getReceivedResources($p2)+$mainProcess.getReceivedResources($p2).size());
System.out.println("Intersection:
"+$mainProcess.intersectGivenAndReceivedResourcesWithProcess($p2)+$mainProcess.intersectGivenAndReceivedResourcesWithProcess($p2).size());
end
**************************
This rule is never fired, although I know it should.
When I comment out the ONE OF the two "exists" constraints, I get this
output:
**************************
** FOUND EXCHANGE PATTERN betwwen Amazon AND Ship.Comp.
Given: [Products (ID:DataObjectReference_2)]1
Received: [Products (ID:DataObjectRefeference_GEN7)]1
Intersection: [Products (ID:DataObject_2)]1
**************************
>From the output you can see that the rule should have been fired with the
two "exists" constrains as both conditions are met, but it doesn't.
I am kind of new to Drools so I may be doing an horrible mistake but google
haven't been my friend so far. Any help will be very appreciated!
Thanks.
Anis
11 years, 9 months
Drools6 - High Availability Environment not Working
by Zahid Ahmed
Hi,
I am deploying Drools6 in our organization and the requirement is, Drools6 Workbench and rules engine should be in High Available environment. I am following the Drools developer guide for deployment but the assets among two workbench servers are not synching.
Can anyone guide me what could be wrong. I am simply following the steps provided in the guide. Also installed Zookeeper, Helix as per the guide.
Regards,
Zahid Ahmed
11 years, 9 months
Exception when using retract
by Sara Didaci
Hi
i have a problem that seems to me quite similar to this
http://drools.46999.n3.nabble.com/rules-users-Exception-when-using-retrac...
(i cannot reply to this post, don't Know why)
In my case exception is
java.lang.NullPointerException
at
ConditionEvaluator9935e5dba4084774a05641a0448cd694.evaluate(Unknown Source)
at
org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
at
org.drools.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:169)
at
org.drools.common.DoubleBetaConstraints.isAllowedCachedLeft(DoubleBetaConstraints.java:88)
at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:78)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:232)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:89)
at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:232)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:116)
at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at
org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
at
it.eximia.meerkat.re.core.RuleEngine.executeSession(RuleEngine.java:212)
at it.eximia.meerkat.re.core.RuleEngine.run(RuleEngine.java:180)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
|#]
[#|2014-06-07T04:05:11.418+0200|WARNING|sun-appserver2.1|RuleEngine|_ThreadID=25;_ThreadName=pool-5-thread-1;_RequestID=b189af67-c681-411d-ad8c-44f1ec1646bf;|errore
nel Rule Engine
Exception executing consequence for rule "temperatura normale" in
it.sure.template: java.lang.NullPointerException
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at
org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
at
it.eximia.meerkat.re.core.RuleEngine.executeSession(RuleEngine.java:215)
at it.eximia.meerkat.re.core.RuleEngine.run(RuleEngine.java:180)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at
org.drools.core.util.index.LeftTupleIndexHashTable.remove(LeftTupleIndexHashTable.java:370)
at org.drools.reteoo.NotNode.retractLeftTuple(NotNode.java:214)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:250)
at
org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractRightTuple(CompositeLeftTupleSinkAdapter.java:165)
at org.drools.reteoo.JoinNode.retractRightTuple(JoinNode.java:184)
at
org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:283)
at
org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java:354)
at org.drools.common.NamedEntryPoint.retract(NamedEntryPoint.java:568)
at
org.drools.base.DefaultKnowledgeHelper.retract(DefaultKnowledgeHelper.java:357)
at
it.sure.template.Rule_temperatura_normale_53fab538df67455491288390ebd5c29c.defaultConsequence(Rule_temperatura_normale_53fab538df67455491288390ebd5c29c.java:49)
at
it.sure.template.Rule_temperatura_normale_53fab538df67455491288390ebd5c29cDefaultConsequenceInvokerGenerated.evaluate(Unknown
Source)
at
it.sure.template.Rule_temperatura_normale_53fab538df67455491288390ebd5c29cDefaultConsequenceInvoker.evaluate(Unknown
Source)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
... 16 more
|#]
i'm using drools 5.5.0 Final
here is the rule, (i removed some statements don't seems relevant)
rule "temperatura normale"
salience -2
when
$nowTimestamp : ExecutionTimestamp()
$event: ScalarEvent(name == "TEMPERATURE_EVENT", $creation:
creationDateTime, $uuid : sensorUUID ) from entry-point "event"
not(ScalarEvent(name == "TEMPERATURE_EVENT", creationDateTime.time
< $creation.getTime(), sensorUUID == $uuid) from entry-point "event")
$sensor: EnvironmentalSensor(sensorUUID == $event.sensorUUID,
$sensor.type.keyId == "TEMP_ENV_TYPE", $sensor.assessable == true)
$temperature1: Number( floatValue >=
Float.valueOf($sensor.getPropertyValue("min")) ) from $event.measure
$temperature2: Number( floatValue <=
Float.valueOf($sensor.getPropertyValue("max")) ) from $event.measure
$sensorInAlarm: SensorInAlarm (sensorUUID == $uuid)
then
ConcurrentHashMap<String, String> statusInfo =
sensorCache.get($sensor.getId().toString());
SimpleDateFormat formatter = new
SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long sensorId = $sensor.getId();
Date alarmTimestamp = $event.getCreationDateTime();
String measure = $event.getMeasure() + "";
String alarmType = "TEMPERATURE_OK";
statusInfo.put("eventMeasure", measure);
statusInfo.put("eventTimestamp",
formatter.format(alarmTimestamp));
$sensorInAlarm.setEventTimestamp(alarmTimestamp);
$sensorInAlarm.setEventMeasure(measure);
update($sensorInAlarm);
sensorCache.update($sensor.getId().toString(),
statusInfo);
RuleEngineLogger.log(RuleEngineLoggerLevel.INFO,
"normale");
retract($event);
end
The exception does not immediately occur sometimes it takes days
before occurs
Rule is fire when event TEMPERATURE_EVENT occurs. TEMPERATURE_EVENT is a
measure from a thermometer, i have a dispather that simultaneously
sends 10 measures (coming from 10 different sensors), then dispatcher
stops sending data for few minutes then it sends again new 10 measures,
an so on.
Same situation for me: When the exception is thrown, it looks like that
the event is not removed from the knowledge base (I watch the number of
events in the knowledge base -- fact count)
I more than 10 rules, fired every 1s
Any help would be appreciated
Sara
--
Eximia Srl <http://www.eximia.it>
Sara Didaci
Application Engineer
Eximia S.r.l.
Via Sassari, 3
09123 Cagliari - Italy
Tel +39 070 7966776
Fax +39 070 680904
Mob +39 328 4660322
Email sara.didaci(a)eximia.it <mailto:sara.didaci@eximia.it>
Web www.eximia.it <http://www.eximia.it>
Eximia è un'azienda certificata ISO 9001
Image
Il contenuto di questa e-mail e dei file allegati è RISERVATO e da
considerarsi utilizzabile solamente dalla persona o ente al quale è
indirizzato. Se avete ricevuto questa e-mail per errore, siete pregati
di rimandarla al mittente e di eliminarla. (Legge italiana 196/2003).
The content of this e-mail and any files is CONFIDENTIAL and intended
solely for the use of the individual or entity to whom it is addressed.
If you have received this e-mail in error, please return it to the
sender and delete it. (Italian Law 196/2003).
11 years, 9 months
drools 6 code inner code which serarch kmodule.xml
by ganeshneelekani
Hi Team,
please follow below code.
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession ksession = kContainer.newKieSession("ksession-rules");
whenever I executed it searched for ksession-rules of kmodule.xml which
presnt in the path /resouces/META-INF/kmodule.xml.
which of the above code finds that, can any one tell me logic behind it, I
want to modify this code according to requirement.
Thanks,
--
View this message in context: http://drools.46999.n3.nabble.com/drools-6-code-inner-code-which-serarch-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Can't clone repository NoSuchElementException
by Parham, Clinton
Hello,
I have Drools 6.0.1 installed on RedHat Linux 5 and running under JBoss EAP 6.1.1.
I would like to clone from a local git server running on the same server. But when I do so, I get a "Can't clone repository. java.util.NoSuchElementException" message in the browser. There are no errors in the server.log
Why doesn't this work?
Here's how I'm running the git daemon:
$ git daemon --verbose --export-all --port=9419 --base-path=/home/brms/git/
URL I enter into the Clone Repository dialog:
git://localhost:9419/test.git
This is how I setup my repo:
$ cd /home/brms/git/
$ mkdir test.git
$ cd test.git/
$ git init --bare
Initialized empty Git repository in /home/brms/git/test.git/
Thanks,
Clint
________________________________
The contents contained herein may contain confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, printing or action taken on the contents is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete this message.
11 years, 9 months
Analysing OutOfMemory, too many RightTuple
by bvoisin
Hi all,
With my set of rules and data, I get OutOfMemory issues. It works fine with
smaller sets of Data.
Looking with a HeapDump analyzer, I found that there was thousands of
RightTuples. In a previous run, before some rules fixes, I also add tons of
JoinNodeLeftTuple's.
They seem to come from poorly written rules; unfortunately, I find it quite
difficult to find and correct the conditions/rules causing these tons of
RightTuple.
Is there any analysis option/tool that can give information on the Left Hand
Side (tuples and sinks), or is there any BestPractices on how to correct the
rules to limit this behavior?
I use Drools 6.1.0.Beta4, with Phreak enabled, but had similary issues with
6.0.0 or 6.0.1
Regards,
Benoît
--
View this message in context: http://drools.46999.n3.nabble.com/Analysing-OutOfMemory-too-many-RightTup...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
NullPointerException at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion
by tia
Hello,
I'm trying to add a new rule on the fly like here:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test...
Here is the method to add a rule, once the KieSession is created and
configured:
public void addRule(String rule){
KieServices ks= KieServices.Factory.get();
ReleaseId rid= ks.newReleaseId("org.kie", "businessrules", "1.0");
KieFileSystem kfs = ks.newKieFileSystem();
kfs.generateAndWritePomXML(rid);
kfs.write("src/main/resources/rule.drl",rule);
KieBuilder kb = ks.newKieBuilder(kfs).buildAll();
if( kb.getResults().hasMessages( org.kie.api.builder.Message.Level.ERROR )
) {
for( org.kie.api.builder.Message result : kb.getResults().getMessages() )
{
System.err.println(result.getText());
}
}
InternalKieModule kieModule = (InternalKieModule) ks.getRepository()
.getKieModule(rid);
byte[] jar = kieModule.getBytes();
Resource jarRes = ks.getResources().newByteArrayResource(jar);
ks.getRepository().addKieModule(jarRes);
kieContainer.updateToVersion(rid);
}
But when I'm calling this method, I get the error below:
java.lang.NullPointerException
at org.drools.core.util.LinkedList.remove(LinkedList.java:168)
at
org.drools.core.phreak.AddRemoveRule.mergeSegment(AddRemoveRule.java:938)
at
org.drools.core.phreak.AddRemoveRule.correctSegmentOnSplitOnRemove(AddRemoveRule.java:377)
at org.drools.core.phreak.AddRemoveRule.removeRule(AddRemoveRule.java:182)
at
org.drools.core.reteoo.ReteooBuilder.removeTerminalNode(ReteooBuilder.java:171)
at org.drools.core.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:165)
at
org.drools.core.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:1406)
at
org.drools.core.reteoo.ReteooRuleBase.removeObjectsGeneratedFromResource(ReteooRuleBase.java:1652)
at
org.drools.compiler.compiler.PackageBuilder.removeObjectsGeneratedFromResource(PackageBuilder.java:3898)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:114)
For the line : "kieContainer.updateToVersion(rid);"
But if I'm firing the rules once (kieSession.fireAllRules();) before adding
the new rule, I don't get the exception O_o
Someone has any idea why ?
thanks!
--
View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-at-org-drools-comp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months