Subscribe: Drools - Business Logic integration Platform
Added By: Feedage Forager Feedage Grade A rated
Language: English
drools  engine  game  kie server  kie  management  new  rules  security management  security  server  service  user  wildfly 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Drools - Business Logic integration Platform

Drools & jBPM

All things Artificial Intelligence related: Rules, Processes, Events, Agents, Planning, Ontologies and more :)

Last Build Date: Wed, 26 Oct 2016 03:05:10 +0000


Drools 6.5.0.Final is available

Tue, 25 Oct 2016 21:33:00 +0000

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:Drools websiteDownloadsDocumentationRelease NotesRead below some of the highlights of the release.You can also check the new releases for:jBPMOptaplannerHappy drooling.What's new?Core EngineConfigurable 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 ) )endrule PersonNamesWithA when $p : Person() contains( $, "a"; )thenend 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 WorkbenchGuided 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. [...]

Google Summer of Code 2016: Drools & Minecraft

Thu, 29 Sep 2016 11:49:00 +0000

Another successful Google Summer of Code program took place this year. We worked together with Samuel Richardson from the USA to get the first integration between the Drools Engine and the popular game engine Minecraft. The scope of the project was to experiment how Drools can be used to declaratively define a game's logic. I initially thought about modelling point & click games such as Escape The Room, Monkey Island, Maniac Mansion, etc but after looking at how to work with Minecraft I've opened the concept to wider game definitions. We worked with Sam into creating a generic game engine that will take the Rules Definitions and drive the game (the Minecraft Mods) . Sam created a couple of Minecraft MODs that provides a scenario for the game which interacts and delegate to Drools the game's logic.You can find the work for the Drools Game Engine here: the two mods projects here: and two games are using the rules described here: here: spent a lot of time in trying to get the separation right, so now you can consume the game server itself indepentendly of the UI. This opens up the doors so you can use the engine withoug Minecraft. For that reason we have created also a set of services that exposes the Game Engine via rest in case that you want to interact with it remotely.You can take a look at the main GameSession interface which is in charge of defining how to create new game sessions and enables the UI to register callbacks so actions can be executed when the logic of the game says so. of this separation you will see that each game has its own test suite where both, the Rules and the GameSession API is tested to make sure that new games can be created and the rules are behaving as expected.There is a lot of things to improve still, both in the Game Engine and in the MODs, so feel free to get in touch with us if you want to participate on the project. Hopefully we can build enough features to include it in the Drools Project. [...]

Red Hat BPMS and BRMS 7.0 Roadmap Document - With a Focus on UI Usability

Wed, 17 Aug 2016 00:27:00 +0000

