Friday, June 17, 2016

UberFire Forms Builder for jBPM

The new UberFire form builder, that will be part of the jBPM 7.0 distribution, is making great progress. Underneath it is a Bootstrap grid system, but it addresses the issue of other Bootstrap layout builders that require the user to explicit add the grid layout first. Instead it dynamically alters the underlying grid as the user drags and places the components. The same builder code will be used for the latest DashBuilder dashboards too. There are more CSS improvements to come, but you can watch a video below (don't forget to turn on HD and watch it full screen), demonstrating nested form capabilities. Eventually you should be able to build and deploy these types of applications live on OpenShift. Good work Pere and Eder.


Wednesday, June 08, 2016

Tutorial oriented user guides for Drools and jBPM

Community member Nicolas Heron, is creating tutorial oriented user guides for Drools and jBPM (Red Hat BRMS and BPMS). He’s focusing on the backends first, but it will eventually cover all the web tooling too, as well as installation and setup.

All this work is available from bitbucket, using asciidoc and gitbook (free for public projects), so I encourage you all to get involved and help Nicolas out by reviewing and providing feedback.

Click the Table of Contents, to get started

Or just read the pdf:

He’s just finished the Drools parts, and will moving onto other areas next.


DecisionCamp And RuleML 2016, 6-9 July New York

This year RuleML 2016 is hosted by Stony Brook University, New York USA. Decision Camp 2016 is co-locating at the same event. I'll be presenting at DecisionCamp and helping to chair the industrial track at RuleML. Looking forward to seeing everyone there and spending a week immersed in discussions on reasoning systems :)

RuleML Schedule

Decision Camp Schedule(pasted below)

July 6, 2016

OMG DMN 1.2 RTF Meeting at DecisionCAMP 10:00 - 17:00 
The Revision Task Force (RTF) for DMN 1.2 will be meeting in at the Stony Brook University, room NCS 220. The meeting is open only 
to members of the RTF, but others are welcome to meet members of the RTF at the DecisionCAMP on 7th and 8th. 

July 7, 2016

9:009:15Welcome and KickoffJacob Feldman
9:1510:00Modeling Decision-Making Processes: Melding Process Models and Decision ModelsAlan Fish
10:0010:15Coffee Break
10:1510:50Oracle Decision Modeling ServiceGary Hallmark, Alvin To
10:5011:25Decision Management at the Speed of EventsDaniel Selman
11:2512:00Factors Affecting Rule PerformanceCharles Forgy 
12:0012:35DMN: how to satisfy multiple objectives?Jan Vanthienen
12:3514:00Lunch Break
14:0015:00Natural Language Access to Data: It Needs Reasoning
(RuleML Keynote)
Richard Waldinger
15:0015:35Welcome to Method for Parsing Regulations into DMNTom Debevoise, Will Thomas
15:3516:10Using Machine Learning, Business Rules, and Optimization for Flash Sale PricingIgor Elbert, Jacob Feldman
16:1016:25Coffee Break
16:2517:00Improving BRMS Efficiency and Performance and Using Conflict ResolutionJames Owen, Charles Forgy
17:00.18:00QnA Panel "DMN from OMG, Vendor, and Practitioner Perspectives"Moderated by Bruce Silver
19:00-Joint Dinner
July 8, 2016 

9:0010:00DMN as a Decision Modeling Language
(RuleML Keynote)
Bruce Silver
10:0010:15Coffee Break
10:1510:50Solving the "Last Mile" in model based developmentLarry Goldberg
10:5011:25What-If Analyzer for DMN-based Decision Models(Challenge Demo)Jacob Feldman
11:2512:00Advanced Decision Analytics via Deep Reasoning on Diverse Data: For Health Care and MoreBenjamin Grosof, Janine Bloomfield
12:0012:35The Decision Boundary Map: An Interactive Visual Interface to Make Informed Decisions and Selections in the Presence of TradeoffsShenghui Cheng, Klaus Mueller
12:3514:00Lunch Break
15:1515:50Learning Rule Base Programming with Classic Computer GamesMark Proctor


Wednesday, June 01, 2016

Parallel Drools is coming - 12 core machine benchmark results

We are working on a number of different usage patterns for multi-core processing. Our first attempt is at fireAllRules batch processing (no rule chaining) of 1000 facts against increasing 12, 48, 192, and 768 rules - one join per rule. The break even point is around 48 rules. Below 48 rules the running time was less than 100ms and the thread co-ordination costs starts to cancel out the advantage. But after 48 rules, things get better, much faster.

Smaller is better (ms/op)

The running machine is 12 cores, which we put into 12 partitions and rules are evenly split across partitions. This is all organised by the engine, and not end user code. There are still a lot more improvements we can do, to get more optimal rule to partition assignment and to avoid sending all data to all partitions.

Next we'll be turning out attention to long running fireUntilHalt stream use cases.

We don't have any code yet that others can run, as it's still a bit of hack. But as we progress, we'll tidy things up and try and get it so others can try it.


Friday, May 27, 2016

Drools & jBPM are Hiring - Web Developer needed for Low-Code/No-Code framework

This position is now filed. Thank you.
The Drools & jBPM projects are looking to hire a web developer to help build and improve our low-code/no-code web framework and workbench. This framework is trying to make it possible to model business applications, end to end, fully within a web based environment - utilising data models, forms, workflow, rules, and case management.

The initial focus of the work will be around improving how the workbench uses and exposes Git and Maven. You'll be expected to figure out a Git workflow, suitable for our target users and build a UI to simplify how they work with that. This will also include some pull request like system, to control code reviews and code contributions. The main aim will be to simplify and hide as much complexity as possible. You will be working extensibly with our User Experience group to achieve these goals.

Over time you will tackle other aspects of our low-code/no-code framework and it will be expected that a percentage of your time will help with general sustaining across the product - i.e. bug fixing and maintenance.

We are looking for someone passionate about software development, who can demonstrate they love what they do - such as contributing to open source projects in their own time.

The work will make extensive use of Java, GWTErrai and UberFire.  You do not need GWT, Errai or UberFire experience, but you should have a strong understanding of general web technologies and a willingness to learn. A working knowledge of Git and Maven will be necessary, and you will be asked to give ideas on how to achieve a workflow that is more suitable for less technical people. No prior experience of rules or workflow is necessary, but helps.

The role is remote and can be in any location for which Red Hat has an office. Salaries are based on country ranges and you should check salary suitability with the recruiter. You may apply through this generic job requisition page.


Friday, May 13, 2016

#Drools & #jBPM @ #JBCNConf 2016 (Barcelona, June)

Great news! Once again the amazing and flamboyant leaders of the Java User Group from Barcelona manage to put together their anual conference JBCNConf. And, of course, Drools & jBPM will be there. Take a look at their website for more information about the talks and speakers, and if you are close enough to Barcelona I hope to see you all there.
This year I will be doing a Drools Workshop there (Thursday, first day of the conference), hoping to introduce people to Drools in a very hands on session. So if you are looking to start using Drools straight away, this is a great opportunity to do so. If you are a more advanced user and wants to bring your examples or issues to the workshop you are more than welcome. I will be sharing the projects that I will be using on the workshop a couple of weeks before the event so  can take a look and bring more questions to the session. It is also probable that I will be bringing with me freshly printed copies of the new Mastering Drools book, so you might be able to get some copies for free :)
Maciej Swiderski will be covering the jBPM and Knowledge Driven Microservices this year. I totally recommend this talk to anyone interested in how to improve your micro services by adopting tools to formalise and automate domain specific knowledge.
Finally, this year Maciej and I will be given the closing talk of the conference titled : The Open Source Way were we will be sharing with the audience the main benefits of getting involved with the open source community & projects but most importantly we will be sharing how to do achieve that. If you are already an Open Source project contributor and you plan to attend to the conference, get in touch!
Stay tuned for more news, and get in touch if you want to hang around with us before and after the conference!


