<p>Thank you!</p><p>How I can download a jar with model created in Guvnor? I have tried to build the package, also looked thru webdav interface - cannot find a jar for facts declared in drl.<br></p><p>Thanks!<br>-Oleg<br></p>
<br><div class="gmail_quote">On Tue, Jan 27, 2009 at 8:38 AM,  <span dir="ltr">&lt;<a href="mailto:rules-dev-request@lists.jboss.org" target="_blank">rules-dev-request@lists.jboss.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send rules-dev mailing list submissions to<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:rules-dev-request@lists.jboss.org" target="_blank">rules-dev-request@lists.jboss.org</a><br>
<br>
You can reach the person managing the list at<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:rules-dev-owner@lists.jboss.org" target="_blank">rules-dev-owner@lists.jboss.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of rules-dev digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
 &nbsp; 1. Re: [rules-users] Drools 5.0 M5 (ekkehard)<br>
 &nbsp; 2. Re: use of declared facts (Michal Bali)<br>
 &nbsp; 3. Re: use of declared facts (Edson Tirelli)<br>
 &nbsp; 4. Re: use of declared facts (Michal Bali)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 27 Jan 2009 08:03:01 +0100<br>
From: ekkehard &lt;<a href="mailto:ekkehard@gentz-software.de" target="_blank">ekkehard@gentz-software.de</a>&gt;<br>
Subject: [rules-dev] Re: [rules-users] Drools 5.0 M5<br>
To: Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br>
Cc: Rules Dev List &lt;<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:497EB1A5.1090905@gentz-software.de" target="_blank">497EB1A5.1090905@gentz-software.de</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Mark Proctor schrieb:<br>
&gt; <a href="http://blog.athico.com/2009/01/drools-50-m5-new-and-noteworthy-release.html" target="_blank">http://blog.athico.com/2009/01/drools-50-m5-new-and-noteworthy-release.html</a><br>
&gt;<br>
&gt; <a href="http://www.jboss.org/drools/downloads.html" target="_blank">http://www.jboss.org/drools/downloads.html</a><br>
&gt;<br>
&gt; The next release should be the candidate release, all modules now seem<br>
&gt; to be working, we are now just working on cleaning things up and<br>
&gt; improving and updating documentation.<br>
&gt;<br>
&gt; Mark<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
Hi Mark,<br>
<br>
Drools 5 seems to be a really great product. Maybe 18 months ago I<br>
evaluated rules engines and business process engines and made my<br>
decision to use jbpm together with Drools.<br>
<br>
Now - in 3 weeks or so its time to really integrate processes and rules<br>
into my application (ERP solution for small and medium-sized-companies)<br>
- my server is ready (OSGI - EJB3) and my UI (Eclipse Riena based). Core<br>
parts of the OSGI client-server app will be Open Source.<br>
<br>
Last months I always noticed the problem for business people to<br>
understand the differences between business processes and rules, because<br>
from the point-of-view of business use-cases they are integrated. why<br>
are there two tools / frameworks to manage the same thing ?<br>
<br>
For me the main reason to use both was persistence of long running<br>
processes and manual tasks in the past only available in business<br>
process engine.<br>
<br>
Now I read the documentation of Drools 5 and noticed that all is<br>
availabe in ONE product: Drools 5. Thats really great news - I hope I<br>
understood all well and I&#39;ll give it a try to do it with Drools only.<br>
This gives me a better feeling than my previous decision.<br>
<br>
Thanks for all your work.<br>
<br>
ekke<br>
<br>
--<br>
<br>
ekkehard gentz<br>
software-architect<br>
homepage: <a href="http://www.gentz-software.de" target="_blank">http://www.gentz-software.de</a><br>
opensource: <a href="http://ekkehard.org" target="_blank">http://ekkehard.org</a><br>
blog (en): <a href="http://ekkes-corner.org" target="_blank">http://ekkes-corner.org</a><br>
blog (de): <a href="http://ekkes-ecke.org" target="_blank">http://ekkes-ecke.org</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/64d6d492/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/64d6d492/attachment-0001.html</a><br>