BPMS and BRMS  6.x put in a lot of foundations, but the UI aspects fell short in a number of areas with regards to maturity and usability.In the last 4 years Red Hat has made considerable investment into the BPMS and BRMS space. Our engineering numbers have tripled, and so have our QE numbers. We also now have a number of User Experience and Design (UXD0 people, to improve our UI designs and usability.The result is we hope the 7x series will take our product to a whole new level, with a much stronger focus on maturity and usability, now with the talent and bandwidth to deliver.We had an internal review where we had to demonstrate how we were going to go about delivering a kick ass product in 7.0. I thought I would share, in this blog, what we produced, which is a roadmap document with a focus on UI Usability. The live version can be found at google docs, here - feel free to leave comments.Enjoy :)MarkBPMS and BRMS Platform Architect.Other Links:Drools 7.0 Happenings  (Includes videos)Page and Form Builder Improvements (Video blog)Security Management (Detailed blog on 7.0 improvements)User and Group Management (Default blog on 7.0 improvements)--------About This DocumentThis document presents the 7.0 roadmap with an eye on usability, in terms of where, how and who for. It is an aggressive and optimistic plan for 7.0 and it is fully expected that some items or a percentage of some items will eventually be pushed to 7.1, to ensure we can deliver close to time. Longer term 7.1 and onward items are not discussed or presented in this document, although it does touch on some of the items which would be raised as a result of reading this document - such as the “What’s not being improved” (for 7.0) section.Wider field feedback remains limited, with a scarcity of specifics. This creates challenges in undertaking a more evidence based approach to planning, which can stand up strongly to scrutiny on all sides. However, engineering and UXD have been working with the field, primarily through Jim Tyrrell and Justin Holmes over the last year on this topic and this document represents the culmination of many discussions over the last year. As such it represents a good heuristic, based on the information and resources available to us at the time.Understanding Feedback from the  FieldBroadly speaking, we have two types of customers:Those who want developers to use our product, often times embedded in their appsThose who want a cross-functional team to use our productGenerally speaking, we do quite well with customer 1, but we have a huge challenge with customer 2. The market has set a pretty clear expectation, on features and quality for targeted audiences, with IBM ODM and Pega’s BPM/Case Management. Almost every customer type 2 either has a significant deployment of these two competitors in place, or the decision maker has done significant work with these products in the past. Moreover, customer 2 is interested in larger, department or organization wide deployments. Customer 1 is usually interested on project level deployments.Customer 2 is primarily upset with our authoring experience, both in eclipse and in Business Central. It is uncommon that customer 1 or 2 is upset with missing features or functions from our runtime (especially now that 6.3 has been released with a solid execution server and management function), and when she is, our current process to resolve these gaps works well. Therefore, the field feedback in this document (and our current process) is focused on the authoring experience. This isn’t to say other elements of the product are perfect, but simply an acknowledgement that we have limited time and energy and that the authoring experience is the most important barrier to success with customer 2.The key issues that we have authoring side are fundamental (customer stories available here at request - some are a bit off color). Generally, these issues fall into 3 areas which are further enumerated in “Product Analysis and Planned C[...]

Page and Form builder for Bootstrap responsive grid views - a progress update

Fri, 05 Aug 2016 23:54:00 +0000

Eder has made great progress on the page and form builder,  which are built on top of Bootstrap responsive grid views.

We love the responsive aspects of Bootstrap grid views, but felt existing tools (such as Layoutit) exposed the construction of the grid too much to users. Further changing the structure of a page after it was made and populated is not easy. We wanted something that built the grid automatically and invisibly based on the dragging and positioning of components.

The latest results can be seen in this youtube video (best to watch full screen and select HD):
width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="" src="" frameborder="0" allowfullscreen>

We have other videos, from earlier revisions of the tool, that you can also watch, as well as peripheral related tools.
Page Builder
Form Builder
Page/App Deployment
Page Permissions
User and Groups


Security management in jBPM & Drools workbenches

Fri, 29 Jul 2016 06:58:00 +0000

The jBPM 7 release will include an integrated security management solution to allow administrator users to manage the application’s users, groups and permissions using an intuitive and friendly user interface. Once released, users will be able to configure who can access the different resources and features available in the workbench.In that regards, a first implementation of the user & group management features was announced about 3 months ago (see the announcement here). This is the second article of this series and it describes what are permissions and how they extend the user and group management features in order to deliver a full security management solution. So before going further, let's introduce some concepts:Basic conceptsRoles vs GroupsUsers can be assigned with more than one role and/or group. It is always mandatory to assign at least one role to the user, otherwise he/she won’t be able to login.Roles are defined at application server level and they are defined as  entries in the application’s web.xml descriptor. On the other hand, groups are a more flexible concept, since they can be defined at runtime. Both can be used together without any trouble. Groups are recommended as they are a more flexible than roles.PermissionsA permission is basically something the user can do within the application. Usually, an action related to a specific resource. For instance: View a perspective Save a project View a repository Delete a dashboard A permission can be granted or denied and it can be global or resource specific. For instance: Global: “Create new perspectives” Specific: “View the home perspective” As you can see, a permission is a resource + action pair. In the concrete case of a perspective we have: read, update, delete and create as the actions available. That means that there are four possible permissions that could be granted for perspectives. Permissions do not necessarily need to be tied to a resource. Sometimes it is also neccessary to protect access to specific features, like for instance "generate a sales report". That means, permissions can be used not only to protect access to resources but also to custom features within the application. Authorization policyThe set of permissions assigned to every role and/or group is called the authorization (or security) policy. Every application contains a single security policy which is used every time the system checks a permission. The authorization policy file is initialized from a file called WEB-INF/classes/ under the application’s WAR structure. NOTE: If no policy is defined then the authorization management features are disabled and the application behaves as if all the resources & features were granted by default. Here is an example of a security policy file: # Role "admin" Role "user" entry defines a single permission which is assigned to a role/group. On application start up, the policy file is loaded and stored into memory. UsageThe Security Management perspective is available under the Home section in the workbench's top menu bar.The next screenshot shows how this new perspective looks:                          Security Management Perspective             Compared to the previous version this new perspective integrates into a single UI the management of roles, groups & users as well as the edition of the permissions assigned to both roles & groups. In concrete:List all the roles, groups and users available Create & delete use[...]