Monday, May 09, 2016

New 6.4.0.Final tags for community Docker images

The latest Docker community image tags for 6.4.0.Final are now available on Docker Hub.

More information at the following links:


Monday, April 18, 2016

Drools 6.4.0.Final is available

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

This is an incremental release on our previous build that brings several improvements in the core engine and the web workbench.

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.

Drools Workbench

New look and feel

The general look and feel in the entire workbench has been updated to adopt PatternFly. The update brings a cleaner, lightweight and more consistent user experience throughout every screen. Allowing users focus on the data and the tasks by removing all unnecessary visual elements. Interactions and behaviour remain mostly unchanged, limiting the scope of this change to visual updates.

Various UI improvements

In addition to the PatternFly update described above which targeted the general look and feel, many individual components in the workbench have been improved to create a better user experience. This involved making sure the default size of modal popup windows is appropriate to fit the corresponding content, adjusting the size of text fields as well as aligning labels, and improving the resize behaviour of various components when used on smaller screens.

New Locales

Locales ru (Russian) and zh_TW (Chineses Traditional) have now been added.

New Decision Server Management UI

The KIE Execution Server Management UI has been completely redesigned to adjust to major improvements introduced recently. Besides the fact that new UI has been built from scratch and following best practices provided by PatternFly, the new interface expands previous features giving users more control of their servers.

