Thank you! 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.
Thanks! -Oleg On Tue, Jan 27, 2009 at 8:38 AM, <[email protected]> wrote: > Send rules-dev mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.jboss.org/mailman/listinfo/rules-dev > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of rules-dev digest..." > > > Today's Topics: > > 1. Re: [rules-users] Drools 5.0 M5 (ekkehard) > 2. Re: use of declared facts (Michal Bali) > 3. Re: use of declared facts (Edson Tirelli) > 4. Re: use of declared facts (Michal Bali) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 27 Jan 2009 08:03:01 +0100 > From: ekkehard <[email protected]> > Subject: [rules-dev] Re: [rules-users] Drools 5.0 M5 > To: Rules Users List <[email protected]> > Cc: Rules Dev List <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > Mark Proctor schrieb: > > > http://blog.athico.com/2009/01/drools-50-m5-new-and-noteworthy-release.html > > > > http://www.jboss.org/drools/downloads.html > > > > The next release should be the candidate release, all modules now seem > > to be working, we are now just working on cleaning things up and > > improving and updating documentation. > > > > Mark > > > > _______________________________________________ > > rules-users mailing list > > [email protected] > > https://lists.jboss.org/mailman/listinfo/rules-users > > > Hi Mark, > > Drools 5 seems to be a really great product. Maybe 18 months ago I > evaluated rules engines and business process engines and made my > decision to use jbpm together with Drools. > > Now - in 3 weeks or so its time to really integrate processes and rules > into my application (ERP solution for small and medium-sized-companies) > - my server is ready (OSGI - EJB3) and my UI (Eclipse Riena based). Core > parts of the OSGI client-server app will be Open Source. > > Last months I always noticed the problem for business people to > understand the differences between business processes and rules, because > from the point-of-view of business use-cases they are integrated. why > are there two tools / frameworks to manage the same thing ? > > For me the main reason to use both was persistence of long running > processes and manual tasks in the past only available in business > process engine. > > Now I read the documentation of Drools 5 and noticed that all is > availabe in ONE product: Drools 5. Thats really great news - I hope I > understood all well and I'll give it a try to do it with Drools only. > This gives me a better feeling than my previous decision. > > Thanks for all your work. > > ekke > > -- > > ekkehard gentz > software-architect > homepage: http://www.gentz-software.de > opensource: http://ekkehard.org > blog (en): http://ekkes-corner.org > blog (de): http://ekkes-ecke.org > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/64d6d492/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Tue, 27 Jan 2009 09:34:55 +0000 > From: Michal Bali <[email protected]> > Subject: Re: [rules-dev] use of declared facts > To: Rules Dev List <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > Look at this unit test for some examples: > > http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java > > // Retrieve the generated fact type > FactType cheeseFact = ruleBase.getFactType( > "org.drools.generatedbeans.Cheese" ); > > // Create a new Fact instance > Object cheese = cheeseFact.newInstance(); > > // Set a field value using the more verbose method chain... > // should we add short cuts? > // cheeseFact.getField( "type" ).getFieldAccessor().setValue( > cheese, > // > "stilton" ); > > cheeseFact.set( cheese, > "type", > "stilton" ); > assertEquals( "stilton", > cheeseFact.get( cheese, > "type" ) ); > > > On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin <[email protected]> wrote: > > > There's now possibility to declare facts in the drl, like: > > > > declare Person > > name: String > > age: int > > end > > > > My question is how do I instantiate this fact object during runtime? Do I > > still need to have class Person compiled and existing somewhere in > > classpath, or there's a helper class which I can use "fake the fact", > > something like: > > > > FakeFact person = FakeFact("Person"); > > person.setField("name", "Oleg"); > > person.setField("age", "42"); > > session.insert(person); > > > > Or there's another nicer way? > > > > Thank you, > > -Oleg Zenzin > > > > _______________________________________________ > > rules-dev mailing list > > [email protected] > > https://lists.jboss.org/mailman/listinfo/rules-dev > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/2b1899d6/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Tue, 27 Jan 2009 09:31:32 -0500 > From: Edson Tirelli <[email protected]> > Subject: Re: [rules-dev] use of declared facts > To: Rules Dev List <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > Michal is correct from the point of view of the application. That is > required because the actual classes are generated at compile time and not > visible to the application classpath. > > Although, that is not the only way. Inside your rules, they are visible > and you instantiate them the same way as you instantiate any other java > Pojo: > > rule xyz > when > // sometihng > then > Person p = new Person(); > p.setName( "Bob" ); > insert( p ); > end > > Also, if you use Guvnor to define your model, Guvnor is capable of > generating a jar file for you with the generated classes. This way you can > download the jar and add it to the classpath of your application and use it > as any POJOs too. > > []s > Edson > > > 2009/1/27 Michal Bali <[email protected]> > > > Look at this unit test for some examples: > > > > > http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java > > > > // Retrieve the generated fact type > > FactType cheeseFact = ruleBase.getFactType( > > "org.drools.generatedbeans.Cheese" ); > > > > // Create a new Fact instance > > Object cheese = cheeseFact.newInstance(); > > > > // Set a field value using the more verbose method chain... > > // should we add short cuts? > > // cheeseFact.getField( "type" > > ).getFieldAccessor().setValue( cheese, > > // > > "stilton" ); > > > > cheeseFact.set( cheese, > > "type", > > "stilton" ); > > assertEquals( "stilton", > > cheeseFact.get( cheese, > > "type" ) ); > > > > > > On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin <[email protected]> wrote: > > > >> There's now possibility to declare facts in the drl, like: > >> > >> declare Person > >> name: String > >> age: int > >> end > >> > >> My question is how do I instantiate this fact object during runtime? Do > I > >> still need to have class Person compiled and existing somewhere in > >> classpath, or there's a helper class which I can use "fake the fact", > >> something like: > >> > >> FakeFact person = FakeFact("Person"); > >> person.setField("name", "Oleg"); > >> person.setField("age", "42"); > >> session.insert(person); > >> > >> Or there's another nicer way? > >> > >> Thank you, > >> -Oleg Zenzin > >> > >> _______________________________________________ > >> rules-dev mailing list > >> [email protected] > >> https://lists.jboss.org/mailman/listinfo/rules-dev > >> > >> > > > > _______________________________________________ > > rules-dev mailing list > > [email protected] > > https://lists.jboss.org/mailman/listinfo/rules-dev > > > > > > > -- > Edson Tirelli > JBoss Drools Core Development > JBoss, a division of Red Hat @ www.jboss.com > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/1f702615/attachment-0001.html > > ------------------------------ > > Message: 4 > Date: Tue, 27 Jan 2009 15:38:47 +0000 > From: Michal Bali <[email protected]> > Subject: Re: [rules-dev] use of declared facts > To: Rules Dev List <[email protected]> > Message-ID: > <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks Edson, > BTW, I've tried to instantiate an internal fact in a rule with MVEL dialect > but it didn't worked. I've tried this in M4. I' haven't tried it yet in M5. > > Is this a known issue or should I create a new JIRA with test case? > > Best Regards, > Michal > > > On Tue, Jan 27, 2009 at 2:31 PM, Edson Tirelli <[email protected]> wrote: > > > > > Michal is correct from the point of view of the application. That is > > required because the actual classes are generated at compile time and not > > visible to the application classpath. > > > > Although, that is not the only way. Inside your rules, they are > visible > > and you instantiate them the same way as you instantiate any other java > > Pojo: > > > > rule xyz > > when > > // sometihng > > then > > Person p = new Person(); > > p.setName( "Bob" ); > > insert( p ); > > end > > > > Also, if you use Guvnor to define your model, Guvnor is capable of > > generating a jar file for you with the generated classes. This way you > can > > download the jar and add it to the classpath of your application and use > it > > as any POJOs too. > > > > []s > > Edson > > > > > > 2009/1/27 Michal Bali <[email protected]> > > > > Look at this unit test for some examples: > >> > >> > http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java > >> > >> // Retrieve the generated fact type > >> FactType cheeseFact = ruleBase.getFactType( > >> "org.drools.generatedbeans.Cheese" ); > >> > >> // Create a new Fact instance > >> Object cheese = cheeseFact.newInstance(); > >> > >> // Set a field value using the more verbose method chain... > >> // should we add short cuts? > >> // cheeseFact.getField( "type" > >> ).getFieldAccessor().setValue( cheese, > >> // > >> "stilton" ); > >> > >> cheeseFact.set( cheese, > >> "type", > >> "stilton" ); > >> assertEquals( "stilton", > >> cheeseFact.get( cheese, > >> "type" ) ); > >> > >> > >> On Tue, Jan 27, 2009 at 2:02 AM, Oleg Zenzin <[email protected]> > wrote: > >> > >>> There's now possibility to declare facts in the drl, like: > >>> > >>> declare Person > >>> name: String > >>> age: int > >>> end > >>> > >>> My question is how do I instantiate this fact object during runtime? Do > I > >>> still need to have class Person compiled and existing somewhere in > >>> classpath, or there's a helper class which I can use "fake the fact", > >>> something like: > >>> > >>> FakeFact person = FakeFact("Person"); > >>> person.setField("name", "Oleg"); > >>> person.setField("age", "42"); > >>> session.insert(person); > >>> > >>> Or there's another nicer way? > >>> > >>> Thank you, > >>> -Oleg Zenzin > >>> > >>> _______________________________________________ > >>> rules-dev mailing list > >>> [email protected] > >>> https://lists.jboss.org/mailman/listinfo/rules-dev > >>> > >>> > >> > >> _______________________________________________ > >> rules-dev mailing list > >> [email protected] > >> https://lists.jboss.org/mailman/listinfo/rules-dev > >> > >> > > > > > > -- > > Edson Tirelli > > JBoss Drools Core Development > > JBoss, a division of Red Hat @ www.jboss.com > > > > _______________________________________________ > > rules-dev mailing list > > [email protected] > > https://lists.jboss.org/mailman/listinfo/rules-dev > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.jboss.org/pipermail/rules-dev/attachments/20090127/6abdfe4d/attachment.html > > ------------------------------ > > _______________________________________________ > rules-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-dev > > > End of rules-dev Digest, Vol 25, Issue 19 > ***************************************** >
_______________________________________________ rules-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-dev