UberFire Forms Builder for jBPM

Fri, 17 Jun 2016 18:04:00 +0000

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.

allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="" frameborder="0" height="266" src="" width="320">


Tutorial oriented user guides for Drools and jBPM

Wed, 08 Jun 2016 14:15:00 +0000

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

Tue, 07 Jun 2016 23:29:00 +0000

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 :)http://2016.ruleml.org ScheduleDecision Camp Schedule(pasted below)July 6, 2016OMG 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, 2016StartEndTitleAuthors9:009:15Welcome and KickoffJacob Feldman9:1510:00Modeling Decision-Making Processes: Melding Process Models and Decision ModelsAlan Fish10:0010:15Coffee Break10:1510:50Oracle Decision Modeling ServiceGary Hallmark, Alvin To10:5011:25Decision Management at the Speed of EventsDaniel Selman11:2512:00Factors Affecting Rule PerformanceCharles Forgy 12:0012:35DMN: how to satisfy multiple objectives?Jan Vanthienen12:3514:00Lunch Break14:0015:00Natural Language Access to Data: It Needs Reasoning(RuleML Keynote)Richard Waldinger15:0015:35Welcome to Method for Parsing Regulations into DMNTom Debevoise, Will Thomas15:3516:10Using Machine Learning, Business Rules, and Optimization for Flash Sale PricingIgor Elbert, Jacob Feldman16:1016:25Coffee Break16:2517:00Improving BRMS Efficiency and Performance and Using Conflict ResolutionJames Owen, Charles Forgy17:00.18:00QnA Panel "DMN from OMG, Vendor, and Practitioner Perspectives"Moderated by Bruce Silver19:00-Joint DinnerJuly 8, 2016 StartEndTitleAuthors9:0010:00DMN as a Decision Modeling Language(RuleML Keynote)Bruce Silver10:0010:15Coffee Break10:1510:50Solving the "Last Mile" in model based developmentLarry Goldberg10:5011:25What-If Analyzer for DMN-based Decision Models(Challenge Demo)Jacob Feldman11:2512:00Advanced Decision Analytics via Deep Reasoning on Diverse Data: For Health Care and MoreBenjamin Grosof, Janine Bloomfield12:0012:35The Decision Boundary Map: An Interactive Visual Interface to Make Informed Decisions and Selections in the Presence of TradeoffsShenghui Cheng, Klaus Mueller12:3514:00Lunch Break15:1515:50Learning Rule Base Programming with Classic Computer GamesMark Proctor [...]

Parallel Drools is coming - 12 core machine benchmark results

Wed, 01 Jun 2016 18:54:00 +0000

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.

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

Fri, 27 May 2016 18:29:00 +0000

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.

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

Fri, 13 May 2016 09:05:00 +0000

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! [...]

New 6.4.0.Final tags for community Docker images

Mon, 09 May 2016 18:11:00 +0000

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

More information at the following links:


Drools 6.4.0.Final is available

