<p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">Hi everyone!</span><span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif"> </span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">we have made other tow tests:</span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif"><br>
</span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">1 - As suggested by Vincent, we have just used
the source gets from Guvnor and all work fine.</span></p>

<p class="MsoNormal"><span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">In addition, it would seem that putting observations
and events in the same package all work fine!!!</span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">2 - 
We have tried to put the observation in the same packet of event in the
model and the new drl becomes:</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif"><br></span></p><p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">from </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">package</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> org.dfms.model; </span><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">to </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">package</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> org.dfms.model.situation;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">from</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000"> import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> org.dfms.model.observation.ACObservation; </span><span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">to </span><b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;;color:rgb(150,0,0)">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> </span><span style="font-family:&#39;Courier New&#39;;font-size:10pt">org.dfms.model.situation.ACObservation;</span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000"><br></span></b></p><p class="MsoNormal" style="margin-bottom:0.0001pt">
<b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">
org.dfms.model.situation.AccessControlEvent;</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">
org.dfms.model.situation.SituationManager;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">
org.dfms.model.situation.Event;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">
org.dfms.model.mapfeature.AccessControlPoint;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">
com.vividsolutions.jts.geom.Point;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">
com.vividsolutions.jts.geom.Geometry;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> java.util.HashSet;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">import</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> java.util.ArrayList;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">declare</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> ACObservation</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">      @role(event)</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">end</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">declare</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> AccessControlEvent</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">      @role(event)</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">end</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">rule</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green">&quot;AccessControl&quot;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">      </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">no-loop</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">      </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">when</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">            $obs  : ACObservation( $sensorid : sensorId,
$location : location ) over window:length(1) </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">from</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;"> entry-point access_control </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">      </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">then</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">            </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">insert</span></b><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">(
SituationManager.createAccessControlEvent( $obs, </span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green">&quot;Access Control Detection&quot;</span><span lang="EN-US" style="font-size:10pt;font-family:&#39;Courier New&#39;">, Event.THREAT_NO, $location, $sensorid ));</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#960000">end</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"></span></p>


<p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif"> </span></p>

<p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">then we have loaded the pkg from Guvnor (by
this link</span></p>

<p class="MsoNormal"><span class="MsoHyperlink"><span lang="EN-US" style="font-family:&quot;Arial Unicode MS&quot;,&quot;sans-serif&quot;"><a href="http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST">http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST</a>)</span></span></p>


<p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">into our application and all work fine!!!</span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif"><br>
</span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">Thank you and b</span><span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">est regards.</span></p><p class="MsoNormal">
<span lang="EN-US" style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">Carolina</span></p><br><div class="gmail_quote">2012/7/24 Vincent LEGENDRE <span dir="ltr">&lt;<a href="mailto:vincent.legendre@eurodecision.com" target="_blank">vincent.legendre@eurodecision.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div class="im"><p class="MsoNormal"><span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">&gt; Our application is using this url:</span><span><span style="font-family:&quot;Arial Unicode MS&quot;,&quot;sans-serif&quot;"> <span lang="EN-US"><a href="http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST" target="_blank">http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/org.dfms.model/LATEST</a></span></span></span></p>

<p class="MsoNormal"><span><span style="font-family:&quot;Arial Unicode MS&quot;,&quot;sans-serif&quot;"><span lang="EN-US">&gt;</span></span></span><span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif" lang="EN-US"> to loading from Guvnor5.3.0 the pkg. </span><span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif">Is it correct?</span></p>
<p class="MsoNormal"><br></p></div><p class="MsoNormal">Yes, to get the compiled package, compiled inside Guvnor, but this is the problem here. <br></p><p class="MsoNormal">The compiled package is a serialized kPackage object. When you get this from guvnor, and put it inside your kBase, the object is simply deserialized. The <span style="font-size:9pt;font-family:Consolas;border:1pt none windowtext;padding:0cm">ObjectTypeConf conf</span><span style="font-size:9pt;font-family:Consolas;border:1pt none windowtext;padding:0cm">.getTypeDeclaration()</span> will look in the kBase, and for guvnor compiled package this method returns null (don&#39;t know why). I think you may have a difference between your Guvnor version and the drools runtime version.</p>
<p class="MsoNormal"><br></p><p class="MsoNormal">You can either use the source got from guvnor (<span style="font-family:&#39;Arial Unicode MS&#39;,sans-serif"></span><a href="http://localhost:8080/guvnor/rest/packages/org.dfms.model/source" target="_blank">http://localhost:8080/guvnor/rest/packages/org.dfms.model/source</a>) to build your kBase, and this should work fine.</p>
<p class="MsoNormal"><br></p><p class="MsoNormal"><br></p><br></div></div><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></blockquote></div><br>