Friday, February 27, 2009

Drools at JavaOne

Drools will be at JavaOne where I'll be co-presenting with Adam Mollenkopf from Fedex. Here is the email I just got from the JavaOne organisers.

Congratulations! Your submission entitled " Applying Complex Event Processing (CEP) with a Stateful Rules Engine for Real-Time Intelligence " was so compelling that the 2009 JavaOne Conference[sm] Program Committee has accepted your proposal to participate at the upcoming 2009 JavaOne conference in San Francisco, California, June 2 - 5, 2009. As an accepted speaker, you will receive a full complimentary pass to the Conference, allowing you access to all technical sessions, BOFs, Hands-On Labs and the Pavilion.

Wednesday, February 25, 2009

Drools at Benelux JBoss User Group, 27 February 2009

Kris and myself will be at the Benelux JBoss User Group in Rotterdam this friday, where we will be talking about the latest stuff in Drools 5.0. The event is also covering Seam, see the link below for more details.

http://www.lunatech-research.com/archives/2009/02/04/jbug-2009-02

Thursday, February 19, 2009

Translation/localisation of Guvnor

Guvnor (the web part) has been Internationalized (i18n) - (almost) all displayed strings externalised into resource bundles (properties files).

So it is possible for the UI to be localised into pirate speak, or whatever people feel inclined to do.

Any volunteers would be much appreciated (there will be various people looking at it over time, but always good to have people take a closer look early on, work out any issues with it).

More information can be found on the wiki here.

Wednesday, February 18, 2009

Drools Flow work items

We've described our approach for integrating your processes with external services using (domain-specific) pluggable work items before here. While it is very easy to define your own, we want to offer users a set of work items they can use out-of-the-box.

We recently we added a few more, so now we have support for:
  • Email
  • Logging messages
  • Google Calendar
  • IM messages (Jabber)
  • RSS feeds
  • FTP
  • Finding files on the file system
  • Archiving files
  • Executing system commands
  • Transforming data from type A to type B
I added a few screenshots of processes using these work items below. If you want to find out more on how to define your own work items, check out our documentation. We hope that people that implement other generic work items are willing to contribute it back to our library :)

Example 1: A process creating entries in Google Calendar



Example2: A process backing up files using FTP and sending IM messages to the admin

Friday, February 13, 2009

Drools goes Transactional

The last bit of work for Drools 5.0 is almost in place, where units of work can now be made transactionally. Here is a quick unit test that shows two transactions, the later with a rollback, notice the rolled back insertion does not have any affect. Statements executed outside of the user defined transaction block grab a transaction just for that single command, which is what happens with the fireAllRules(). This work was necessary so that we can combine rules and flow together but make sure those state changes are transactional. The rules side is quite heavy, but it should be fine for a small number of facts, where network latency of the DB will be the bottleneck.

rule addInteger
when
$i : Integer( intValue > 1 )
then
list.add( $i );
end

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newByteArrayResource( str.getBytes() ),
ResourceType.DRL );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

if ( kbuilder.hasErrors() ) {
fail( kbuilder.getErrors().toString() );
}

kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession( conf );

List list = new ArrayList();
UserTransaction ut = (UserTransaction) new InitialContext().lookup( "java:comp/UserTransaction"
ut.begin();
ksession.setGlobal( "list",
list );
ksession.insert( 1 );
ksession.insert( 2 );
ut.commit();

ut.begin();
ksession.insert( 3 );
ut.rollback();

ksession.fireAllRules();

assertEquals( 2,
list.size() );

Tuesday, February 03, 2009

Drools Clinic

I announced a Drools clinic last week, http://blog.athico.com/2009/01/drools-commnity-clinic-4th-of-february.html, however we haven't got the 5.0 candidate release out yet, which I'd like to do for the clinic. So I'm going to cancel the clinic for tomorrow and follow up a few days later after the candidate release is out, I'll keep you all posted.