Wednesday, May 26, 2010

Drools 5.1 M2 release notes

We're proud to announce the second milestone release of Drools 5.1. It includes a lot of new features, as described below. So try them out and let us know what you think.

Knowledge Agent

Incremental change-set processing

The new version of the Knowledge Agent supports newInstance = false in its configuration (incremental change-set build). When setting this property to false, the kbase instance of the agent is reused when changes in the monitored resources are detected.

Now Knowledge Agent can process monitored resources modifications in an incremental way.

Modified definitions are compiled and compared against the original version. According to definition's type, the behaves in different ways:

Rules: For rules, the Agent searches for modifications in its attributes, LHS and RHS.

Queries: queries are always replaced on kbase wether they are modified or not.

Other definitions: All other definitions are always replaced in kbase (like if they were modified). We expect to add better support for definition's modification detection in further versions.

The current implementation only supports the deletion of rules and functions definitions. For further information please take a look at:

Live Querries

Drools has always had query support, but the result was returned as an iterable set; this makes it hard to monitor changes over time. Live Querries have a listener attached instead of returning an iterable result set. These live querries stay open creating a view and publish change events for the contents of this view.

Drools Camel Integration:

The Apache Camel integration let us interact with a Drools stateless or stateful session. The interaction is achieved using a pipeline that transforms the input command (right now an XML representation of the command) into an executable one. Also Apache Camel let us implement more advanced enterprise integration patterns than a simple transformation pipeline.

So, you can use any of the out-of-the-box Camel Components as a Drools commands producer, which allow to create more powerful services interactions. At this moment, we provide out-of-the-box marshallers for XStream & JAXB.

If you want to read more about how to configure and use the Drools Camel endpoint take a look at the following link:http://lucazamador.wordpress.com/2010/05/28/drools-apache-camel-integration/

Drools Execution Server:

A new version of Drools Server is included in this release. This version add the support for Stateful Knowledge Sessions. Internally, for this new version, we use drools-camel, drools-spring and drools-grid to provide the following list of new features:

You can read more about this in the following blog post: http://lucazamador.wordpress.com/2010/05/27/drools-server-spring-configuration/

Extensive BPMN 2.0 support

As we already announced earlier, the Drools team has decided to support the use of the upcoming BPMN 2.0 specification for specifying business processes using XML. This milestone includes a significant extension of the BPMN2 parser to support more of the BPMN2 features using Drools Flow. More specifically:

more extensive event support: much more combinations of event types (start, intermediate and end) and event triggers (including for example error, escalation, timer, conditional and signal events), have been included, as well as (interrupting and non-interrupting) boundary events

sub-process parameters

diverging inclusive gateway

etc.

BPMN2 processes have also been integrated in the entire Drools tool chain, to support the entire life cycle of the business process. This includes

the ability to use BPMN2 processes in combination with our Eclipse tooling

Guvnor as process repository

web-based management using the BPM console

auditing and debugging

domain-specific processes

etc.

As a result, Drools Flow is not only the first open-source process engine that supports such a significant set of BPMN2 constructs natively, our knowledge-oriented approach also allows you to easily combine your BPMN2 processes with business rules and complex event processing, all using the same APIs and tools.

Installation script

The Drools build now contains an install folder that simplifies installing the Eclipse plugin, Guvnor and the gwt-console. It creates and copies the necessary jars and wars and deploys them to the JBoss AS. It also includes a simple evaluation process example you can use to test your setup. For more info, take a look at the readme in the install folder.

JMX Monitoring improvements

The JMX monitoring framework was improved to include process related statistics. JOPR plugin was also updated to show such data.

Session Inspection and Reporting framework

A new API based framework for runtime session inspection and reporting was introduced, allowing for better data gathering during debugging or profiling of the application. This inspection framework will become the basis of the tooling features to help providing more detailed information about the contents of each session.

The StatefulKnowledgeSessionInfo instance will contain a lot of relevant data gathered during the analysis of the session. A simple example report template is provided and can be generated with the following API call:

Templates

There is a new knowledge you can add to the base. You can create rules based on a data grid attached to a rule template. This will allow the user to don't write repetitive rules who only changes the value of the facts.

Working Sets

Working Sets are a mean for grouping Facts and then defining constraints on them. You can create groups of Facts and only those Facts will be visible when authoring rules using the Guided Editor.

Fact Constraints

Once you have grouped facts in a Working Set you can define restrictions on those facts' fields. The restrictions that you define will be used to validate what you can write on rules.For further information you can read: