Thursday, September 29, 2011

jBPM Form Builder follow-up: advanced UI components

I'm happy to announce new advanced UI components are now available in the form builder, as well as a preview option to show content in GWT form. The following screenshot will take you to a video showing a brief snapshot of these new functions:
Among the UI components we're working to get added, we should mention the following:
Rich Text Editor: With the purpose of allowing decorated text
Calendar date picker: To pick dates without having to write them manually
AJaX file ulpoad: For being able to upload files while the end user continues to load the form
image rolodex: Still working on this one, to get to see a rolodex of uploaded images and flip through them interactively
However, this last couple of weeks I've been working mostly on increasing the test coverage, which had been left behind for quite a while, and I'm happy to inform we have now some pretty decent numbers for the server side!
Not too bad for just a couple of weeks :D
Cheers from Argentina. Feel free to comment


Wednesday, September 28, 2011

It must be close to Drools Bootcamp time, there is another Volcano

So the running joke is that you can now predict volcano eruptions by looking at when the next Drools bootcamps is happening:


For those not getting the joke, each time we've done a boot camp there has bee a Volcano:

Job opening to work on Drools & jBPM in Argentina

One of the largest healthcare organisations in Argentina is looking to find two senior developers, full time, to work on Drools and jBPM. The position is a long term contractual one and you must be based in Buenos Aries, Argentina

The work is for R&D enhancements to Drools and jBPM, not for building end user applications. It involves developing next generation authoring environments for rules, workflow and the semantic web. The ideal candidates would have a mixed set of skills including java, gwt and javascript. Knowledge of Drools and jBPM is a plus, but not mandatory.

You will work day to day with the Drools and jBPM team, as part of their community. All your work will be open source and you'll be able to evangelise your work via community facilities, such as mailing lists and blogs. This provides a unique opportunity to work on high profile projects in a public manner and gain recognition for yourself and your work.

You can apply for the job here :


Monday, September 26, 2011

Small efforts, big improvements

Some days ago, following some suggestions of Mark Proctor, I spent just a few hours trying to reduce both the memory footprint and the time requested to create an instance of the WorkingMemory, one of the most used core class of Drools. What I basically did was to lazy initialize all the non-strictly necessary data structures of that class, moving their creation away from the constructor, and rewrite a private method, also invoked during the initialization phase, that used some of those data-structure in a sub-optimal way.

Now I just had time to measure the actual improvements brought by my rework and I must say I was quite positively surprised of the results, especially if compared with the amount of time I spent to implement them. In particular I just tried to create a StatefulSession (that of course uses a WorkingMemory internally) starting from a KnowledgeBase with only one simple rule.

What I found is that my enhancements reduced the memory occupation of that StatefulSession from the initial 11,336 bytes to only 8,610. Even more impressive, the number of instances of StatefulSession I could create in a second, on my machine, increased from the initial 4,668 to an amazing 12,304.

I hope this demonstrates that, even when it seems unlikely, there could be almost always room for important improvements and, at the same time, that not all those improvements comes with a cost, in terms of effort, related with the real benefits they can bring.

Sunday, September 25, 2011

Brute forcing a bin packing problem

Even a basic planning problem, such as bin packing, can be notoriously hard to solve and scale. One might consider the brute force algorithm. Let's take a look at how that algorithm works out on the cloud balance example of Drools Planner:
Given a set of servers with different hardware (CPU, memory and network bandwidth)
and given a set of processes with different hardware requirements,
assign each process to 1 server
and minimize the total cost of the active servers.
The brute force algorithm is simple: try every combination between processes with each process assigned to each server. For example, if we have 6 processes (P0, P1, P2, P3, P4, P5) and 2 servers (S0, S1), we'd try these solutions:
  • P0->S0, P1->S0, P2->S0, P3->S0, P4->S0, P5->S0
  • P0->S0, P1->S0, P2->S0, P3->S0, P4->S0, P5->S1
  • P0->S0, P1->S0, P2->S0, P3->S0, P4->S1, P5->S0
  • P0->S0, P1->S0, P2->S0, P3->S0, P4->S1, P5->S1
  • ...
  • P0->S1, P1->S1, P2->S1, P3->S1, P4->S1, P5->S1
