Exception on at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300) drools 5.0.1
by Joana Lopes
Hi There,
I'm new to drools and i'm having a problem with a rule which has an OR:
/* Rule 25_OFF
--------------------------------------------------------------------------------
*/
rule "25_OFF"
when
$p1:InferenceFactValue( param!=null, param.parameterName == "sonar_8_cm",
$v1:param.valueFloat >= 10 ) or
$p2:InferenceFactValue( param!=null, param.parameterName == "sonar_8_cm",
$v2:param.valueFloat >= 10 )
then
InferenceUtils.log( LogLevel.DEBUG, InferenceUtils.DROOLS_RULE, "Global
Clock: " + InferenceDateUtils.dateString( globalClock, false ), true, false
);
InferenceUtils.log( LogLevel.DEBUG, InferenceUtils.DROOLS_RULE,
"\t\tRegra 25_OFF " + "25", true, false );
InferenceFactValue[] params = {$p1, $p2};
RuleFire.addEndAlarm( inferenceAgent, droolsEngine, "AlarmPackage",
"25", "25", params, globalClock );
end
No errors in knowledge builder
What happens is:
org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183)
at
pt.holos.dva.agents.inference.process.DroolsInferenceEngine.fireAllRules(DroolsInferenceEngine.java:644)
at
pt.holos.dva.agents.inference.process.DroolsInferenceEngine.receiveDataFromBuffer(DroolsInferenceEngine.java:342)
at
pt.holos.dva.agents.inference.process.BufferedDataReceiver.sendDataToDrools(BufferedDataReceiver.java:454)
at
pt.holos.dva.agents.inference.process.BufferedDataReceiver.run(BufferedDataReceiver.java:68)
Caused by: java.lang.NullPointerException
at org.drools.reteoo.LeftTuple.get(LeftTuple.java:300)
at
AlarmPackage.Rule_25_OFF_0ConsequenceInvoker.evaluate(Rule_25_OFF_0ConsequenceInvoker.java:15)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934)
... 9 more
I've tried to see the source code and the declaration
in org.drools.reteoo.LeftTuple.get(LeftTuple.java:300) is null. Can you
give me some pointers please?
Thank you,
Joana P Lopes
--
LinkedIn - http://pt.linkedin.com/in/joanpl
My Bla Bla Bla: http://joanpl.blogspot.com
.......................................................
The intuitive mind is a sacred gift and the rational mind is a faithful
servant. We have created a society that honors the servant and has
forgotten the gift. Albert Einstein.
"Doubt is not a pleasant condition, but certainty is absurd."
Voltaire
12 years, 6 months
Building Guvnor from source
by anchi
Hi!
I'm trying to build Guvnor from source. I have followed instructions listed
here:
https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/blob/master/READ...
I am able to start the application. After clicking on URL in Development
Mode tab, Guvnor app starts to load but after a few seconds becomes
unresponsive and I get an OutOfMemoryException:
[org.drools.guvnor.Guvnor] Out of memory; to increase the amount of memory,
use the -Xmx flag at startup (java -Xmx128M ...)
I have increased VM memory, however, no matter how much memory I give, it
always throws this exception.
I get this output in the console:
WARN 17-05 16:14:26,525
(RulesRepositoryManager.java:createRulesRepository:65) Creating
RulesRepository with default username.
INFO 17-05 16:14:26,530 (RulesRepositoryConfigurator.java:getInstance:46)
Creating an instance of the RulesRepositoryConfigurator.
WARN 17-05 16:14:30,598
(RulesRepositoryManager.java:createRulesRepository:65) Creating
RulesRepository with default username.
WARN 17-05 16:14:31,764
(RulesRepositoryManager.java:createRulesRepository:65) Creating
RulesRepository with default username.
Any suggestions?
--
View this message in context: http://drools.46999.n3.nabble.com/Building-Guvnor-from-source-tp3999132.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Displaying BPM node names across lines (easy)
by drdaveg
I can't seem to find this on the site and know I have done it - how do you
wrap a node name in a ruleflow or BPMN graph so it displays on multiple
lines?
I would like "This is a really long process name that I would like to be be
wrapped on multiple lines"
to appear as
This is a really long
process name that
I would like to be be
wrapped on multiple lines
via adding in special characters to the process name. Thanks!
--
View this message in context: http://drools.46999.n3.nabble.com/Displaying-BPM-node-names-across-lines-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Guvnor REST API and XLS decision tables
by anchi
Hi!
I'm wondering how does Guvnor REST api handle Excel decision tables? I'm
using 5.3.1.Final version.
It seems that when I use url for binary e.g.
/http://{guvnor_url}/rest/packages/package_name/assets/excel_table_name/binary/
, I get a source (.xls) file.
And when I use source url e.g.
/http://{guvnor_url}/rest/packages/package_name/assets/excel_table_name/source/
, I get a binary file.
Is this some bug or is it really expected to work this way?
Also, when I try to build binary file (which I get using source url:) )
using knowledge builder I'm getting exceptions, I have tried it in two ways:
1. kbuilder.add(urlResource, ResourceType.DTABLE);
Exception in thread "main"
org.drools.template.parser.DecisionTableParseException: An error occurred
opening the workbook. It is possible that the encoding of the document did
not match the encoding of the reader.
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:90)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:89)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:68)
at
org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:38)
at
org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:21)
at
org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:18)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:613)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37)
at Main.main(Main.java:101)
Caused by: jxl.read.biff.BiffException: Unable to recognize OLE stream
at jxl.read.biff.CompoundFile.<init>(CompoundFile.java:116)
at jxl.read.biff.File.<init>(File.java:127)
at jxl.Workbook.getWorkbook(Workbook.java:268)
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:75)
... 8 more
2. kbuilder.add(urlResource, ResourceType.DRL);
java.lang.IndexOutOfBoundsException: Index: 693, Size: 693
at java.util.ArrayList.get(ArrayList.java:352)
at org.antlr.runtime.CommonTokenStream.LT(CommonTokenStream.java:103)
at org.drools.lang.ParserHelper.reportError(ParserHelper.java:386)
at org.drools.lang.DRLParser.compilationUnit(DRLParser.java:182)
at org.drools.compiler.DrlParser.compile(DrlParser.java:225)
at org.drools.compiler.DrlParser.parse(DrlParser.java:136)
at org.drools.compiler.DrlParser.parse(DrlParser.java:141)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:394)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:586)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37)
at Main.main(Main.java:101)
Exception in thread "main" java.lang.RuntimeException:
org.drools.compiler.DroolsParserException: Unexpected exception raised while
parsing. This is a bug. Please contact the Development team :
Index: 693, Size: 693
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:692)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37)
at Main.main(Main.java:101)
Caused by: org.drools.compiler.DroolsParserException: Unexpected exception
raised while parsing. This is a bug. Please contact the Development team :
Index: 693, Size: 693
at org.drools.compiler.DrlParser.compile(DrlParser.java:242)
at org.drools.compiler.DrlParser.parse(DrlParser.java:136)
at org.drools.compiler.DrlParser.parse(DrlParser.java:141)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:394)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:586)
... 2 more
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-REST-API-and-XLS-decision-tables...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
[designer] problem with color theme selection
by Cristiano Gavião
I'm using Guvnor 4.3.Final with Designer 2.2.Final.
I have to say that Designer is getting amazing each version.
Congratulations and thanks the team for that !!!
But I didn't like the default color because I can't read well the black
text in a dark gray background color.
So when I try to test the color theme and select the jBPM theme button I
got this message: " invalid color theme data".
what this mean ?
How can I create my own color theme ?
regards,
Cristiano
12 years, 6 months
use of enum with "in" on LHS
by dsykes
Hi there,
I have a rule where I would like human-readable rule to have a comma
separated list of enum constants in it, however I can't find a way to get
this working.
DSLR file:
import com.test.Report;
import com.test.RulesResult;
import com.test.State;
rule "Test rule"
when
the received object
- state is NEW, MODIFY
then
#unimportant
end
DSL file:
[*][when]the received object=result : RulesResult();$stm : Report()
[*][when]- state is {stateList}=state in (State.{stateList})
Class Report has a property called state which is an enum of type State
which has a number of constants including NEW and MODIFY.
When I run this I get:
org.drools.RuntimeDroolsException: Exception executing predicate ( state ==
State.NEW || state == MODIFY)
As you can see only the first constant is being qualified with the enum
class. Can anyone help me with how to do this properly?
Thanks,
Derek
--
View this message in context: http://drools.46999.n3.nabble.com/use-of-enum-with-in-on-LHS-tp3997081.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
Necessary dependencies when using ruleflow
by Sean Su
I did some search here and found using jbpm-bpmn2 dependency will get rid
of the following error.
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<version>5.3.0.CR1</version>
</dependency>
Is this the correct soluation? If there is such an dependency, should not
the drools-core be taking care of this in the pom file? Now I tried to add
the dependency myself but ended up with some method not found exception,
which I believe is caused by the version mismatching (since I do not know
which version would match drools 5.3.0.final).
I would assume using ruleflow is common practice in this forum. does anyone
else have this issue when working with 5.3.0.Final?
Thanks
Sean
"java.lang.RuntimeException: Unable to instantiate a process builder"
....
Caused by: java.lang.ClassNotFoundException:
org.jbpm.process.builder.ProcessBuilderFactoryServiceImpl
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:207)
--
"But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
the Force are they." -Yoda
12 years, 6 months
Evaluation of the of rules with 'window:length' event windows
by senyatur
Hi guys
We are using Drools for event processing. So we have rules that, for
instance, put accumulation function over window of number of elements (not
time).
... from accumulate(Class1($a:a) over window:length(X) from entry-point
"Point"...
The problem we are experiencing that when evaluating the rule when there are
*less* elements than X (window length) the accumulation function is still
calculated which leads to wrong results.
Is there a way in Drools to restrict firing of this type of rules when there
are less than 'length' elements in the session?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Evaluation-of-the-of-rules-with-window-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months