@Mark <br><br>Hope married life is treating you well (yep, it&#39;s been that long!)<br><br>The code that I&#39;m using to Package up the Drools Rules is at the link below. Pretty much just serializing the KnowledgeBase to a file, that is later 
read in via a URL when it is deployed on App Engine ; Encountered plenty 
of java.io.File restrictions, but no problems at all around the bytecode (at the moment the code is generated within Eclipse, using the GAE plugin, which modifies Java not Rule
 code after the normal compile) .<br><br><a href="http://code.google.com/p/red-piranha/source/browse/trunk/src/net/firstpartners/drools/PreCompileRuleBuilder.java">http://code.google.com/p/red-piranha/source/browse/trunk/src/net/firstpartners/drools/PreCompileRuleBuilder.java</a><br>
<br>Will try to package create a patch using GIT - give me a couple of days to figure that out!<br><br>@salaboy<br>It&#39;s a very basic feature set at the moment; Just rule load, insert facts, globals and get output. <br>
<br>The online  sample loads a spreadsheet, rules fire that update the spreadsheet, marks the changed cells in Orange.  I have the simple sample deployed as of today (17th Jan &#39;11) - might take down or modify later).<br>
<br>Original Spreadsheet; <a href="http://red-piranha.appspot.com/spreadsheet/chocolate-data.xls">http://red-piranha.appspot.com/spreadsheet/chocolate-data.xls</a><br>Rules file; <a href="http://red-piranha.appspot.com/spreadsheet/log-then-modify-rules.drl">http://red-piranha.appspot.com/spreadsheet/log-then-modify-rules.drl</a><br>
Run the sample online; <a href="http://red-piranha.appspot.com/">http://red-piranha.appspot.com/</a> - check out the &#39;log&#39; tab in the spreadsheet to see what rules have fired.<br><br>Red-Piranha project aim is to make the power of Drools available to Excel users *without* Java code. Number 1 complaint about my book was the &#39;techie setup bit&#39; in Chapter 2 (remember the audience was Excel power users); Deploying online allows people to try without the setup.<br>
<br>So, most of the features I want to add will be case-by-case as needed by the samples. It would be *cool* to compile the rules online; When I tried this 12 months ago there were problems with the Apache Mvel library so I may be brave enough to try again later, but current priority is to get the Core / Runtime  changes submitted as a JIRA patch.<br>
<br>Paul<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 17 Jan 2011 19:25:54 +0000<br>
From: Paul Browne &lt;<a href="mailto:paulb@firstpartners.net">paulb@firstpartners.net</a>&gt;<br>
Subject: [rules-dev] Drools running in Google App Engine - list of<br>
        changes made to code<br>
To: <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
Message-ID:<br>
        &lt;<a href="mailto:AANLkTimAwC3nb2P0LRx40LBpUg3Jx%2B7dEuuyYQ7tbOTZ@mail.gmail.com">AANLkTimAwC3nb2P0LRx40LBpUg3Jx+7dEuuyYQ7tbOTZ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Folks,<br>
<br>
A little bit later than expected (!) I&#39;ve managed to get Drools running<br>
within Google App Engine.<br>
<br>
A list of the changes that I made to the Drools Core and Drools Util code<br>
are below. A lot of these changes are NullPointer checks when reading<br>
properties from a file (i.e. things that you might want in the codebase<br>
anyway).<br>
<br>
Notes on the sample I used to try this out are at<br>
<a href="http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine" target="_blank">http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine</a><br>
The sample (for the moment) is running a pre-built KnowledgeBase within GAE<br>
(i.e. no rule compilation, nor any of the advanced features).<br>
<br>
What is the best way of submitting the actual code changes for review and<br>
possible inclusion as part of the Drools source code?<br>
<br>
Thanks<br>
<br>
Paul<br>
<br>
* Drools Core *<br>
<br>
 AbstractRuleBase.java // line 265 surrounded by try / catch<br>
      this.config = (RuleBaseConfiguration) droolsStream.readObject();<br>
<br>
 RuleBaseConfiguration.java // - line 985 surround by try / catch<br>
         this.classLoader = ClassLoaderUtil.getClassLoader<br>
<br>
 RuleBaseConfiguration.java // line 395  surround by try / catch<br>
     this.chainedProperties = new ChainedProperties( &quot;rulebase.conf&quot;,<br>
<br>
 RuleBaseConfiguration.java // line 457 surround by try / catch,<br>
default Conflict Resolver<br>
          setConflictResolver( determineConflictResolver(<br>
this.chainedProperties.getProperty( &quot;drools.conflictResolver&quot;,<br>
<br>
* Drools Util *<br>
<br>
 ChainedProperties.java // line 98 - exception check around<br>
ClassLoader.getSystemClassLoader();<br>
<br>
 ChainedProperties.java // line 125 - exception check around<br>
ClassLoader.getSystemClassLoader();<br>
<br>
 ChainedProperties.java // line 160<br>
        - null check for properties /key and return default<br>
<br>
 ChainedProperties.java // line 240 - surround by try / catch for<br>
securityaccessexception<br>
    if ( file != null &amp;&amp; file.exists() ) {<br>
<br>
 ChainedProperties.java // line 270 - surround by try / catch for<br>
securityaccessexception<br>
    if ( file != null &amp;&amp; file.exists() ) {<br>
<br>
 ClassFieldInspector.java // line 166 -<br>
         return &quot;/&quot; + clazz.getCanonicalName() + &quot;.class&quot;;<br>
<br>
 ClassLoaderUtil.java // line 25 - surround by try / catch for<br>
securityaccessexception<br>
     ClassLoader systemClassLoader =<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/42248168/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/42248168/attachment-0001.html</a><br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 17 Jan 2011 19:32:15 +0000<br>
From: Mark Proctor &lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;<br>
Subject: Re: [rules-dev] Drools running in Google App Engine - list of<br>
        changes made to code<br>
To: <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
Message-ID: &lt;<a href="mailto:4D34993F.7070102@codehaus.org">4D34993F.7070102@codehaus.org</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
On 17/01/2011 19:25, Paul Browne wrote:<br>
&gt; Folks,<br>
&gt;<br>
&gt; A little bit later than expected (!) I&#39;ve managed to get Drools<br>
&gt; running within Google App Engine.<br>
I thought App Engine wouldn&#39;t work with runtime generated bytecode and<br>
had classloader restrictions?<br>
<br>
Mark<br>
&gt;<br>
&gt; A list of the changes that I made to the Drools Core and Drools Util<br>
&gt; code are below. A lot of these changes are NullPointer checks when<br>
&gt; reading properties from a file (i.e. things that you might want in the<br>
&gt; codebase anyway).<br>
&gt;<br>
&gt; Notes on the sample I used to try this out are at<br>
&gt; <a href="http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine" target="_blank">http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine</a><br>
&gt; The sample (for the moment) is running a pre-built KnowledgeBase<br>
&gt; within GAE (i.e. no rule compilation, nor any of the advanced features).<br>
&gt;<br>
&gt; What is the best way of submitting the actual code changes for review<br>
&gt; and possible inclusion as part of the Drools source code?<br>
A patch against trunk attached to a jira should suffice, don&#39;t forget<br>
we&#39;ve moved to GIT.<br>
<br>
Mark<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Paul<br>
&gt;<br>
&gt; *Drools Core *<br>
&gt;<br>
&gt;   AbstractRuleBase.java// line 265 surrounded by try / catch<br>
&gt;<br>
&gt;        this.config=  (RuleBaseConfiguration)  droolsStream.readObject();<br>
&gt;   RuleBaseConfiguration.java// - line 985 surround by try / catch<br>
&gt;<br>
&gt;           this.classLoader=  ClassLoaderUtil.getClassLoader<br>
&gt;   RuleBaseConfiguration.java// line 395  surround by try / catch<br>
&gt;<br>
&gt;       this.chainedProperties=  new  ChainedProperties(  &quot;rulebase.conf&quot;,<br>
&gt;   RuleBaseConfiguration.java// line 457 surround by try / catch, default Conflict Resolver<br>
&gt;<br>
&gt;            setConflictResolver(  determineConflictResolver(  this.chainedProperties.getProperty(  &quot;drools.conflictResolver&quot;,<br>
&gt;<br>
&gt; *Drools Util *<br>
&gt;<br>
&gt;   ChainedProperties.java// line 98 - exception check around ClassLoader.getSystemClassLoader();<br>
&gt;   ChainedProperties.java// line 125 - exception check around ClassLoader.getSystemClassLoader();<br>
&gt;   ChainedProperties.java// line 160<br>
&gt;          -  null  checkfor  properties/keyand  return  default<br>
&gt;   ChainedProperties.java// line 240 - surround by try / catch for securityaccessexception<br>
&gt;<br>
&gt;      if  (  file!=  null  &amp;&amp;  file.exists()  )  {<br>
&gt;   ChainedProperties.java// line 270 - surround by try / catch for securityaccessexception<br>
&gt;<br>
&gt;      if  (  file!=  null  &amp;&amp;  file.exists()  )  {<br>
&gt;   ClassFieldInspector.java// line 166 -<br>
&gt;           return  &quot;/&quot;  +  clazz.getCanonicalName()  +  &quot;.class&quot;;<br>
&gt;   ClassLoaderUtil.java// line 25 - surround by try / catch for securityaccessexception<br>
&gt;<br>
&gt;       ClassLoader  systemClassLoader=<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/fca45461/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/fca45461/attachment-0001.html</a><br>

<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 17 Jan 2011 17:33:57 -0300<br>
From: Mauricio Salatino &lt;<a href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;<br>
Subject: Re: [rules-dev] Drools running in Google App Engine - list of<br>
        changes made to code<br>
To: Rules Dev List &lt;<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;AANLkTi=<a href="mailto:e3wPiKAtGrDbe%2Bp10KqxT-M-8DiKU4XYnLJ0e@mail.gmail.com">e3wPiKAtGrDbe+p10KqxT-M-8DiKU4XYnLJ0e@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
That sounds really nice!<br>
Can you mention the features that you get working? which are left out?<br>
<br>
<br>
On Mon, Jan 17, 2011 at 4:32 PM, Mark Proctor &lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt; wrote:<br>
<br>
&gt;  On 17/01/2011 19:25, Paul Browne wrote:<br>
&gt;<br>
&gt; Folks,<br>
&gt;<br>
&gt; A little bit later than expected (!) I&#39;ve managed to get Drools running<br>
&gt; within Google App Engine.<br>
&gt;<br>
&gt; I thought App Engine wouldn&#39;t work with runtime generated bytecode and had<br>
&gt; classloader restrictions?<br>
&gt;<br>
&gt; Mark<br>
&gt;<br>
&gt;<br>
&gt; A list of the changes that I made to the Drools Core and Drools Util code<br>
&gt; are below. A lot of these changes are NullPointer checks when reading<br>
&gt; properties from a file (i.e. things that you might want in the codebase<br>
&gt; anyway).<br>
&gt;<br>
&gt; Notes on the sample I used to try this out are at<br>
&gt; <a href="http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine" target="_blank">http://code.google.com/p/red-piranha/wiki/ModifyDroolsRunInGoogleAppEngine</a><br>
&gt; The sample (for the moment) is running a pre-built KnowledgeBase within GAE<br>
&gt; (i.e. no rule compilation, nor any of the advanced features).<br>
&gt;<br>
&gt; What is the best way of submitting the actual code changes for review and<br>
&gt; possible inclusion as part of the Drools source code?<br>
&gt;<br>
&gt; A patch against trunk attached to a jira should suffice, don&#39;t forget we&#39;ve<br>
&gt; moved to GIT.<br>
&gt;<br>
&gt; Mark<br>
&gt;<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Paul<br>
&gt;<br>
&gt; * Drools Core *<br>
&gt;<br>
&gt;  AbstractRuleBase.java // line 265 surrounded by try / catch<br>
&gt;<br>
&gt;       this.config = (RuleBaseConfiguration) droolsStream.readObject();<br>
&gt;<br>
&gt;  RuleBaseConfiguration.java // - line 985 surround by try / catch<br>
&gt;<br>
&gt;          this.classLoader = ClassLoaderUtil.getClassLoader<br>
&gt;<br>
&gt;  RuleBaseConfiguration.java // line 395  surround by try / catch<br>
&gt;<br>
&gt;      this.chainedProperties = new ChainedProperties( &quot;rulebase.conf&quot;,<br>
&gt;<br>
&gt;  RuleBaseConfiguration.java // line 457 surround by try / catch, default Conflict Resolver<br>
&gt;<br>
&gt;           setConflictResolver( determineConflictResolver( this.chainedProperties.getProperty( &quot;drools.conflictResolver&quot;,<br>
&gt;<br>
&gt;  * Drools Util *<br>
&gt;<br>
&gt;  ChainedProperties.java // line 98 - exception check around ClassLoader.getSystemClassLoader();<br>
&gt;<br>
&gt;  ChainedProperties.java // line 125 - exception check around ClassLoader.getSystemClassLoader();<br>
&gt;<br>
&gt;  ChainedProperties.java // line 160<br>
&gt;         - null check for properties /key and return default<br>
&gt;<br>
&gt;  ChainedProperties.java // line 240 - surround by try / catch for securityaccessexception<br>
&gt;<br>
&gt;     if ( file != null &amp;&amp; file.exists() ) {<br>
&gt;<br>
&gt;  ChainedProperties.java // line 270 - surround by try / catch for securityaccessexception<br>
&gt;<br>
&gt;     if ( file != null &amp;&amp; file.exists() ) {<br>
&gt;<br>
&gt;  ClassFieldInspector.java // line 166 -<br>
&gt;          return &quot;/&quot; + clazz.getCanonicalName() + &quot;.class&quot;;<br>
&gt;<br>
&gt;  ClassLoaderUtil.java // line 25 - surround by try / catch for securityaccessexception<br>
&gt;<br>
&gt;      ClassLoader systemClassLoader =<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing listrules-dev@lists.jboss.orghttps://<a href="http://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; <a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
--<br>
 - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a><br>
 - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>
 - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>
<br>
 - Salatino &quot;Salaboy&quot; Mauricio -<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/5b76097b/attachment.html" target="_blank">http://lists.jboss.org/pipermail/rules-dev/attachments/20110117/5b76097b/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br>
<br>
End of rules-dev Digest, Vol 49, Issue 11<br>
*****************************************<br>
</blockquote></div><br>