<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 27 Jan 2009 09:34:55 +0000<br>
From: Michal Bali &lt;<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>&gt;<br>
Subject: Re: [rules-dev] use of declared facts<br>
To: Rules Dev List &lt;<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:58f4ed90901270134s29ee99f2p5357152eae05f260@mail.gmail.com" target="_blank">58f4ed90901270134s29ee99f2p5357152eae05f260@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Look at this unit test for some examples:<br>
<a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java</a><br>


<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// Retrieve the generated fact type<br>
 &nbsp; &nbsp; &nbsp; &nbsp;FactType cheeseFact = ruleBase.getFactType(<br>
&quot;org.drools.generatedbeans.Cheese&quot; );<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// Create a new Fact instance<br>
 &nbsp; &nbsp; &nbsp; &nbsp;Object cheese = cheeseFact.newInstance();<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// Set a field value using the more verbose method chain...<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// should we add short cuts?<br>
 &nbsp; &nbsp; &nbsp; &nbsp;// &nbsp; &nbsp; &nbsp; &nbsp;cheeseFact.getField( &quot;type&quot; ).getFieldAccessor().setValue(<br>
cheese,<br>
 &nbsp; &nbsp; &nbsp; &nbsp;//<br>
&quot;stilton&quot; );<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cheeseFact.set( cheese,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;type&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;stilton&quot; );<br>
 &nbsp; &nbsp; &nbsp; &nbsp;assertEquals( &quot;stilton&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cheeseFact.get( cheese,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;type&quot; ) );<br>
<br>
<br>
On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin &lt;<a href="mailto:zenzin@intalio.com" target="_blank">zenzin@intalio.com</a>&gt; wrote:<br>
<br>
&gt; There&#39;s now possibility to declare facts in the drl, like:<br>
&gt;<br>
&gt; declare Person<br>
&gt; &nbsp;name: String<br>
&gt; &nbsp;age: int<br>
&gt; end<br>
&gt;<br>
&gt; My question is how do I instantiate this fact object during runtime? Do I<br>
&gt; still need to have class Person compiled and existing somewhere in<br>
&gt; classpath, or there&#39;s a helper class which I can use &quot;fake the fact&quot;,<br>
&gt; something like:<br>
&gt;<br>
&gt; &nbsp; FakeFact person = FakeFact(&quot;Person&quot;);<br>
&gt; &nbsp; person.setField(&quot;name&quot;, &quot;Oleg&quot;);<br>
&gt; &nbsp; person.setField(&quot;age&quot;, &quot;42&quot;);<br>
&gt; &nbsp; session.insert(person);<br>
&gt;<br>
&gt; Or there&#39;s another nicer way?<br>
&gt;<br>
&gt; Thank you,<br>
&gt; -Oleg Zenzin<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">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>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/2b1899d6/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/2b1899d6/attachment-0001.html</a><br>


<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 27 Jan 2009 09:31:32 -0500<br>
From: Edson Tirelli &lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;<br>
Subject: Re: [rules-dev] use of declared facts<br>
To: Rules Dev List &lt;<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:e6dd5ba30901270631j5c6fda5bje89a90f1fa1e3ebd@mail.gmail.com" target="_blank">e6dd5ba30901270631j5c6fda5bje89a90f1fa1e3ebd@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
 &nbsp; Michal is correct from the point of view of the application. That is<br>
required because the actual classes are generated at compile time and not<br>
visible to the application classpath.<br>
<br>
 &nbsp; Although, that is not the only way. Inside your rules, they are visible<br>
and you instantiate them the same way as you instantiate any other java<br>
Pojo:<br>
<br>
rule xyz<br>
when<br>
 &nbsp; &nbsp; // sometihng<br>
