<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Good to hear that. Thanks Demian.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Question &#8211; I am new to drools/guvnor so never used the EventProcessingOption.STREAM processing mode.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">From the drools 5.5 api, &nbsp;I read the following , could you discuss the benefits of the STREAM processing mode from your experience?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">It says &#8230;. When STRAEM mode used the engine performs a few optimisations like:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&gt; reasoning over absence of events (NOT CE), automatically adds an appropriate duration attribute to the rule in order to avoid early rule firing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&gt; memory management techniques may be employed when an event no longer can match other events due to session clock continuous increment.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Genene<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Demian Calcaprina<br>
<b>Sent:</b> Tuesday, August 27, 2013 1:17 PM<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] Problem with PKG from guvnor<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Thanks Genene.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">In fact I was able to get the cause of my issue. I created a ticket with the explanation and a pull request with a possible solution.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://issues.jboss.org/browse/DROOLS-243">https://issues.jboss.org/browse/DROOLS-243</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Demian<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Tue, Aug 27, 2013 at 12:26 PM, Genene Geda &lt;<a href="mailto:ggeda@ghx.com" target="_blank">ggeda@ghx.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi-,<br>
I think I had similar issue and resolved by looking at one of these:<br>
<br>
1. How the changes set is loaded:<br>
<br>
Resource changeset = ResourceFactory.newFileResource(changeSetFilePath);<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //.newClassPathResource(changeSetPath);<br>
<br>
2.If the package not yet built, &nbsp;In GUVNOR, I go to 'knowledgebase'/ click on you package/click on the 'edit' tab on the right/ click build package &nbsp;( I also do create snapshot but may not be necessary ).<br>
<br>
See if it helps.<br>
<span style="color:#888888"><br>
<span class="hoenzb">G-</span></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
-----Original Message-----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of calcacuervo<br>
Sent: Monday, August 26, 2013 10:26 PM<br>
To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
Subject: [rules-users] Problem with PKG from guvnor<br>
<br>
Hi Guys,<br>
<br>
I am having a problem using Drools 5.5.<br>
<br>
Basically, I have a ksession in stream mode.<br>
<br>
I have a rule with an event, like this<br>
<br>
when<br>
&nbsp; &nbsp; &nbsp; &nbsp; myfact: EventA( main &gt; 21 ) over window:length (1)<br>
&nbsp; &nbsp; &nbsp; &nbsp; myfact2 : EventA( main &lt;= 21 , this before myfact ) over window:length (2)<br>
<br>
I also use a KnowledgeAgent and apply a changeset.<br>
<br>
If I declare this rule directly from the changeset, as a Classpath resource, with resource type DRL, it seems to work fine (the kbase compiles!).<br>
<br>
But If I have the rule in a guvnor package, and I put the PKG link in my changeset, I am getting an error:<br>
<br>
Caused by: java.lang.NullPointerException<br>
&nbsp; &nbsp; &nbsp; &nbsp; at<br>
org.drools.base.evaluators.BeforeEvaluatorDefinition$BeforeEvaluator.getInterval(BeforeEvaluatorDefinition.java:268)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
&nbsp; &nbsp; &nbsp; &nbsp; at<br>
org.drools.rule.constraint.EvaluatorConstraint.getInterval(EvaluatorConstraint.java:100)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
&nbsp; &nbsp; &nbsp; &nbsp; at<br>
org.drools.reteoo.builder.BuildUtils.gatherTemporalRelationships(BuildUtils.java:326)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
&nbsp; &nbsp; &nbsp; &nbsp; at<br>
org.drools.reteoo.builder.BuildUtils.calculateTemporalDistance(BuildUtils.java:292)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
&nbsp; &nbsp; &nbsp; &nbsp; at<br>
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:119)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:113)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
&nbsp; &nbsp; &nbsp; &nbsp; at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:445)<br>
[drools-core-5.5.0.Final.jar:5.5.0.Final]<br>
<br>
It seems that that getOperator() is null in this evaluation:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( this.getOperator().isNegated() ) {<br>
<br>
I debugged a bit, and it seems the evaluator comes in serialized from guvnor's package.But in case of getting directly the classpath resource, it compiles the package and it gets the real operator ok (Operator = 'before')<br>
<br>
Do you have any idea of why it could be happening? May I be doing something wrong? Is this a bug in guvnor?<br>
<br>
Thanks in advance!<br>
<br>
Demian<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Problem-with-PKG-from-guvnor-tp4025687.html" target="_blank">
http://drools.46999.n3.nabble.com/Problem-with-PKG-from-guvnor-tp4025687.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>