drools-integration (Drools Spring) compilation errors: master branch
by Michael Anstis
Hi,
drools-integration has compilation errors following commit for "JBRULES-3205:
Add 'name' and 'description' attributes to <Resource> element in
change-sets".
Esteban, as the person making the change for JBRULES-3205 can you please
look into resolving the compilation errors in drools-integration (Drools
Spring)?
Thanks,
Mike
13 years, 3 months
Re: [rules-dev] [rules-users] Question about custom accumulation functions
by Wolfgang Laun
Similar but not identical to
JBRULES-3126<https://issues.jboss.org/browse/JBRULES-3126>,
fixed only lately. accumulate nodes are sensitive to the removal of nodes
preceding them in the network.
-W
2011/9/8 Edson Tirelli <ed.tirelli(a)gmail.com>
>
> It looks like a bug, as it should not raise a NPE no matter what....
> which version of Drools are you using?
>
> Edson
>
> 2011/9/8 Bruno Freudensprung <bruno.freudensprung(a)temis.com>
>
>> **
>>
>> Hi Edson, hi all,
>>
>> To stick to the subject, I have a strange problem (stack trace in PS) with
>> a rule containing two accumulate calls, the result of the first one is
>> re-injected as the input of the second one. Those accumulate functions are
>> "home made".
>> The first one (tokenize) returns an ArrayList of Token objects built by
>> tokenizing the "text" of the Sentence objects.
>> The second one (build10windows) returns an ArrayList of Window objects,
>> each one them containing 10 consecutive tokens.
>> Here is the rule
>>
>> when
>> $budget : ManualAnnotation(text == "something")
>> *$tokens* : java.util.ArrayList() *from accumulate *($s :
>> Sentence(), *tokenize*($s))
>> $windows : java.util.ArrayList() *from accumulate *($t : Token()
>> *from $tokens*, *build10windows*($t))
>> # removed a part here but the problem occurs even without this
>> part
>> then
>> retract($budget);
>>
>> Is there anything else one should be aware of when implementing their own
>> accumulate function? I mean things related to the fact that "classical"
>> accumulate functions (sum, average) return an immutable object that does not
>> share anything with the context object.
>> Although accumulate, reverse, and getResult methods of my functions are
>> unit tested, I suspect something that could be related to stateless/stateful
>> considerations.
>> What do you think?
>>
>> Many thanks,
>>
>> Bruno.
>>
>> PS :
>>
>> The stack trace is:
>> at
>> org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
>> at
>> org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:927)
>> at
>> org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
>> at
>> org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
>> at
>> org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
>> at
>> org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
>> at
>> org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)
>> at
>> org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:99)
>> at
>> org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:33)
>> at
>> org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:159)
>> at
>> org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:81)
>> at
>> org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:262)
>> ... 5 more
>> Caused by: java.lang.NullPointerException
>> at
>> org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:967)
>> at org.drools.reteoo.AccumulateNode.splitList(AccumulateNode.java:920)
>> at
>> org.drools.reteoo.AccumulateNode.removePreviousMatchesForLeftTuple(AccumulateNode.java:874)
>> at
>> org.drools.reteoo.AccumulateNode.retractLeftTuple(AccumulateNode.java:205)
>> at
>> org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:238)
>> at
>> org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractLeftTupleDestroyRightTuple(CompositeLeftTupleSinkAdapter.java:138)
>> at
>> org.drools.reteoo.AccumulateNode.retractLeftTuple(AccumulateNode.java:212)
>> at
>> org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:240)
>> at
>> org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java:231)
>> at
>> org.drools.common.AbstractWorkingMemory.retract(AbstractWorkingMemory.java:1288)
>> at
>> org.drools.base.DefaultKnowledgeHelper.retract(DefaultKnowledgeHelper.java:201)
>> at
>> org.drools.base.DefaultKnowledgeHelper.retract(DefaultKnowledgeHelper.java:214)
>> at
>> defaultpkg.Rule_Display_windows_0.defaultConsequence(Rule_Display_windows_0.java:21)
>> at
>> defaultpkg.Rule_Display_windows_0DefaultConsequenceInvoker.evaluate(Rule_Display_windows_0DefaultConsequenceInvoker.java:29)
>> at
>> org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
>> ... 15 more
>>
>>
>>
>> Bruno.
>>
>> Le 24/08/2011 16:21, Edson Tirelli a écrit :
>>
>>
>> Yes, evaluation is incremental, so for every new fact, it will call
>> accumulate() and getResult().
>>
>> We do want to reduce the calls to getResult(), improving performance,
>> but it is not easy to figure out a way, as from an engine perspective, it
>> never knows when the application is done inserting facts and it is time to
>> calculate the final result.
>>
>> Edson
>>
>> 2011/8/24 Bruno Freudensprung <bruno.freudensprung(a)temis.com>
>>
>>> Hi,
>>>
>>> While testing my custom accumulation function I noticed an unexpected
>>> behavior (th'ats of course a personal point of view).
>>> It seems that Drools 5.1 calls accumulate(...) and getResult(...) as
>>> many times as the number of accumulated facts (accumulate, getResult,
>>> accumulate, getResult, etc...).
>>> Is it supposed to work like this?
>>>
>>> Best regards,
>>>
>>> Bruno.
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>>
>> --
>> Edson Tirelli
>> JBoss Drools Core Development
>> JBoss by Red Hat @ www.jboss.com
>>
>>
>> _______________________________________________
>> rules-users mailing listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
>
> --
> Edson Tirelli
> JBoss Drools Core Development
> JBoss by Red Hat @ www.jboss.com
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
13 years, 3 months
Building a (semantic) application
by Sebastian Samaruga
Question,
Are there any examples / tutorials to build, for example, some application
using
a Semantic backend. Are there specific frameworks or patterns. Maybe I'm
ignorant
on how to achieve this because of my background with MVC applications with
an
ORM and traditional 'out of the box' frameworks.
Think it should be relevant the fact of using a semantic backend instead a
relational one in the way one develop the application. For example, I think,
there should be some kind of "Semantic MVC".
I see lots and lots of features for semantic backends and interoperability.
And
some usage scenarios, but few implementation "roadmaps" to take advantage
of all that features.
Maybe I should think about one scenario where, my application semantics,
my business domain for that application semantics, and that application
data are making worth use of all those semantics.
I'm posting my question on a couple of list, including one about rules, just
because I think patterns developed out of rules community could help me
clarify my view, and maybe have similar goals in respect to those of RDF.
Shall someone share with me this existential questions, please let me know
This file is all I could get more or less clear regarding this subject by
now:
http://cognescent.googlecode.com/files/architecturalDraft.pdf
Regards,
Sebastián.
http://www.cognescent.com
13 years, 3 months
Rules Fest Last Minute Medical Meetup Speakers Wanted
by Mark Proctor
Rules Fest is very close (24-28th of October, San Francisco) and this
year RHT are sponsoring the bootcamps to a high level to ensure that
they are made freely available to all.
http://rulesfest.org/html/home.html
Thu the 27th will follow the normal intro format as previous years,
along with time to ask questions of core developers.
At the last minute budget was found for an additional day on Friday the
28th. Due to the success of the healthcare meet up in San Diego 2010
<http;//community.jboss.org/wiki/DroolsBootCampSanDiegoApril2010>, we
would like to try and dedicate this day to healthcare.
We would like this day to be 100% community presented, by real
practitioners. If you are doing anything interested in the area of
healthcare related to rules, workflow, events, ontologies, distributed
intelligent agents and would like to talk, please contact me asap:
mproctor at codehaus d0t org.
The talks do not need to be Drools specific, but it should be relevant
to any one looking to do Open Source based technology implementations of
the previously mentioned areas. Applied, theoritcal and technical talks
are all welcome.
Again sorry for the last minute notice, but hopefully we can still make
this into a great community oriented day.
Mark
Drools Project Lead and Co-creator
13 years, 3 months
JIRAs JBRULES-3195, 3196, 3197, 3198
by Wolfgang Laun
Without much hope of getting fixes (althoufh an infinite loop *is* rather
nasty) I have created 4 more JIRAs, most if not all of which are related to
MVEL. However, I feel compelled to document the oddities exhibited by MVEL,
especially where it does not accept or handle code that works well or is
decently diagnosed when using Java.
https://issues.jboss.org/browse/JBRULES-3198 is particularly remarkable as
it seems to indicate that MVEL deviates from Java even at the lexical level,
processing something like X/*Y*/ as a (class) name.
Cheers
Wolfgang
13 years, 3 months