Core Engine

Better Java 8 compatibility

It is now possible to use Java 8 syntax (lambdas and method references) in the Right Hand Side (then) part of a rule.

More robust incremental compilation

The incremental compilation (dynamic rule-base update) had some relevant flaws when one or more rules with a subnetwork (rules with complex existential patterns) were involved, especially when the same subnetwork was shared among different rules. This issue required a partial rewriting of the existing incremental compilation algorithm, followed by a complete audit that has also been validated by brand new test suite made by more than 20,000 test cases only in this area.

Improved multi-threading behaviour

Engine's code dealing with multi-threading has been partially rewritten in order to remove a large number of synchronisation points and improve stability and predictability.

OOPath improvements

OOPath has been introduced with Drools 6.3.0. In Drools 6.4.0 it has been enhanced to support a number of new features.


Oficial Wildfly Swarm #Drools Fraction

Oficial what? Long title for a quite small but useful contribution. Wildfly Swarm allows us to create rather small and self contained application including just what we need from the Wildfly Application Server. On this post we will be looking at the Drools Fraction provided to work with Wildfly Swarm. The main idea behind this fraction is to provide a quick way to bundle the Drools Server among with your own services inside a jar file that you can run anywhere.

Microservices World

Nowadays, while micro services are a trending topic we need to make sure that we can bundle our services as decoupled from other software as possible. For such a task, we can use Wildfly Swarm that allows us to create our services using a set of fractions instead of a whole JEE container. It also saves us a lot of time by allowing us to run our application without the need of downloading or installing a JEE container. With Swarm we will be able to just run java -jar <our services.jar> and we are ready to go.
In the particular case of Drools, the project provides a Web Application called Kie-Server (Drools Server) which offers a set of REST/SOAP/JMS endpoints to use as a service. You can load your domain specific rules inside this server and create new containers to use your different set of rules. But again, if we want to use it, we will need to worry about how to install it in Tomcat, Wildfly, Jetty, WebSphere, WebLogic, or any other Servlet Container. Each of these containers represent a different challenge while it comes to configurations, so instead of that we can start using the Wildfly Swarm Drools Fraction, which basically enables the Drools Server inside your Wildfly Swarm application. In a way you are bundling the Drools Server with your own custom services. By doing this, you can start the Drools Server by doing java -jar <your.jar> and you ready to go.
Imagine the other situation of dealing with several instances of Servlet Containers and deploying the WAR file to each of those containers. It gets worst if those containers are not all the same "brand" and version.
So let's take a quick look at an example of how you can get started using the Wildfly Swarm Drools Fraction.