Mon, 18 Apr 2016 15:50:00 +0000

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:Drools websiteDownloadsDocumentationRelease NotesRead below some of the highlights of the release.You can also check the new releases for:jBPMOptaplannerHappy drooling.Drools WorkbenchNew look and feelThe 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 improvementsIn 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 LocalesLocales ru (Russian) and zh_TW (Chineses Traditional) have now been added.New Decision Server Management UIThe 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 EngineBetter Java 8 compatibilityIt 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 compilationThe 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 behaviourEngine'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 improvementsOOPath 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

Mon, 18 Apr 2016 13:21:00 +0000

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 WorldNowadays, 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 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 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.ExampleI 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: 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:The Drools Server Fraction: By adding this dependency, the fraction is going to be activated while Wildfly Swarm bootstrap.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[code]java -jar drools-server-swarm-1.0-SNAPSHOT-swarm.jar[/code]For this example, we will include on[...]

User and group management in jBPM and Drools Workbenches

Wed, 06 Apr 2016 18:17:00 +0000

IntroductionThis 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 managementBefore 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 capabilitiesInstallation and setupUsageNotes: This feature is included from version 6.4.0.Final.Sources available here.Security management providersA 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 providersDue 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:Wildfly / EAP security management provider - Realms based on properties files. Tomcat security management provider - Realms based on XML files. Keycloak security management provider - For the administration of Keycloak based realms. This provider is included as technical preview for the next 7.0 series, currently in development.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 capabilitiesEach 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:admin=207b6e0cc556d7084b5e2db7d822555csalaboy=d4af256e7007fea2e581d539e05edd1bmaciej=3c8609f5e0c908a8c361ca633ed23844kris=0bfd0f47d4817f2557c91cbab38bb92dkaty=fd37b5d0b82ce027bfad677a54fbcceejohn=afda4373c6021f3f5841cd6c0a027244jack=984ba30e11dda7b9ed86ba7b73d01481director=6b7f87a92b62bedd0a5a94c98bd83e21user=c5568adea472163dfc00c19c6348a665guest=b5d048a237bfd2874b6928e1f37ee15ekiewb=78541b7b451d8012223f29ba5141bcc2kieserver=16c6511893651c9b4b57e0c027a96075As 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[...]

Mastering #Drools 6 book is out!

Mon, 04 Apr 2016 09:02:00 +0000

Hi everyone, just a quick post to share the good news! The book is out and ready to ship! You can buy it from Packt or from Amazon directly. I'm happy to announce also that we are going to be presenting the book next week in Denmark, with the local JBug: if you are around or know someone that might be interested in attending please let them know!

Mastering Drools 6
The book covers a wide range of topics from the basic ones including how to set up your environment and how to write simple rules, to more advanced topics such as Complex Event Processing and the core of the Rule Engine, the PHREAK algorithm.


Packt is doing it again: 50% off on all eBooks and Videos

Wed, 23 Mar 2016 22:20:00 +0000

Packt Publishing has another great promotion going: 50% off on all Packt eBooks and Videos until April 30th.

It is a great opportunity to grab all those Drools books as well as any others you might be interested in.

Click on the image bellow to be redirected to their online store:


High Availability Drools Stateless Service in Openshift Origin

Mon, 21 Mar 2016 18:21:00 +0000

