5.6.0.CR1 gives a NullPointerException in after evaluator
by abr
Hi everyone,
I tried to switch from 5.5.0.Final to 5.6.0.CR1 and got a null pointer
exception in the evaluation of the after evaluator.
(Exact method is:
/org.drools.base.evaluators.AfterEvaluatorDefinition.AfterEvaluator.evaluate(InternalWorkingMemory,
InternalReadAccessor, InternalFactHandle, InternalReadAccessor,
InternalFactHandle)/ )
When debugging, the exception occurs at the very first line of the method,
in:
/ if ( extractor1.isNullValue( workingMemory, handle1.getObject() ) ||
extractor2.isNullValue( workingMemory, handle2.getObject() ) ) {
return false;
}
/
The cause of the exception is that handle1 is null.
The rule where the exception occurs looks like:
/ MyFact(
fromdate before[ 0d ] $min,
( todate == null || todate after[ 0d ] $max ) )
/
When the exception occurs, /MyFact.fromdate/ is not null, /$min/ is not
null, /MyFact.todate/ is null, /$max/ is not null.
In AfterEvaluator.evaluate : /extractor1/ refers to /MyFact.todate/,
/extractor2/ refers to /$max/, /handle1/ is null, /handle2/ refers to the
fact including the attribute to which /$max/ variable is bound to.
Of course, this worked fine in 5.5.0.Final.
I couldn't test this out in Drools 6.0.0.CR5 because I have dependencies to
drools-spring JAR that does not exist anymore in 6.0.0.CR5.
Is it simple to fix this problem?
Thanks in advance.
Best,
Alexis
--
View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Guvnor enumerations
by Stephen Masters
Hi folks,
I don't suppose anything notable changed between 5.3 and 5.5 in the way Guvnor loads data enumerations?
I have a number of enumerations similar to the following:
'MyFact.currencies' : (new com.myapp.guvnor.enums.CurrencyEnum()).isoCodes()
But I see the exception in Guvnor:
Unable to load enumeration data.
[Error: unable to invoke method: isoCodes] [Near :{... 'MyFact.': ….}] ^ [Line: 1, Column: 1]
Error type: org.mvel2.PropertyAccessException
The jar is in the lib directory, there is a method called "isoCodes()", and when I run the main class inside it then the various enumerations are returned. And yes, it did (does) work absolutely fine in 5.3 with this same configuration.
Steve
12 years, 2 months
Planner with a list of planning variables
by Justin Case
Hello all,
can I use as planning variable a list of values?
Here's a test use case: planning a food recipe, where the recipe can have say maximally 5 ingredients (taken from the solution property, I guess). So far I could find in the examples and documentation, it's all about ONE planning variable in the solution, but here I'd need a LIST of such... is it actually doable this way?
I cannot do it the other way around, as an ingredient may be found in more recipes...
Many thanks,
JC
12 years, 2 months
[Optaplanner] Scheduling + VRP
by Mats Norén
Hi,
I'm looking for an example that does both scheduling and vrp.
I have workers with certain skills and I have goods (which require a particular skill set) to be delivered or picked up within certain time windows.
Each worker work in a team.
The team should if possible be assigned to the same delivery/pickup.
The workers work in shifts and by law has to have breaks etc.
I want to create a schedule that assigns workers/teams to deliveries/pickups and stay within the time windows as well as optimizing the distance travelled.
I thought about the nurse rostering example together with cvrptw but the nurse rostering uses shifts (day, night).
Do I have to do it in two steps? First VRP and then try to assign the workers?
The only hard facts are the workers worktime and the goods delivery/pickup time.
Any suggestions?
Best regards,
Mats
12 years, 3 months
Is there open source project that uses Drools (or maybe other business rules engine)
by jonatanl
Hi!
I am trying to develop some tools that could be used for the validation of
business rules and their integration into the automatic reasoning systems.
And I am searching for one or several open source projects that extensively
uses Drools and business rules. Generally I would be happy to hear about any
open source project that uses any kind of business rules engine, but it
would be better to work with Drools specifically.
ERP (management and tax accounting especially), law or (intelligent)
robotics are preferred domains. I am not especially strong with the
healthcare domains that can be especially popular now. I guess that I should
search for open source expert systems in these domains?...
Thanks in advance for any suggestions!
Jonatan
--
View this message in context: http://drools.46999.n3.nabble.com/Is-there-open-source-project-that-uses-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Drools - sizing & performance
by danilo
Dear All,
I'm evaluating Drools Fusion as CEP engine for my application based on JBPM
workflows.
I have some points not clear yet:
- In a clustered environments I think the event/fact working memory will be
different across the machines so I need to find a way for sync or will it be
managed by Fusion itself?
- performance: do you have any experience or result about performance of
fusion? I suppose this is strictly depending by many factors like (#events,
event size, event validity time);
Please help me on find the right way.
Thx
Danilo
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-sizing-performance-tp4026902.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
[Optaplanner] Help on drl
by Tales Costa
Hi,
I am new to Drools and Optaplanner and have built a first model and
succeeded running with java score calculation. Now am struggling trying to
use rules for score.
Have read "Drools Expert User Guide" and looked through Optaplanner
examples but am still confused. Main difficult is discovering what can do
and can´t do with java dialect within the "when" and "then" blocks. Are
there tutorial and/or other references I could look into for more
information on this ?
regards
Tales
12 years, 3 months
Drools Integration with Apache Camel and Spring ...
by profversaggi
Can anyone point me to 'proper' tutorial or example of Drools web Integration
with Apache Camel and Spring that shows the soup to nuts "big picture". I'm
getting solid bits and pieces of information well enough through the
standard process - the Docs, the Camel Book, web links, etc ... I just need
the larger overall 'context' with which to places all of the pieces
together, and I'm having difficulty with that ....
Many thanks in advance ... :-)
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Integration-with-Apache-Camel-an...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months