I recommend you to take a look at the Wildfly Swarm Documentation first, to get you started on using Wildfly Swarm. If you know the basics, then you can include the Drools Fraction.
I've created an example using this fraction here:
The main goal of this example is to show how simple is to get you started with the Drools Fraction, and for that reason I'm not including any other service in this project. You are not restricted by that, and you can expose your own endpoints.
Notice in the pom.xml file two things:
  1. The Drools Server Fraction: By adding this dependency, the fraction is going to be activated while Wildfly Swarm bootstrap.
  2. The wildfly-swarm plugin: Notice in the plugin configuration that we are pointing to the App class which basically just start the container. (This can be avoided, but I wanted to show that if you want to start your own services or do your own deployments you can do that inside that class)
If you compile and package this project by doing mvn clean install, you will find in the target/ directory a file called:
drools-server-swarm-1.0-SNAPSHOT-swarm.jar which you can start by doing

java -jar drools-server-swarm-1.0-SNAPSHOT-swarm.jar

For this example, we will include one more flag when we start our project to make sure that our Drools Server can resolve the artefacts that I'm going to use later on, so it will be like this:

java -Dkie.maven.settings.custom=../src/main/resources/settings.xml -jar drools-server-swarm-1.0-SNAPSHOT-swarm.jar

By adding the "kie.maven.setting.custom" flag here we are letting the Drools Server know that we had configured an external maven repository to be used to resolve our artefacts. You can find the custom settings.xml file here.
Once you start this project and everything boots up (less than 2 seconds to start wildfly-swarm core + less than 14 to boot up the drools server) you are ready to start creating your KIE Containers with your domain specific rules.
You can find the output of running this app here. Notice the binding address for the http port:
WFLYUT0006: Undertow HTTP listener default listening on [0:0:0:0:0:0:0:0]:8083
Now you can start sending requests to http://localhost:8083/drools to interact with the server.
I've included in this project also a Chrome's Postman project for you to test some very simple request like:
  • Getting All the registered Containers -> GET http://localhost:8083/drools/server/containers
  • Creating a new container - > PUT http://localhost:8083/drools/server/containers/sample
  • Sending some commands like Insert Fact + Fire All Rules -> POST http://localhost:8083/drools/server/containers/instances/sample
You can import this file to Postman and fire the requests against your newly created Drools Server. Besides knowing to which URLs to PUT,POST or GET data, you also need to know about the required headers and Authentication details:
Authentication -> Basic
User: kieserver
Password: kieserver1!
Finally, you can find the source code of the Fraction here:
There are tons of things that can be improved, helpers to be provided, bugs to be fixed, so if you are up to the task, get in touch and let's the Drools fraction better for everyone.

Summing up

While I'm still writing the documentation for this fraction, you can start using it right away. Remember that the main goal of these Wildfly Swarm extensions is to make your life easier and save you some time when  you need to get something like the Drools Server in a small bundle and isolated package that doesn't require a server to be installed and configured.
If you have any questions about the Drools Fraction don't hesitate to write a comment here.


Wednesday, April 06, 2016

User and group management in jBPM and Drools Workbenches


This article talks about a new feature that allows the administration of the application's users and groups using an intuitive and friendly user interface that comes integrated in both jBPM and Drools Workbenches.

User and group management
Before the installation, setup and usage of this feature, this article talks about some previous concepts that need to be completely understood for the further usage.

So this article is split in those sections:
  • Security management providers and capabilities
  • Installation and setup
  • Usage
  • This feature is included from version 6.4.0.Final.
  • Sources available here.

Security management providers

A security environment is usually provided by the use of a realm. Realms are used to restrict the access for the different application's resources. So realms contains information about the users, groups, roles, permissions and and any other related information.

In most of the typical scenarios the application's security is delegated to the container's security mechanism, which consumes a given realm at same time. It's important to consider that there exist several realm implementations, for example Wildfly provides a realm based on the files, Tomcat provides a realm based on the tomcat-users.xml file, etc. So keep in mind that there is no single security realm to rely on, it can be different in each installation.