Hi everyone! On this blog post I wanted to cover a simple example showing how easy it is to scale our Drools Stateless services by using Openshift 3 (Docker and Kubernetes). I will be showing how we can scale our service by provisioning new instances on demand and how these instances are load balanced by Kubernetes using a round robin strategy.Our Drools Stateless ServiceFirst of all we need a stateless Kie Session to play around with. In these simple example I've created a food recommendation service to demonstrate what kind of scenarios you can build up using this approach. All the source code can be found inside the Drools Workshop repository hosted on github: this project you will find 4 modules:drools-food-model: our business model including the domain classes, such as Ingredient, Sandwich, Salad, etcdrools-food-kjar: our business knowledge, here we have our set of rules to describe how the food recommendations will be done.drools-food-services: using wildfly swarm I'm exposing a domain specific service encapsulating the rule engine. Here a set of rest services is exposed so our clients can interact.drools-controller: by using the Kubernetes Java API we can programatically provision new instances of our Food Recommendation Service on demand to the Openshift environment.Our unit of work will be the Drools-Food-Services project which expose the REST endpoints to interact with our stateless sessions.You can take a look at the service endpoint which is quite simple: notice that there is another Service that gives us very basic information about where our Service is running: will call this service to know exactly which instance of the service is answering our clients later on.The rules for this example are simple and not doing much, if you are looking to learn Drools, I recommend you to create more meaning full rules and share it with me so we can improve the example ;) You can take a look at the rules here: you might expect: Sandwiches for boys and Salads for girls :)One last important thing about our service that is important for you to see is how the rules are being picked up by the Service Endpoint. I'm using the Drools CDI extension to @Inject a KieContainer which is resolved using the KIE-CI module, explained in some of my previous posts. will bundle this project into a Docker Image that can be started as many times as we want/need. If you have a Docker client installed in your local environment you can start this food recommendation service by looking at the salaboy/drools-food-services image which is hosted in starting the Docker image without even knowing what is running inside we immediately notice the following advantages:We don't need to install Java or any other tool besides DockerWe don't need to configure anything to run our Rest Ser[...]

Keycloak SSO Integration into jBPM and Drools Workbench

Sat, 19 Mar 2016 21:19:00 +0000

IntroductionSingle Sign On (SSO) and related token exchange mechanisms are becoming the most common scenario for the authentication and authorization in different environments on the web, specially when moving into the cloud.This article talks about the integration of Keycloak with jBPM or Drools applications in order to use all the features provided on Keycloak. Keycloak is an integrated SSO and IDM for browser applications and RESTful web services. Lean more about it in the Keycloak's home page.The result of the integration with Keycloak has lots of advantages such as:Provide an integrated SSO and IDM environment for different clients, including jBPM and Drools workbenchesSocial logins - use your Facebook, Google, Linkedin, etc accountsUser session managementAnd much more...   Next sections cover the following integration points with Keycloak:Workbench authentication through a Keycloak serverIt basically consists of securing both web client and remote service clients through the Keycloak SSO. So either web interface or remote service consumers ( whether a user or a service ) will authenticate into trough KC.   Execution server authentication through a Keycloak serverConsists of securing the remote services provided by the execution server (as it does not provides web interface). Any remote service consumer ( whether a user or a service ) will authenticate trough KC.  Consuming remote servicesThis section describes how a third party clients can consume the remote service endpoints provided by both Workbench and Execution Server.   ScenarioConsider the following diagram as the environment for this article's example:Example scenarioKeycloak is a standalone process that provides remote authentication, authorization and administration services that can be potentially consumed by one or more jBPM applications over the network.Consider these main steps for building this environment:Install and setup a Keycloak server  Create and setup a Realm for this example - Configure realm's clients, users and roles  Install and setup the SSO client adapter & jBPM applicationNotes: The resulting environment and the different configurations for this article are based on the jBPM (KIE) Workbench, but same ones can also be applied for the KIE Drools Workbench as well. This example uses latest 6.4.0.CR2 community release versionStep 1 - Install and setup a Keycloak serverKeycloak provides an extensive documentation and several articles about the installation on different environments. This section describes the minimal setup for being able to build the integrated environment for the example. Please refer to the Keycloak documentation if you need more information.Here are the steps for a minimal Keycloak installation and setup:Download latest version of Keycloak from the Downloads section. This example is based on Keycloak 1.9.0.Final.   Unzip the downloaded distribution of Keycloak into a folder, let's refer it as $KC_HOME  Run the KC server - This example is based on running both Keycloak and jBPM on same host. In order to avoid port conflicts you can use a port offset for the Keycloak's server as: $KC_HOME/bin/ -Djboss.socket.binding.port-offset=100  Create a Keycloak's administration user - Execute the following command to create an admin user for this example: $KC_HOME/bin/ -r master -u 'admin' -p 'admin'The Keycloak administration console will be available at http://localhost:8180/auth/admin&nb[...]