On my machine, it takes 15ms to calculate the score of these 2^6 combinations. When I scale out to 9 processes and 3 servers, which are 3^9 combinations, it becomes 1582ms. So it scales like this:

Notice that despite that the number of processes has not even doubled, the running time multiplied by 100! For comparison, I 've added the running time of the First Fit algorithm.

And it gets worse: for 12 processes and 4 servers, which are 4^12 combinations, it take more than 17 minutes:

What if we want to distribute 3000 processes over 1000 servers? With this kind of scalability, it will take too long. In fact, the brute force algorithm is useless.

Luckily, Drools Planner implements several other optimization algorithms, which can handle such loads. If you want to know more about them, take a look at the Drools Planner manual or come to my talk at JUDCon London (31 Oct - 1 Nov).

Drools 5.3.0.CR1 released (including Expert, Fusion, Planner and Guvnor)

We're happy to announce the release of Drools (Expert, Fusion, Planner, Guvnor) 5.3.0.CR1.

Try it out and give us some feed-back (user list, issue tracker).

New jBPM5 web designer version available

A new jBPM5 web designer version is available for download now on sourceforge. It includes over 20 bug fixes from the previous version.

If you are using the jBPM installer, follow these steps to upgrade to this new version:

1) Edit $jbpm-installer-dir$/ and make sure you have:

# the version of the Designer you want to use
# and the associated URL you want to get it from

2) In $jbpm-installer-dir$ execute the following commands:
ant clean.demo
ant install.demo
ant start.demo

Enjoy :)

Friday, September 23, 2011

jBPM5 tooling support for service nodes

Per request of our jBPM community here is a video that shows how to configure service nodes (work items) in both the jBPM5 Eclipse, and the web-based editors.

In the video we use tooling installed via the jBPM 5.1.0.Final installer that is available for download on sourceforge.

(click on image to view video)


Wednesday, September 21, 2011

Guvnor 5.3 on JBoss AS 7

Guvnor 5.3.0.CR1 will work on JBoss AS 7.0.1!

A big thanks to Mattias Nilsson Grip, who has succeeded in getting Guvnor to work on JBoss AS 7.0.1 in the non-web profile and made a nice pull request for us. That's the power of open source at work :)

Based on that, it was pretty easy to analyze our problem with the web profile and produce a guvnor war that works on web and non-web profile alike. Look for the jboss-as-7.0 specific war file in the distribution.

We'll release 5.3.0.CR1 soon so you can download it, but if you feel brave enough to experiment with a snapshot, you can download a nightly build. Let us know of any issues you find on our user forum or in our issue tracker.

Tuesday, September 20, 2011

Drools & jBPM Boot Camp (Healthcare Focus) : San Francisco Oct 2011

We are still looking for more healthcare speakers, particularly someone who can do a talk on ontologies, see here for previous announcement. We have a preliminary program now for the two day event, the wiki page contains the live information that is updated regularly. Here is a copy below:

Hyatt Regency San Francisco.jpg

The Drools & jBPM event is free, but you MUST BE REGISTERED to attend. Registration will be possible on the main rulesfest website shortly, here -



  • Hyatt Regency, Burlingame, San Francisco, CA


  • Rules Fest - October 2011 - Mon 24th to Wed 26th
  • Drools & jBPM Boot Camp - October 2011 - Thu 27th to Fri 28th
    • Thu general tech for Drools & jBPM rules, workflow, event processing, ontologies
    • Fri Healthcare focus



  • Monday to Friday 9am to 6pm



