<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"><<a href="mailto:rules-dev-request@lists.jboss.org" target="_blank">rules-dev-request@lists.jboss.org</a>></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>
<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>
<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 'help' to<br>
<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>
<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 "Re: Contents of rules-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: [rules-users] Drools 5.0 M5 (ekkehard)<br>
2. Re: use of declared facts (Michal Bali)<br>
3. Re: use of declared facts (Edson Tirelli)<br>
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 <<a href="mailto:ekkehard@gentz-software.de" target="_blank">ekkehard@gentz-software.de</a>><br>
Subject: [rules-dev] Re: [rules-users] Drools 5.0 M5<br>
To: Rules Users List <<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>><br>
Cc: Rules Dev List <<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>><br>
Message-ID: <<a href="mailto:497EB1A5.1090905@gentz-software.de" target="_blank">497EB1A5.1090905@gentz-software.de</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Mark Proctor schrieb:<br>
> <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>
><br>
> <a href="http://www.jboss.org/drools/downloads.html" target="_blank">http://www.jboss.org/drools/downloads.html</a><br>
><br>
> The next release should be the candidate release, all modules now seem<br>
> to be working, we are now just working on cleaning things up and<br>
> improving and updating documentation.<br>
><br>
> Mark<br>
><br>
> _______________________________________________<br>
> rules-users mailing list<br>
> <a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
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'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 <<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>><br>
Subject: Re: [rules-dev] use of declared facts<br>
To: Rules Dev List <<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>><br>
Message-ID:<br>
<<a href="mailto:58f4ed90901270134s29ee99f2p5357152eae05f260@mail.gmail.com" target="_blank">58f4ed90901270134s29ee99f2p5357152eae05f260@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<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>
// Retrieve the generated fact type<br>
FactType cheeseFact = ruleBase.getFactType(<br>
"org.drools.generatedbeans.Cheese" );<br>
<br>
// Create a new Fact instance<br>
Object cheese = cheeseFact.newInstance();<br>
<br>
// Set a field value using the more verbose method chain...<br>
// should we add short cuts?<br>
// cheeseFact.getField( "type" ).getFieldAccessor().setValue(<br>
cheese,<br>
//<br>
"stilton" );<br>
<br>
cheeseFact.set( cheese,<br>
"type",<br>
"stilton" );<br>
assertEquals( "stilton",<br>
cheeseFact.get( cheese,<br>
"type" ) );<br>
<br>
<br>
On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin <<a href="mailto:zenzin@intalio.com" target="_blank">zenzin@intalio.com</a>> wrote:<br>
<br>
> There's now possibility to declare facts in the drl, like:<br>
><br>
> declare Person<br>
> name: String<br>
> age: int<br>
> end<br>
><br>
> My question is how do I instantiate this fact object during runtime? Do I<br>
> still need to have class Person compiled and existing somewhere in<br>
> classpath, or there's a helper class which I can use "fake the fact",<br>
> something like:<br>
><br>
> FakeFact person = FakeFact("Person");<br>
> person.setField("name", "Oleg");<br>
> person.setField("age", "42");<br>
> session.insert(person);<br>
><br>
> Or there's another nicer way?<br>
><br>
> Thank you,<br>
> -Oleg Zenzin<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>
-------------- 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 <<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>><br>
Subject: Re: [rules-dev] use of declared facts<br>
To: Rules Dev List <<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>><br>
Message-ID:<br>
<<a href="mailto:e6dd5ba30901270631j5c6fda5bje89a90f1fa1e3ebd@mail.gmail.com" target="_blank">e6dd5ba30901270631j5c6fda5bje89a90f1fa1e3ebd@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
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>
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>
// sometihng<br>
then<br>
Person p = new Person();<br>
p.setName( "Bob" );<br>
insert( p );<br>
end<br>
<br>
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>
[]s<br>
Edson<br>
<br>
<br>
2009/1/27 Michal Bali <<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>><br>
<br>
> Look at this unit test for some examples:<br>
><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>
> // Retrieve the generated fact type<br>
> FactType cheeseFact = ruleBase.getFactType(<br>
> "org.drools.generatedbeans.Cheese" );<br>
><br>
> // Create a new Fact instance<br>
> Object cheese = cheeseFact.newInstance();<br>
><br>
> // Set a field value using the more verbose method chain...<br>
> // should we add short cuts?<br>
> // cheeseFact.getField( "type"<br>
> ).getFieldAccessor().setValue( cheese,<br>
> //<br>
> "stilton" );<br>
><br>
> cheeseFact.set( cheese,<br>
> "type",<br>
> "stilton" );<br>
> assertEquals( "stilton",<br>
> cheeseFact.get( cheese,<br>
> "type" ) );<br>
><br>
><br>
> On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin <<a href="mailto:zenzin@intalio.com" target="_blank">zenzin@intalio.com</a>> wrote:<br>
><br>
>> There's now possibility to declare facts in the drl, like:<br>
>><br>
>> declare Person<br>
>> name: String<br>
>> age: int<br>
>> end<br>
>><br>
>> My question is how do I instantiate this fact object during runtime? Do I<br>
>> still need to have class Person compiled and existing somewhere in<br>
>> classpath, or there's a helper class which I can use "fake the fact",<br>
>> something like:<br>
>><br>
>> FakeFact person = FakeFact("Person");<br>
>> person.setField("name", "Oleg");<br>
>> person.setField("age", "42");<br>
>> session.insert(person);<br>
>><br>
>> Or there's another nicer way?<br>
>><br>
>> Thank you,<br>
>> -Oleg Zenzin<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>
><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>
<br>
<br>
--<br>
Edson Tirelli<br>
JBoss Drools Core Development<br>
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 <<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>><br>
Subject: Re: [rules-dev] use of declared facts<br>
To: Rules Dev List <<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>><br>
Message-ID:<br>
<<a href="mailto:58f4ed90901270738i36997aa6t38e5b800c2180cd8@mail.gmail.com" target="_blank">58f4ed90901270738i36997aa6t38e5b800c2180cd8@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Thanks Edson,<br>
BTW, I've tried to instantiate an internal fact in a rule with MVEL dialect<br>
but it didn't worked. I've tried this in M4. I' haven'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 <<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>> wrote:<br>
<br>
><br>
> 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>
> 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>
> // sometihng<br>
> then<br>
> Person p = new Person();<br>
> p.setName( "Bob" );<br>
> insert( p );<br>
> end<br>
><br>
> 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>
> []s<br>
> Edson<br>
><br>
><br>
> 2009/1/27 Michal Bali <<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>><br>
><br>
> Look at this unit test for some examples:<br>
>><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>
>> // Retrieve the generated fact type<br>
>> FactType cheeseFact = ruleBase.getFactType(<br>
>> "org.drools.generatedbeans.Cheese" );<br>
>><br>
>> // Create a new Fact instance<br>
>> Object cheese = cheeseFact.newInstance();<br>
>><br>
>> // Set a field value using the more verbose method chain...<br>
>> // should we add short cuts?<br>
>> // cheeseFact.getField( "type"<br>
>> ).getFieldAccessor().setValue( cheese,<br>
>> //<br>
>> "stilton" );<br>
>><br>
>> cheeseFact.set( cheese,<br>
>> "type",<br>
>> "stilton" );<br>
>> assertEquals( "stilton",<br>
>> cheeseFact.get( cheese,<br>
>> "type" ) );<br>
>><br>
>><br>
>> On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin <<a href="mailto:zenzin@intalio.com" target="_blank">zenzin@intalio.com</a>> wrote:<br>
>><br>
>>> There's now possibility to declare facts in the drl, like:<br>
>>><br>
>>> declare Person<br>
>>> name: String<br>
>>> age: int<br>
>>> end<br>
>>><br>
>>> My question is how do I instantiate this fact object during runtime? Do I<br>
>>> still need to have class Person compiled and existing somewhere in<br>
>>> classpath, or there's a helper class which I can use "fake the fact",<br>
>>> something like:<br>
>>><br>
>>> FakeFact person = FakeFact("Person");<br>
>>> person.setField("name", "Oleg");<br>
>>> person.setField("age", "42");<br>
>>> session.insert(person);<br>
>>><br>
>>> Or there's another nicer way?<br>
>>><br>
>>> Thank you,<br>
>>> -Oleg Zenzin<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>
>><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>
><br>
><br>
> --<br>
> Edson Tirelli<br>
> JBoss Drools Core Development<br>
> JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><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>
-------------- 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>