Free Webinar: Decisions-as-a-Service with Drools/Red Hat BRMS

Sat, 13 Feb 2016 14:45:00 +0000

Red Hat will be hosting a free webinar on Tuesday, Feb 23rd, on Decisions-as-a-Service with Drools/Red Hat BRMS.

This is the perfect opportunity to watch how easy it is to author and publish decision services with Drools/Red Hat BRMS.

For more details and to register, click here.

Happy Drooling.


Drools @ JUG Cork, Ireland (2nd March 2016)

Fri, 12 Feb 2016 10:31:00 +0000

Hi all, I'm creating this blog post to share with you all that I'm doing a presentation in the Java User Group at Cork, Ireland
For more information about the meet up go here:
The session is titled "Go back home knowing how to use Drools 6 in your own projects" and it will be focused on the basics to get you started using Drools and the common pitfalls that new developers might find when using Drools. We will also quickly cover some common architectural patterns of using Drools and how it can be integrated into your existing applications. 

If you are planning to attend please share this blog post with your friend and post a message here or in the meet up page with the topics that you would like to see during the presentation. As usual, I'm pretty open to cover what the audience consider more important. 

I will be back with more information more close to the meet up date. 

50% off on all Packt eBooks & Videos

Mon, 01 Feb 2016 18:01:00 +0000

Packt Publishing has a great promotion going on right now. They are offering 50% off on all Packt eBooks and Videos until March 2nd.

It is a great opportunity to grab all those Drools books as well as any others you might be interested in.

Click on the image bellow to be redirected to their online store:


Drools: A detailed description of internal code cleanups for fireAllRules, fireUntilHalt and Timers.

Thu, 03 Dec 2015 02:50:00 +0000