Contact Details

  • Rules Fest - Jason Morris - info at rulesfest d0t org
  • Drools & jBPM (general) - Prakash Aradhya - paradhya at redhat d0t com
  • Drools & jBPM (technical) - Mark Proctor - mproctor at codehaus d0t com

Previous Boot Camps

Drools Boot Camp : San Diego April 2010

Drools Boot Camp : San Francisco June 2009


Mon - Wed (Rules Fest)

General talks covering a variety of topics related to reasoning systems, rules, workflow, agents, ontologies, uncertaintity.

Paul Haley will give the key note (not to be missed) "Paul Haley to Keynote Rules Fest".

Rest of agenda see here

Thu (Drools & jBPM, Free)

General Drools & jBPM day with presenters from Red Hat and core community members. This day is suitable for all and will provide an introduction and overview to Drools and jBPM and ow they are used.

SubjectPresentation Title
Mark Proctor Red HatDrools Expert
Introduction to what a Rule Engine is and the capabilities of Drools Expert. This will cover both the Drools technical language and Decision Table theory.
Tiho SurdilovicRed HatDrools Fusion (cep)Complex Event Processing facilitates event correlation and temporal comparison. Fusion extends Drools to provide CEP capabilities. Come learn what CEP, what type of problems it helps solve and how it's done with Drools.



Introduction to what BPMN2 is, why it matters and how jBPM works.
Ray PloskiRed Hat


(web tooling/brms)

Guvnor provides server side knowledge mangement, authoring and deployment capalities. This talk introduces these concepts and provides live demos of everything coming together.
Davide SottaraUS Navy Healthcare

Drools Expert

(Semantics and Ontologies)

What are semantic ontologies and what research is underway with Drools to help. Will also introduce the base founation of Traits, which provides dynamic and type safe duck typing.
Mark ProctorRed Hat

Drools Expert


Learn how to write Adventure games with Drools.

Fri (Drools & jBPM & Healthcare, Free)

Healthcare focus, especially clinical. This day will be predominantly industry lead with professionals doing most of the talks. None healthcare people are welcome to join, but be aware that this day is specialised healthcare problems their problems.

Titles and abstracts are still being fleshed out and subject to change, check back regularly for changes.

Presentation Title and Abstract
Captain Emory Fry US Navy HealthcareDelivering Real-Time Clinical Decision Support
Diego NayaOSDEImproving Healthcare customer service with Drools and jBPM5



PlugtreeEmergency Services in action.
Esteban AlivertiPlugtreeEfficient Staff Rostering with Drools Planner
Nathan BellPharmacy OneSource

Speed Saves Lives: Leveraging a massively parallel expert system for patient surveillance

Pharmacy OneSource is a SaaS provider of applications for hospital pharmacy and infection prevention professionals. This case study will discuss the steps taken to develop a next-generation patient surveillance platform that allows clinicians to accurately detect risk factors, and perform interventions. The platform leverages the GigaSpaces implementation of Tuple-space and the Drools rule engine to create a massively parallel expert system. This architecture allows for customizable handling of millions of HL7 messages per day, evaluation of thousands of clinician created business rules, and reasoning over hundreds of thousands of patient data facts to provide near-real-time surveillance.

Dave WalsheServices Group

Medicare and Medicaid look to rules for the future of healthcare

The Center for Medicare and Medicaid Services (CMS), an agency of the Federal government, has aggressive plans to modernize healthcare administrative systems and Electronic Healthcare Records (EHR).

The use of Rules and Business Process Management are a focal point for the new systems. This session will describe how Medicare and Medicaid work and how the government (Federal and State) is looking for Rules and BPM to help change both the administrative and clinical environments. This session will look at the Medicaid Information Technology Architecture (MITA) and how Rules and BPM can augment this Service Oriented Architecture. We will discuss how to get involved in some of the many projects that are currently underway.

Speaker Bios

Captain Emory Fry

Nathan Bell

