Monday, October 31, 2016

Drools 7 to support DMN (Decision Model and Notation)

The Decision Model and Notation (DMN) specification is a relatively new standard by OMG (Object Management Group) that aims to do for business rules and business decisions what BPMN (it's sibling specification) did for business processes: standardize the notation and execution semantics to enable both its use by business users, and the interchange of models between tools from different vendors.

The Drools team has been actively following the specification and the direction it is taking. The team believes that, in accordance with its long time commitment to open standards, it is now time to support the specification and provide a compliant implementation for the benefit of its users.

The specification defines among other things:


  1. an expression language called FEEL used to express constraints and decisions
  2. a graphical language to model decision requirements
  3. a metamodel and runtime semantics for decision models
  4. an XML-based interchange format for decision models


As part of the investigation, the Drools team implemented a PoC that is now public and available here. The PoC already covers:


  • a complete, compliance level 3, FEEL language implementation.
  • complete support for the XML-based interchange format for marshalling and unmarshalling.
  • A partial implementation of the metamodel and runtime semantics 

We expect to have a complete runtime implementation released with Drools 7.0 (expected for Q1/2017).

On a related note, this is also a great opportunity for community involvement. This being a standard implementation, and relatively isolated from other existing components, it is the perfect chance for any community member that wishes to get involved with Drools and open source development to get his/her hands dirty and help bring this specification to life. Contact me on the Drools mailing list or on IRC if you would like to help.

We will publish over the next few weeks several blogs on this subject, with both general explanations about the specification and with details of our plans and our implementation. Bellow you can find a quick Q&A. Feel free to ask additional questions you might have about this subject on the mailing list.

Happy Drooling!

Questions & Answers


1. What DMN version and what compliance level will Drools support?

Drools is implementing DMN version 1.1 support at compliance level 3.

2. Is DMN support integrated with the Drools platform?

Yes, the DMN implementation leverages the whole Drools platform (including, among other things, the deployment model, infrastructure and tooling). DMN models are a first class citizen in the platform and an additional asset that can be included in kjars. DMN models will be supported in the kie-server and decision services exposed via the usual kie-server interfaces.

3. Is Drools DMN integrated with jBPM BPMN?

At the moment of this announcement, the integration is not implemented yet, but we expect it will be fully functional by the time Drools and jBPM 7.0 release (Q1 2017).

4. Will FEEL be a supported dialect for DRL rules? 

At the moment this is not clear and requires additional research. While FEEL works well as part of the XML-based interchange format, its syntax (that supports spaces and special characters as part of identifiers) is ambiguous and cannot be easily embedded into another language like DRL. We will discuss this topic further in the upcoming months.


Share/Bookmark

Tuesday, October 25, 2016

Drools 6.5.0.Final is available

The latests and greatest Drools 6.5.0.Final release is now available for download.

This is an incremental release on our previous build that focus on a few key improvements to round up the 6.x series.

You can find more details, downloads and documentation here:

Read below some of the highlights of the release.

You can also check the new releases for:
Happy drooling.

What's new?

Core Engine

Configurable ThreadFactory 


Some runtime environments (like for example Google App Engine) don't allow to directly create new Threads. For this reason it is now possible to plug your own ThreadFactory implementation by setting the system property drools.threadFactory with its class name.

Use of any expressions as input for a query 


It is now possible to use as input argument for a query both the field of a fact as in:

query contains(String $s, String $c)
    $s := String( this.contains( $c ) )
end

rule PersonNamesWithA when
    $p : Person()
    contains( $p.name, "a"; )
then
end 

Update with modified properties 

Property reactivity has been introduced to avoid unwanted and useless (re)evaluations and allow the engine to react only to modification of properties actually constrained or bound inside of a given pattern. However this feature is automatically available only for modifications performed inside the consequence of a rule. Conversely a programmatic update is unaware of the object’s properties that have been changed, so it is unable of using this feature.

To overcome this limitation it is now possible to optionally specify in an update statement the names of the properties that have been changed in the modified object as in the following example:

Person me = new Person("me", 40);
FactHandle meHandle = ksession.insert( me );

me.setAge(41);
me.setAddress("California Avenue");
ksession.update( meHandle, me, "age", "address" ); 

Monitoring framework improvements 

A new type of MBean has been introduced in order to provide monitoring of the KieContainers, and the JMX MBeans hierarchical structure have been revisited to reflect the relationship with the related MBeans of the KieBases. The JMX objectnaming has been normalized to reflect the terminology used in the Kie API.A new type of MBean has been introduced in order to provide monitoring for Stateless KieSession, which was not available in previous releases.

Drools Workbench

Guided Rule Editor : Support formulae in composite field constraints 

Composite field constraints now support use of formulae. When adding constraints to a Pattern the "Multiple Field Constraint" selection ("All of (and)" and "Any of (or)") supports use of formulae in addition to expressions.

Authoring - Project Editor - Reimport button 

The "Reimport" button invalidates all cached dependencies, in order to handle scenarios where a specific dependency was updated without having its version modified.
Share/Bookmark