then<br>
 &nbsp; &nbsp; Person p = new Person();<br>
 &nbsp; &nbsp; p.setName( &quot;Bob&quot; );<br>
 &nbsp; &nbsp; insert( p );<br>
end<br>
<br>
 &nbsp; &nbsp;Also, if you use Guvnor to define your model, Guvnor is capable of<br>
generating a jar file for you with the generated classes. This way you can<br>
download the jar and add it to the classpath of your application and use it<br>
as any POJOs too.<br>
<br>
 &nbsp; &nbsp;[]s<br>
 &nbsp; &nbsp;Edson<br>
<br>
<br>
2009/1/27 Michal Bali &lt;<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>&gt;<br>
<br>
&gt; Look at this unit test for some examples:<br>
&gt;<br>
&gt; <a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java</a><br>


&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; // Retrieve the generated fact type<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; FactType cheeseFact = ruleBase.getFactType(<br>
&gt; &quot;org.drools.generatedbeans.Cheese&quot; );<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; // Create a new Fact instance<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; Object cheese = cheeseFact.newInstance();<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; // Set a field value using the more verbose method chain...<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; // should we add short cuts?<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp; &nbsp; &nbsp; &nbsp;cheeseFact.getField( &quot;type&quot;<br>
&gt; ).getFieldAccessor().setValue( cheese,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; //<br>
&gt; &quot;stilton&quot; );<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; cheeseFact.set( cheese,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;type&quot;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;stilton&quot; );<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals( &quot;stilton&quot;,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cheeseFact.get( cheese,<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;type&quot; ) );<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin &lt;<a href="mailto:zenzin@intalio.com" target="_blank">zenzin@intalio.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; There&#39;s now possibility to declare facts in the drl, like:<br>
&gt;&gt;<br>
&gt;&gt; declare Person<br>
&gt;&gt; &nbsp;name: String<br>
&gt;&gt; &nbsp;age: int<br>
&gt;&gt; end<br>
&gt;&gt;<br>
&gt;&gt; My question is how do I instantiate this fact object during runtime? Do I<br>
&gt;&gt; still need to have class Person compiled and existing somewhere in<br>
&gt;&gt; classpath, or there&#39;s a helper class which I can use &quot;fake the fact&quot;,<br>
&gt;&gt; something like:<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; FakeFact person = FakeFact(&quot;Person&quot;);<br>
&gt;&gt; &nbsp; person.setField(&quot;name&quot;, &quot;Oleg&quot;);<br>
&gt;&gt; &nbsp; person.setField(&quot;age&quot;, &quot;42&quot;);<br>
&gt;&gt; &nbsp; session.insert(person);<br>
&gt;&gt;<br>
&gt;&gt; Or there&#39;s another nicer way?<br>
&gt;&gt;<br>
&gt;&gt; Thank you,<br>
&gt;&gt; -Oleg Zenzin<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-dev mailing list<br>
&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">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>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/1f702615/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/1f702615/attachment-0001.html</a><br>


<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 27 Jan 2009 15:38:47 +0000<br>
From: Michal Bali &lt;<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>&gt;<br>
Subject: Re: [rules-dev] use of declared facts<br>
To: Rules Dev List &lt;<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;<a href="mailto:58f4ed90901270738i36997aa6t38e5b800c2180cd8@mail.gmail.com" target="_blank">58f4ed90901270738i36997aa6t38e5b800c2180cd8@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Thanks Edson,<br>
BTW, I&#39;ve tried to instantiate an internal fact in a rule with MVEL dialect<br>
but it didn&#39;t worked. I&#39;ve tried this in M4. I&#39; haven&#39;t tried it yet in M5.<br>
<br>
Is this a known issue or should I create a new JIRA with test case?<br>
<br>
Best Regards,<br>
Michal<br>
<br>
<br>
On Tue, Jan 27, 2009 at 2:31 PM, Edson Tirelli &lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; &nbsp; &nbsp;Michal is correct from the point of view of the application. That is<br>
&gt; required because the actual classes are generated at compile time and not<br>
&gt; visible to the application classpath.<br>
&gt;<br>
&gt; &nbsp; &nbsp;Although, that is not the only way. Inside your rules, they are visible<br>
&gt; and you instantiate them the same way as you instantiate any other java<br>
&gt; Pojo:<br>
&gt;<br>
&gt; rule xyz<br>
&gt; when<br>
&gt; &nbsp; &nbsp; &nbsp;// sometihng<br>
&gt; then<br>
&gt; &nbsp; &nbsp; &nbsp;Person p = new Person();<br>
&gt; &nbsp; &nbsp; &nbsp;p.setName( &quot;Bob&quot; );<br>
&gt; &nbsp; &nbsp; &nbsp;insert( p );<br>
&gt; end<br>
&gt;<br>
&gt; &nbsp; &nbsp; Also, if you use Guvnor to define your model, Guvnor is capable of<br>
&gt; generating a jar file for you with the generated classes. This way you can<br>
&gt; download the jar and add it to the classpath of your application and use it<br>
&gt; as any POJOs too.<br>
&gt;<br>
&gt; &nbsp; &nbsp; []s<br>
&gt; &nbsp; &nbsp; Edson<br>
&gt;<br>
&gt;<br>
&gt; 2009/1/27 Michal Bali &lt;<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>&gt;<br>
&gt;<br>
&gt; Look at this unit test for some examples:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java</a><br>


&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; // Retrieve the generated fact type<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; FactType cheeseFact = ruleBase.getFactType(<br>
&gt;&gt; &quot;org.drools.generatedbeans.Cheese&quot; );<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; // Create a new Fact instance<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; Object cheese = cheeseFact.newInstance();<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; // Set a field value using the more verbose method chain...<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; // should we add short cuts?<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; // &nbsp; &nbsp; &nbsp; &nbsp;cheeseFact.getField( &quot;type&quot;<br>
&gt;&gt; ).getFieldAccessor().setValue( cheese,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; //<br>
&gt;&gt; &quot;stilton&quot; );<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; cheeseFact.set( cheese,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;type&quot;,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;stilton&quot; );<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals( &quot;stilton&quot;,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cheeseFact.get( cheese,<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;type&quot; ) );<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin &lt;<a href="mailto:zenzin@intalio.com" target="_blank">zenzin@intalio.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; There&#39;s now possibility to declare facts in the drl, like:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; declare Person<br>
&gt;&gt;&gt; &nbsp;name: String<br>
&gt;&gt;&gt; &nbsp;age: int<br>
&gt;&gt;&gt; end<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; My question is how do I instantiate this fact object during runtime? Do I<br>
&gt;&gt;&gt; still need to have class Person compiled and existing somewhere in<br>
&gt;&gt;&gt; classpath, or there&#39;s a helper class which I can use &quot;fake the fact&quot;,<br>
&gt;&gt;&gt; something like:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &nbsp; FakeFact person = FakeFact(&quot;Person&quot;);<br>
&gt;&gt;&gt; &nbsp; person.setField(&quot;name&quot;, &quot;Oleg&quot;);<br>
&gt;&gt;&gt; &nbsp; person.setField(&quot;age&quot;, &quot;42&quot;);<br>
&gt;&gt;&gt; &nbsp; session.insert(person);<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Or there&#39;s another nicer way?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thank you,<br>
&gt;&gt;&gt; -Oleg Zenzin<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; rules-dev mailing list<br>
&gt;&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-dev mailing list<br>
&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; &nbsp;Edson Tirelli<br>
&gt; &nbsp;JBoss Drools Core Development<br>
&gt; &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-dev mailing list<br>
&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">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>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/6abdfe4d/attachment.html" target="_blank">http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/6abdfe4d/attachment.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">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 25, Issue 19<br>
*****************************************<br>
</blockquote></div><br>