In June we blogged about a new internal state machine to manage the interaction of User, Timer and Engine threads. We've now done another big internal clean up of this code, to make it easier to read and easier to understand.As previous mentioned all actions (insert, update, delete etc) are now placed into a thread safe propagation queue. The user thread, when executing those actions, never touches the engine any more, not even the alpha network. This gives improved thread safety. Instead when the engine starts it first drains and evaluates this queue, which can result in alpha network evaluations, before doing rule evaluation and firings.As well as User and Engine thread separation the other aim of the state machine was to co-ordinate the Timer thread. When a timer kicks off the engine may be INACTIVE or it may be running. If the engine is active the Timer should just submit an entry into the propagation queue and let the current executing thread handle the job. If the engine is not active and the timer rule is async the timer thread should take care of the evaluating and firing, via the executeTask method. The state machine is designed to minimise sync's and locks to keep contention minimal.The engine now has 5 possible states it can be in.  INACTIVE is the starting state.Engine  evaluation and rule firing has three potential entry points fireAllRules, fireUntilHalt and async timer rules - the later is done through the executeTask part. We have unified fireAllRules and fireUntilHalt into a single fireLoop method, that uses a strategy class, passed as an argument, to handle the potential rest state of the loop.  The engine is considered at rest when there are no rules firing, when there are no more agenda group to evaluate and when the queue is empty.FireAllRules all rules will then set the engine to INACTIVE and the loop will exit. FireUntilHalt will make the current thread wait, until more work comes into the queue for processing. Work has been done here to make sure there are no gaps, and loss of executions, during those state transitions.When a thread wants to transition to FIRE_ALL_RULES or FIRE_UNTIL_HALT or EXECUTE_TASK, it must go through waitAndEnterExecutionState. If the engine is INACTIVE it can transition straight away, if not it'll go into a wait state until the current executing thread has finished and returned the engine back to INACTIVE:private void waitAndEnterExecutionState( ExecutionState newState ) { if (currentState != ExecutionState.INACTIVE) { try { stateMachineLock.wait(); } catch (InterruptedException e) { throw new RuntimeException( e ); } } setCurrentState( newState );}Let's look at how fireAllRules() uses this. Note firstly that if the engine is already running, because fireAllRules or fireUntilHalt have been previous called and still running, it will simply exit. Second note it only holds the sync point long enough to either exit or make the desired transition. Once the engine is in FIRE_ALL_RULES state it can let go of the sync block and the state machine will stop anything from interfering with it.public int fireAllRules(AgendaFilter agendaFilter, int fireLimit) { synchronized (stateMachineLock) { if (currentState.isFiring()) { return 0; } waitAndEnterExecutionState( ExecutionState.FIRING_ALL_RULES ); } int fireCount = fireLoop(agendaFilter, fireLimit, RestHandler.FIRE_ALL[...]

Using a rective stream as a data source for Drools

Wed, 18 Nov 2015 10:09:00 +0000

A few months ago we started redesigning the Drools lowest level executable model and making it accessible to end user with a Java 8 API. To demonstrate the flexibility of this approach I tried to integrate it with a reactive stream and in particular to use this stream as a data source for Drools.To show how this works I created a simple temperature server that provides a RxJava Observable emitting every second the temperature for a given town and terminates after 5 seconds. There is also a second factory method that allows to merge more of these Observables in order to have a single Observable that emits the temperature for more than one town at the same time.public class TempServer {    public static Observable getFeed(String town) {        return Observable.create(subscriber ->                                         Observable.interval(1, TimeUnit.SECONDS)                                                   .subscribe(i -> {                                                       if (i > 5) subscriber.onCompleted();                                                       try {                                                           subscriber.onNext(TempInfo.fetch(town));                                                       } catch (Exception e) {                                                           subscriber.onError(e);                                  [...]

Installing KIE Server and Workbench on same server

Tue, 20 Oct 2015 14:25:00 +0000

syndicated from common requirement for installation on development machine is to run both KIE Workbench and KIE Server on same server to simplify execution environment and avoid any port offset configuration.This article will explain all installation steps needed to make this happen on two most frequently used containers:Wildfly 8.2.0.FinalApache Tomcat 8Download binariesSo let's get our hands dirty and play around with some installation steps. First make sure you download correct versions of workbench and KIE Server for the container you target.Wildflykie-wb-distribution-wars-6.3.0.Final-wildfly8.warkie-server-6.3.0.Final-ee7.warTomcatkie-wb-distribution-wars-6.3.0.Final-tomcat7.warkie-server-6.3.0.Final-webc.warWildflyDeploy applicationsCopy downloaded files into WILDFLY_HOME/standalone/deployments, while copying rename them to simplify the context paths that will be used on application server:rename kie-wb-distribution-wars-6.3.0.Final-wildfly8.war to kie-wb.warrename kie-server-6.3.0.Final-ee7.war to kie-server.warConfigure your serverWith Wildfly there is not much to setup as both transaction manager and persistence (including data source) is already preconfigured.Configure userscreate user in application realm name: kieserver password: kieserver1!roles: kie-servercreate user in application realm to logon to workbenchname: workbench password: workbench!roles: admin, kie-serverConfigure system propertiesFollowing list of properties needs to be given to work smoothly for both workbench and KIE -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controllerLaunching the serverbest way is to add system properties into startup command when launching Wildfly server. Go to WILDFLY_HOME/bin and issue following command:./ --server-config=standalone-full.xml -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controllerTomcatDeploy applicationsCopy downloaded files into TOMCAT_HOME/webapps, while copying rename them to simplify the context paths that will be used on application server:rename kie-wb-distribution-wars-6.3.0.Final-tomcat7.war to kie-wb.warrename kie-server-6.3.0.Final-webc.war to kie-server.warConfigure your serverCopy following libraries into TOMCAT_HOME/libbtm-2.1.4btm-tomcat55-lifecycle-2.1.4h2-1.3.161jacc-1.0jta-1.1kie-tomcat-integration-6.3.0.Finalslf4j-api-1.7.2slf4j-api-1.7.2Create Bitronix configuration files to enable JTA transaction managerCreate file '' under TOMCAT_HOME/conf with following${btm.root}/work/${btm.root}/work/${btm.root}/conf/resources.propertiesCreate file '' under TOMCAT_HOME/conf with following[...]