Dave Walsh

Dave Walsh is CEO of eServices Group. eServices Group is a software development firm focused on supplying software products to meet the needs of Medicaid and Medicare for over 18 years. Mr. Walsh also chairs the MITA Technical Architecture Committee (TAC). The TAC is an industry collaborative that is focused on supporting the Federal government and States in the definition of the next generation Medicaid systems based on SOA, BPM and rules.

Diego Naya

Esteban Aliverti

Mauricio Salatino

Davide Sottara


Monday, September 19, 2011

Getting started with Drools 5.2 (Mersoft Corporation Blog)
"When I was attempting to learn Drools, I found it difficult to find a good tutorial. I also had a hard time figuring out how to use the rules engine in a stateless, thread-save manner. This tutorial discusses how to set up Drools in Eclipse, how to write the rules, how to execute the rules, how to call methods outside the rules engine, how to use the rules-flow, how to use Drools with Maven2 and how to configure the Drools knowledge base using Spring.

Friday, September 16, 2011

Guided Decision Table magic

Following from my previous blog about the Wizard Framework added to Guvnor I have now had time to complete a Wizard to aid with the creation of new decision tables in Guvnor. This will be available in Drools 5.3, 5.3.CR1 is out end of this week.

The Wizard takes the user through both the condition definition and action definition process, with full immediate visual validation and feedback of errors in the definition that need correcting before the table can be generated:-
  • Adding Facts
  • Adding constraints to these Facts
  • Setting fields on bound Facts
  • Inserting new Facts
What's also exciting is the ability to now generate an expanded form decision table; where rows are created for every combination of discrete condition combinations. An explanation of expanded form can be found here.

It is the first step we are making towards providing expansion and contraction of decision tables in Guvnor.

You can watch a video here.

Thursday, September 15, 2011

Driving Decisions with Business Rules (Webinar)

Title: Driving Decisions with Business Rules (Webinar)
Presenters: James Taylor and Mark Proctor
When: Sep 15, 2011, 13:00 EDT (17:00 GMT)

Wednesday, September 14, 2011

JUDCon London (31 October - 1 November)

The JUDCon conference is coming to London at Park Plaza Victoria on 31 October and 1 November. It's held alongside the JAX London conference.

We're doing a couple of sessions:

Take a look at the rest of the JUDCon agenda (or just register here).

Friday, September 09, 2011

jBPM Form Builder capacities

jBPM Form Builder has started to grow as promised. It is time to make a thorough description of what we have now on this tool.

UI components

So far, you can have any combination of the following elements in your form:

Headers and Labels: The basic two sizes of text most basic users need, for titles and general information.
Images: Images that can be uploaded to Guvnor as generic assets, and viewed from inside the forms. You can see this in action in the video displayed avobe.
HTML Script: Any generic client side script. This proves useful for embedding videos, audio and animation
Line graph: Coming soon, it will allow to use google visualization API to view different graphical options

Here are a couple of screenshots showing some of these components:


Tabbed layout: Allows you to see
Horizontal layout: Lets you display components one next to the other
Border layout:Allows you to display components according to it's cardinal position inside the layout (north, south, west and so on)
CSS based layout: It lets you define a css stylesheet from an outside URL, or upload a css stylesheet as a file to Guvnor while keeping a reference. In this way, any efforts already done by designers can be reused while defining forms for jBPM without having to rewrite any content
Flow layout: As its name suggests, this layout just "goes with the flow" and allows the page configuration to decide how to display it's contents.
Table layout: Creates a table. By right clicking on this table, you can add and remove columns and rows.
Absolute layout: Lets you drop content on an absolute position within the layout, expressed as a cardinal point

Every layout is implemented with the composite method, to allow any other layout inside itself. You can nest layouts in any way you prefer

Input components

Input components are fully represented in the jBPM Form Builder, and more complex components for inputing data will be added soon. At the moment, the supported input components are:

Combo Box
Text Field
Password Field
Text Area
Hidden Field
File Input
Check Box
Radio Buttons

Here's a screenshot showing most of them on a single form, one after the other

We will be adding support for a rich text editor, date pickers with calendar showing and autopopulation of comboboxes soon enough.

Your own custom menu options: Effects library: right clicking on any of the elements dropped on your form can give you options to add special behaviour or conditions to your UI component. Among these, there are:
Cut/Copy/Paste/Remove options: Available for every single component, allow you to move and remove components like any other editor. Control key shortcuts are available for these options, except for remove
Add/remove items to combobox:Opens a popup panel to fill label and value
Resizing options:Allows for resizing of the selected component, by dragging it's lower right corner
Moving: Allows you to move a component to a different position once it was dropped in the form
Internationalization: Available for labels, headers and images' alternative text, it allows to set different texts for each locale you want to cover.
Zone formatting Useful for date, currency and floating point values, whose representation changes according to localization
Uploading files: Allows you to upload images, css files, javascript files, and anything you might need for your component.
Add row/tab - Remove row/tab options:Only available for table and tab layouts, allows you to modify them.
Event handling:Opens a popup to define javascript for any browser event of your components.
Linking IO data to a UI component:Useful to link data input and output from a task to your particular component of the form
Your own personal effects: You can configure (through a json configuration file on the server side) what effects will be allowed for each component. This will prove useful eventually, as we include roles for the form builder users.

All these functionalities are only the beggining and any help to determine the next step is welcome. Any suggestions are welcome. Cheers from Argentina, and have a great weekend!


Monday, September 05, 2011

Rules Fest Last Minute Medical Meetup Speakers Wanted

Rules Fest is very close (24-28th of October, San Francisco) and this year RHT are sponsoring the bootcamps to a high level to ensure that they are made freely available to all.

Thu the 27th will follow the normal intro format as previous years, along with time to ask questions of core developers.

At the last minute budget was found for an additional day on Friday the 28th. Due to the success of the healthcare meet up in San Diego 2010, we would like to try and dedicate this day to healthcare.

We would like this day to be 100% community presented, by real practitioners. If you are doing anything interesting in the areas of healthcare related to rules, workflow, events, ontologies, distributed intelligent agents and would like to talk, please contact me asap: mproctor at codehaus d0t org.

The talks do not need to be Drools specific, but it should be relevant to any one looking to do Open Source based technology implementations of the previously mentioned areas. Applied, theoritcal and technical talks are all welcome. 30 minute or 60 minute durations are all fine.

Again sorry for the last minute notice, but hopefully we can still make this into a great community oriented day.


Drools Project Lead and Co-creator

----- update ----
Full details of the event can now be fund here:

Thursday, September 01, 2011

Guvnor Wizard Framework

I was asked by Mark Proctor to add a Wizard to Guvnor facilitating the creation of a guided Decision Table (i.e. the web-based one!) by Business Users. As a pre-cursor to the specific Wizard in question I needed a generic Wizard framework...

I wrote a framework in Guvnor that others can hopefully use to write their own Wizards. Other developers can write their own Wizards by implementing only the following requirements:-
  • Extend AbstractWizard. AbstractWizard is the base-class for the whole Wizard.
  • Write a series of Wizard pages implementing WizardPage. WizardPage is an interface for a single page of the whole Wizard.
  • Write a Wizard context implementing WizardContext. WizardContext is used in conjunction with WizardPlace by MVP to launch the correct Wizard.
  • AmendWizardFactoryImpl to return an instance of your Wizard depending upon the WizardContext. WizardFactoryImpl is used to create an instance of the correct Wizard based upon the WizardContext. The framework is not meant for run-time extension and hence reflection has not been used.
Here's a screenshot of a Wizard:-

As always, a video of operation, is available here.

Now I have this in place I can carry on writing the required Wizard :)