The jBPM and Drools workbenches are not an exception, they're build on top Uberfire framework (aka UF), which delegates the authorization and authentication to the underlying container's security environment as well, so the consumed realm is given by the concrete deployment configuration.

Security management providers

Due to the potential different security environments that have to be supported, the users and groups management provides a well defined management services API with some default built-in security management providers. A security management provider is the formal name given to a concrete user and group management service implementation for a given realm.

At this moment, by default there are three security management providers available:
Keep updated on new security management providers on further releases. You can easily build and register your own security management provider if non of the defaults fits in your environment.

Security management providers's capabilities

Each security realm can provide support different operations. For example consider the use of a Wildfly's realm based on properties files,  The contents for the is like:


As you can see, it's based on key-value pairs where the key is the username, and the value is the hashed value for the user's password. So a user is just defined by the key, by its username, it  does not have a name nor address, etc.

On the other hand, consider the use of a realm provided by a Keycloak server. The information for a user is composed by more user meta-data, such as surname, address, etc, as in the following image:

Admin user edit using the Keycloak sec. management provider

So the different services and client side components from the users and group management API are based on capabilitiesCapabilities are used to expose or restrict the available functionality provided by the different services and client side components. Examples of capabilities are:
  • Create user
  • Update user
  • Delete user
  • Update user attributes
  • Create group
  • Assign groups
  • Assign roles 
  • etc

Each security management provider must specify a set of capabilities supported. From the previous examples you can note that the Wildfly security management provider does not support the capability for the management of the attributes for a user - the user is only composed by the user name. On the other hand the Keycloak provider does support this capability.

The different views and user interface components rely on the capabilities supported by each provider, so if a capability is not supported by the provider in use, the UI does not provide the views for the management of that capability. As an example, consider that a concrete provider does not support deleting users - the delete user button on the user interface will be not available.

Please take a look at the concrete service provider documentation to check all the supported capabilities for each one, the default ones can be found here.

If the security environment is not supported by any of the default providers, you can build your own. Please keep updated on further articles about how to create a custom security management provider.

Installation and setup

Before considering the installation and setup steps please note the following Drools and jBPM distributions come with built-in, pre-installed security management providers by default:
  • Wildfly / EAP distribution - Both distributions use the Wildfly security management provider configured for the use of the default realm files and
  • Tomcat distribution - It uses the Tomcat security management provider configured for the use of the default realm file tomcat-users.xml
If your realm settings are different from the defaults, please read each provider's documentation in order to apply the concrete settings.

On the other hand, if you're building your own security management provider or need to include it on an existing application, consider the following installation options:
  • Enable the security management feature on an existing WAR distribution
  • Setup and installation in an existing or new project (from sources)
NOTE: If no security management provider is installed in the application, there will be no available user interface for managing the security realm. Once a security management provider is installed and setup, the user and group management user interfaces are automatically enabled and accessible from the main menu.

Enable the security management feature on an existing WAR distribution
Given an existing WAR distribution of either Drools and jBPM workbenches, follow these steps in order to install and enable the user management feature:

  1. Ensure the following libraries are present on WEB-INF/lib:
    • WEB-INF/lib/uberfire-security-management-api-6.4.0.Final..jar
    •  WEB-INF/lib/uberfire-security-management-backend-6.4.0.Final..jar
  2. Add the concrete library for the security management provider to use in WEB-INF/lib:
    • Example: WEB-INF/lib/uberfire-security-management-wildfly-6.4.0.Final..jar
    • If the concrete provider you're using requires more libraries, add those as well. Please read each provider's documentation for more information.
  3. Replace the whole content for file WEB-INF/classes/, or if not present, create it. The settings present on this file depend on the concrete implementation you're using. Please read each provider's documentation for more information.
  4. If you're deploying on Wildfly or EAP, please check if the WEB-INF/jboss-deployment-structure.xml requires any update. Please read each provider's documentation for more information.

Setup and installation in an existing or new project (from sources)

If you're building an Uberfire based web application and you want to include the user and group management feature, please read this instructions.

