Saturday, February 25, 2012

Drools, jBPM and Guvnor : Measuring Risk via Community Health

When I give Open Source talks on the software we build, I always take a few minutes to talk about risk. Adopting any software technology brings about levels of risk that need to be assessed. Some aspects of risk are obvious; such as "is the product fit for purpose". This can normally be assessed via demonstrations, prototyping and fit gap analysis. Other aspects of risk are not so easy, "is this product healthy".

Let's stop a minute and think about the word "health" what does health mean in terms of software. If a project is not healthy any of the following, among many other things, could happen:
  • Bugs are slow to be fixed, or not fixed at all
  • Long time between releases with new features, or no releases at all.
  • Project is dormant, or worse abandoned but has not been stated publicly
  • Finding community support can be hard
  • End up maintaining the whole project yourself inhouse.
  • When a project is not moving forward fast enough, or the scope of the project is too small, required features might be implemented as hybrid extensions only (for example using a different license or even closed source), and not available as part of the open-source project


So when you are looking to adopt a technology how do you assess if it's healthy, how do you avoid situations detailed above:
  • Large development community
  • Regular commits
  • Large support community, either via real time chat or mailing lists
  • Is the project financially profitable already.
  • Published books?
    • If publishers are willing to invest in books, you know there is a large end user community. That means lower risk of bugs, and easier to hire people and find consultancies.
  • Commitment to public global speaking engagements, such as java user groups or workshops.

With Drools, jBPM and Guvnor there are published books, and you only have to pop onto irc or the mailing lists to see the vibrant chats going on. We continue to hire aggressively, with two more people starting within the next two months.  More importantly though you only have to go to github to see the flurry of activity going on for a large number of developers. Below you can see the graphs taken from github, and I think they speak for themselves :)

 Drools Commit Graph

 jBPM Commit Graph

Guvnor Commit Graph 

Friday, February 24, 2012

Employee rostering with Drools Planner: demo video

Tuesday, February 21, 2012

Drools & jBPM Event : London 8th March 2012

Register now to join us for the free Drools & jBPM London 2012 event, hurry limited spaces :)
http://redhat-mail.com/t/XRU-OE4J-824IMOYW1D/cr.aspx


When Thursday 8th March
Where Ave Maria Lane, London, London EC4M 7DD (near St Paul's Tube)


Agenda trans
trans trans trans
trans
trans
09:00 trans Registration, tea and coffee
trans
09:30 trans Introduction/ Welcome
trans
09:45 trans Rules, Events & Processes: the Open Source way
Mark Proctor - Worldwide Technical Lead for BRMS & BPMS, Red Hat
trans
10:45 trans Decision Tables
Michael Anstis, JBoss Core Developer, Red Hat
trans
11:15 trans Tea/Coffee Break
trans
11:30 trans BPMN2 and jBPM5
Kris Verlaenen, JBoss Core Developer, Red Hat
trans
12:15 trans Solving Planning Problems
Geoffrey de Smet, JBoss Core Developer, Red Hat
trans
12:45 trans Case Studies
trans
13:00 trans Lunch and Networking
trans

Monday, February 20, 2012

Webinar on jBPM 5 (February 22nd)

We're planning a new webinar on the latest features of jBPM 5 and a preview of some of the upcoming features this week. Register now !

jBPM 5: Redefined, Simplified, and the Open Source BPM

Register Now


jBPM is one of the most popular open source BPM/workflow solutions on the market. Over the years it has been widely adopted by many enterprises due to its many unique characteristics, such as:
  • a lightweight footprint
  • an embeddable engine
  • its ease of use
jBPM 5 has taken these unique characteristics to the next level by adopting the popular BPMN 2 standard. BPMN 2 is not only the choice of standard for modeling, but also the choice for native execution.


jBPM 5 is a redefined BPM implementation that is further simplified for ease of use and offers flexibility in meeting wider enterprise needs. This webinar will discuss many of the key functionalities and future direction of jBPM 5, including:
  • BPMN 2 based process modeling using rich web based designer and Eclipse editor
  • Human interaction based on the WS-HT standard
  • Process monitoring and debugging
  • Support plan through JBoss’ enterprise product
You will also learn how to build adaptive business processes by leveraging the combined power of business rules, business events, and processes.


Speakers:

PrakashAradhya-200Prakash Aradhya, Sr. Product Manager, Red Hat
Prakash Aradhya is responsible for driving the product strategy and roadmap for JBoss Enterprise BRMS and BPM products. He has over 15 years of experience in product development and product management in the middleware software industry. Prior to his focus on the BRMS and BPM products, Prakash was responsible for JBoss Developer Platform product management which included JBoss Developer Studio. Prior to joining Red Hat, Prakash worked at Sun Microsystems (now part of Oracle) as SOA Product Manager for the Sun Java CAPS product.

Kris VerlaenenKris Verlaenen, jBPM 5 Project Lead
Kris Verlaenen leads the jBPM 5 effort and is also one of the core developers of the Drools project, to which he started contributing in 2006. After finishing his PhD in Computer Science in 2008, he joined JBoss full-time and became the Drools Flow lead. He has a keen interest in the healthcare domain, one of the areas that have already shown to have a great need for a unified process, rule and event processing framework.

Choose from the following live events:
Time zone converter
  • Wednesday, February 22, 2012 | 14:00 UTC / 9am (New York) / 3pm (Paris) / 7:30pm (Mumbai)
  • Wednesday, February 22, 2012 | 19:00 UTC / 2pm (New York) / 8pm (Paris) / *Thur 12:30am (Mumbai)

Register Now

Saturday, February 18, 2012

Import XLS decision tables into Guvnor

Work has been completed to enable users to upload their XLS based Decision Tables into Guvnor! Checkout this new feature in the master branch (or wait for the arrival of 5.4.CR1 when it becomes available...)

Checkout a demo here.

Uploading a XLS decision table results in the creation of numerous new assets, including (obviously) web-guided Decision Tables, functions, declarative types and modifications to package globals and imports etc (Queries are not converted, although supported in the XLS form, as Guvnor doesn't support them yet).

XLS decision table



Guided decision table



This is the first stage of "round-tripping" decision tables. We still need to add the ability to export a guided decision table back to XLS, plus we'd like to add tighter integration of updated XLS assets to their original converted cousins - so if a new version of the XLS decision table is uploaded the related assets' versions are updated (rather than creating new) upon conversion.

This is a powerful enhancement and as such your feedback is critical to ensure we implement the feature as you'd like it to operate. Check it out, feedback your opinions and help guide the future work :)

Wednesday, February 08, 2012

DeveloperConference 2012 in Brno, Czech Republic 17 - 18 February 2012

Next week, on Friday 17 February, I 'll be presenting a introduction to Drools, Guvnor and Planner at the DeveloperConference 2012 in Brno, Czech Republic.
There are plenty of other interesting JBoss talks, about topics such as CDI, Arquillian Drone, Errai, Infinispan, Hibernate OGM, ... The entrance is free, so join us if you're in the neighborhood.

Tuesday, February 07, 2012

Drools & jBPM Info Sheet

We've made an Info Sheet that provides an overview of Drools, jBPM and Guvnor. Feel free to download it and hand it out in your public presentations. There are 13 pages in total. You'll need to sign in to slideshare to download. Big text and lots of pretty pictures and very sexy, but not to be used for "extra" curriculum activities ;)
http://www.slideshare.net/MarkProctor/drools-jbpm-info-sheet

Welcome Alexandre Porcelli

Alexandre Porcelli has joined the Drools&jBPM team today. Alexandre is an Antlr guru and also leads the Open Spotlight project, http://porcelli.github.com/OpenSpotLight/.

Alexendre will initially be helping out on the Guvnor work for jBPM, then in a few months time we hope that he'll lead our work around distributed computing.

Alexendre lives in sunny Brazil, you can read more about him here,http://porcelli.com.br/.




Wumpus World Lives!!!

Wumpus world continues to improve and is now fully playable. The UI has a lot more polish now and nearly all of the code has been moved to DRL now, including the swing graphics rendering for the cave and the sensor panels. You'll need to use master head to try it. Java is just used to build the kbase from the drl files and to create the swing panels, buttons and forms. WindowBuilder was used to graphical layout things.

The final thing I have to do is allow for client integration, so that people can write rules to automate the hero.

https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/examples/wumpus/init.drl
https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/examples/wumpus/commands.drl
https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/examples/wumpus/collision.drl
https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/examples/wumpus/score.drl
https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/examples/wumpus/view/ui.drl
https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/examples/wumpus/view/paintCave.drl
https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/examples/wumpus/view/paintSensor.drl

Cave is hidden, playing the game purely with Sensors.

Cave is now shown, but unvisited rooms are greyed out.

Cheating reveals all, I have shot the Wumpus Dead

Window Builder with MigLayout was used to create the panels, buttons and forms


Here is the code to incrementally render the cave rooms:
function void paintCaveCell(String image, Cell cell, GameView gv, GameUI gui) {
     int rowIndent = 20;
     int colIndent = 5;
     int rowPad = cell.getRow() * gv.getCellPadding();
     int colPad = cell.getCol() * gv.getCellPadding();
     int y = (4 - cell.getRow()) * 50 - rowPad + rowIndent;
     int x = cell.getCol() * 50 + colPad + colIndent;
     
     Graphics caveG = gui.getCavePanel().getCaveG();
     caveG.setColor( Color.WHITE ); // background
     caveG.fillRect( x, y,  gv.getCellWidth(), gv.getCellHeight() );
     caveG.drawImage( ImageIO.read( GameView.class.getResource( image ) ), x, y, gv.getCellHeight(), gv.getCellWidth(), gui.getCavePanel() );
}

rule "Init CaveDirty" when
    not CaveDirty()
then
    insert( new CaveDirty() );
end

rule "Create CompositeImage" when
    $c : Cell()
    not CompositeImageName( cell == $c )
then
    CompositeImageName cin = new CompositeImageName($c, "", "", "", "");
    insert( cin );
end  

rule "Reset CompositeImage" when
    $cin : CompositeImageName()
    not Cell( row == $cin.cell.row, col == $cin.cell.col)
then
    retract( $cin );
end    

rule "Base Paint" when
    $c : Cell()
    $cin : CompositeImageName( cell == $c );
then
end    

rule "Paint Gold" extends "Base Paint" when
    Gold(row == $c.row, col == $c.col)  
then
   modify( $cin ) { gold = "gold" };
end

rule "Paint Empty Gold" extends "Base Paint" when
    not Gold(row == $c.row, col == $c.col)  
then
   modify( $cin ) { gold = "" };
end

rule "Paint Pit" extends "Base Paint" when
    Pit(row == $c.row, col == $c.col)  
then
   modify( $cin ) { pit = "pit" };
end

rule "Paint Empty Pit" extends "Base Paint" when
    not Pit(row == $c.row, col == $c.col)  
then
   modify( $cin ) { pit = "" };
end

rule "Paint Wumpus Alive" extends "Base Paint" when
    Wumpus(alive == true, row == $c.row, col == $c.col)  
then
   modify( $cin ) { wumpus = "wumpus_alive" };
end

rule "Paint Wumpus Dead" extends "Base Paint" when
    Wumpus(alive == false, row == $c.row, col == $c.col)  
then
   modify( $cin ) { wumpus = "wumpus_dead" }
end

rule "Paint Empty Wumpus" extends "Base Paint" when
    not Wumpus(row == $c.row, col == $c.col)  
then
   modify( $cin ) { wumpus = "" }
end


rule "Paint Hero Direction Up" extends "Base Paint" when 
    $h : Hero( direction == Direction.UP, row == $c.row, col == $c.col )
then
     modify( $cin ) { hero = "hero_up" };
end    

rule "Paint Hero Direction Down" extends "Base Paint"  when
    $h : Hero( direction == Direction.DOWN, row == $c.row, col == $c.col  )
then
    modify( $cin ) { hero = "hero_down" };
end   

rule "Paint Hero Direction Left" extends "Base Paint"  when
    $h : Hero( direction == Direction.LEFT, row == $c.row, col == $c.col  )
then
    modify( $cin ) { hero = "hero_left" };
end    

rule "Paint Hero Direction Right" extends "Base Paint" when
    $h : Hero( direction == Direction.RIGHT, row == $c.row, col == $c.col  )
then
    modify( $cin ) { hero = "hero_right" };
end 

rule "Paint Empty Hero" extends "Base Paint" when
    not Hero( row == $c.row, col == $c.col  )
then
    modify( $cin ) { hero = "" };
end   

rule "Paint Hidden Room" when 
    $gui : GameUI( cavePanel != null && cavePanel.caveG != null  )
    $cd : CaveDirty() @watch(!*)
    $gv : GameView(showAllCells == false)
    $c : Cell(hidden == true) 
then
   paintCaveCell( "hidden_room.png", $c, $gv, $gui);
   modify( $cd ) { dirty = true };
end


rule "Paint Empty Room" when 
   $gui : GameUI( cavePanel != null && cavePanel.caveG != null )
    $cd : CaveDirty() @watch(!*)   
   ($gv : GameView(showAllCells == true) and $c : Cell() ) or
   ($gv : GameView(showAllCells == false) and $c : Cell(hidden == false) )      
   CompositeImageName( cell == $c, pit == "", wumpus == "", gold == "", hero == "" ) @watch(*)
then
   paintCaveCell( "empty_room.png", $c, $gv, $gui );
   modify( $cd ) { dirty = true };
end 

rule "Paint Non Empty Room" when
   $gui : GameUI( cavePanel != null && cavePanel.caveG != null )
   $cd : CaveDirty() @watch(!*)   
   ($gv : GameView(showAllCells == true) and $c : Cell() ) or
   ($gv : GameView(showAllCells == false) and $c : Cell(hidden == false) )    
   $cin : CompositeImageName( cell == $c, ( !(hero != "" && pit != "")  &&  // don't draw a hero on the same square as a pit or an alive wumpus, as the game is over
                                            !(hero != "" && wumpus == "wumpus_alive") && 
                                            !(pit == "" && wumpus == "" && gold == "" && hero == "") ) ) @watch(*)
then
    paintCaveCell( $cin.pit + $cin.wumpus + $cin.gold +  $cin.hero + ".png", $cin.cell, $gv, $gui );
    modify( $cd ) { dirty = true };
end

rule "Redraw Cave" no-loop salience -500 when
   $gui : GameUI() 
   $cd : CaveDirty( dirty == true )
then
   $gui.updateCave();
   modify( $cd ) { dirty = false };
end

Friday, February 03, 2012

Drools Developer's Cookbook review


A few weeks ago Packt Publishing released the Drools Developer's Cookbook, written by Lucas Amador. I had the opportunity to review an early draft of the book last year and when I received my copy of the released book I was eager to read it and check out how was it. I am glad to say I am pleasantly surprised.

Packt is known for publishing many high quality books on open source projects and it has already published 2 other books on Drools, but managed to publish this 3rd book with a completely different perspective and as so, allows readers to choose which ones they would benefit more from.

While JBoss Drools Business Rules, by Paul Browne, focus its content on higher level rule authoring and an earlier version of Guvnor, Drools JBoss Rules 5.0 Developer's Guide, by Michal Bali, is a deeper tutorial-style reading that builds on the examples from chapter to chapter, detailing how every piece of the puzzle fits together.

Drools Developer's Cookbook on the other hand, as the name implies, contains recipes on how to leverage Drools' features to effectively build business solutions. This is an excellent format for those with some knowledge of the platform and that want a detailed reference on how to use specific features. While the Developer's Guide is more suited for a throughout reading, the cookbook is a good reference material that can be read on a chapter basis in any order the reader wishes.

Each recipe is divided in usually 3 sections:
  • "Getting ready" details which setup steps are necessary to use the feature/complete the task in that recipe, like for instance, additional jar dependencies or configuration options are required.
  • "How to do it..." is a step by step explanation of how to use the feature/complete the task.
  • "How it works..." is my favorite section and explains how and why things work the way they do. This is important knowledge that can be leveraged to achieve different goals.
Some recipes also have references for additional documentation or information.

The book covers an extensive set of components and features, as can be seen in the table of contents: from the core Drools Expert, to Guvnor, Fusion, Planner, Camel/Spring/JPA integration and even a bit of jBPM. I think the book will be really helpful to a large percentage of the Drools user base.

Unfortunately, the book is not perfect. There are some minor issues, like some typos in some of the printed examples. The good news is that this is totally offset by the great support Packt provides to all their published books. The (fixed) source code is available for download, and I imagine the errata should be soon available as well.

The over 40 recipes in this book are an excellent resource, and I am sure it will left the readers looking forward for more!

Happy Drooling

Traveling Salesman Problem demo with Drools Planner

Implementing TSP or vehicle routing in Drools Planner 5.4.0.Beta2 and earlier was difficult. But starting from 5.4.0.CR1, such use cases are easy and far less code to implement. And they are compatible with real-time planning.

Just take a look at the Traveling Salesman Problem (TSP) demo. It shows adding cities in real-time and demonstrates how easy it is to change the constraints:



Coming soon: a vehicle routing example and even better scalability.

Thursday, February 02, 2012

Drools Cookbook

http://link.packtpub.com/ivHAPZ