Disabling the security management feature

he security management feature can be disabled, and thus no services or user interface will be available, by any of

  • Uninstalling the security management provider from the application

    When no concrete security management provider installed on the application, the user and group management feature will be disabled and no services or user interface will be presented to the user.
  • Removing or commenting the security management configuration file

    Removing or commenting all the lines in the configuration file located at WEB-INF/classes/ will disable the user and group management feature and no services or user interface will be presented to the user.


The user and group management feature is presented using two different perspectives that are available from the main Home menu (considering that the feature is enabled) as:
User and group management menu entries
Read the following sections for using both user and group management perspectives.

User management

The user management interface is available from the User management menu entry in the Home menu.

The interface is presented using two main panels:  the users explorer on the west panel and the user editor on the center one:

User management perspective

The users explorer, on west panel, lists by default all the users present on the application's security realm:

Users explorer panel
In addition to listing all users, the users explorer allows:

  • Searching users

    When specifying the search pattern in the search box the users list will be reduced and will display only the users that matches the search pattern.

    Search patterns depend on the concrete security management provider being used by the application's. Please read each provider's documentation for more information.
  • Creating new users:

    By clicking on the Create new user button, a new screen will be presented on the center panel to perform a new user creation.
The user editor, on the center panel, is used to create, view, update or delete users. Once creating a new user o clicking an existing user on the users explorer, the user editor screen is opened. 

To view an existing user, click on an existing user in the Users Explorer to open the User Editor screen. For example, viewing the admin user when using the Wildfly security management provider results in this screen:

Viewing the admin user
Same admin user view operation but when using the Keycloak security management provider, instead of the Wildfly's one, results in this screen:

Using the Keycloak sec. management provider
As you can see, the user editor when using the Keycloak sec. management provider includes the user attributes management section, but it's not present when using the Wildfly's one. So remember that the information and actions available on the user interface depends on each provider's capabilities (as explained in previous sections),

Viewing a user in the user editor provides the following information (if provider supports it):
  • The user name
  • The user's attributes
  • The assigned groups
  • The assigned roles
In order to update or delete an existing user, click on the Edit button present near to the username in the user editor screen:

Editing admin user
Once the user editor presented in edit mode, different operations can be done (if the security management provider in use supports it):
  • Update the user's attributes

    Existing user attributes can be updated, such as the user name, the surname, etc. New attributes can be created as well, if the security management provider supports it.
  • Update assigned groups

    A group selection popup is presented when clicking on Add to groups button:

    This popup screen allows the user to search and select or deselect the groups assigned for the user currently being edited.
  • Update assigned roles

    A role selection popup is presented when clicking on Add to roles button:

    This popup screen allows the user to search and select or deselect the roles assigned for the user currently being edited.
  • Change user's password

    A change password popup screen is presented when clicking on the Change password button:

  • Delete user

    The currently being edited user can be deleted from the realm by clicking on the Delete button. 
Group management

The group management interface is available from the Group management menu entry in the Home menu.

The interface is presented using two main panels:  the groups explorer on the west panel and the group editor on the center one:

Group management perspective
The groups explorer, on west panel, lists by default all the groups present on the application's security realm:

Groups explorer
In addition to listing all groups, the groups explorer allows:

  • Searching for groups

    When specifying the search pattern in the search box the users list will be reduced and will display only the users that matches the search pattern.
    Groups explorer filtered using search
    Search patterns depend on the concrete security management provider being used by the application's. Please read each provider's documentation for more information.
  • Create new groups

    By clicking on the Create new group button, a new screen will be presented on the center panel to perform a new group creation. Once the new group has been created, it allows to assign users to it:
    Assign users to the recently created group
The group editor, on the center panel, is used to create, view or delete groups. Once creating a new group o clicking an existing group on the groups explorer, the group editor screen is opened. 

To view an existing group, click on an existing user in the Groups Explorer to open the Group Editor screen. For example, viewing the sales group results in this screen:

Viewing the sales group
To delete an existing group just click on the Delete button.