Smart Content Selection PoC – Drools 5 & jBPM5

Hi there, I was working the last 5 days in a simple project to demonstrate how we can use Drools Expert, Drools Fusion and jBPM5 to coordinate the content that it’s being displayed in an application. Some of the related topics that I’m trying to cover here in this post are: User behavioral patterns, Recommendation and Suggestions mechanism that are influenced by the User interactions, Marketing Campaigns selections, Trends analysis, etc. If anyone out there is doing the same thing or trying to solve a similar problem, it would be nice to start discussions around these topics. I will also be sharing some presentations around these topics that includes very simple introductions about the Drools project to be able to share these content with people that doesn’t know how the project can be used.


This post is about a project that I’ve started 5 days ago to demonstrate how we can create a model around visual components that are being displayed to an user and then analyze and decide in real time different actions based on the user interaction.

Some of the initial considerations that I have in mind when I start working on it were related to web applications, but for time restrictions to show some useful results I’ve created a simple Swing Application. As you may know, Swing provide an event based framework to create Desktop Applications in the Java World. I plug Drools Expert, Fusion and jBPM5 in the back to analyze the user interaction and express declaratively how to react to different patterns of interactions.

The next step in the future will be adapt this mini framework to a very simple GWT application, to leverage the advantage of web technologies to gather concurrent users behavioral patterns.


The following video just show the application working. You can see a main page with a set of custom Visual Components with some meta data. For demo purposes I’ve choose to relate a product to each visual component. Based on this meta model we can write rules to analyze and react to different interaction patterns.

As the video shows, we can also add new Visual Components on demand and apply new rules to that user session.

Simple Use Cases

When I was designing this simple PoC I select simple use cases to create a generic model that can be used for multi purpose analysis.

The following slides introduce the project and describe the 4 main use cases that I want to demonstrate using this PoC.

As you may notice all the use cases use the temporal dimension to define a situation. This is something that can be skipped if we can define logical situation around what is being displayed to the user in a particular point in time. In the previous figures I use yellow lines to describe the events that are being generated by the user interaction and in red the one that doesn’t happen. This is extremely important, because detecting events that don’t happen is usually a complicated feature to implement using imperative programming languages. Here with Drools Fusion you get it for free 🙂

The Project

The project source code can be downloaded from github ->

Please remember that this is just  PoC. Esteban helps me to make it cleaner and more presentable in the UI side and in the code side, but this is just the effort of 5 days of work.

The project itself it’s under the Apache License V2 so it can be extended and used for general purpose. If you have feedback about it or if you are interested and wanna contribute to be able to get something useful, please let me know and we can collaborate each other to build something on top of it.

As always, feedback is more than welcome!

6 thoughts on “Smart Content Selection PoC – Drools 5 & jBPM5”

  1. Hi,

    I am very interested in your project because I am also a Drools, jBPM fans. In this project, could you show me which part involves jBPM? BTW, I am happy to join this project development as well.



    1. Hi Benson,
      I’m still working in a use case to add a business process to create a marketing campaign.
      Basically each rule that it’s right now in the repository allows you to create a new business process instance. So, as you may know jBPM5 it’s fully integrated and you can work with it without doing extra configurations or programming.
      Are you willing to contribute with the project? I can give you commit access, but we need to set some concrete goals to work on. Do you have any particular interest to extend this application?
      Are you familiar with plain GWT coding? because it will be very interesting get the same results that I have right now in the swing application in a web based application. If you can do that for the project will be a major contribution.
      Let me know what do you think about that!



      1. Hi,

        It looks quite interesting. I am glad to contribute. Could you let me take a light effort for the jumpstart? First of all, I would like to feel how it works programmtically(actually my knowledge is still at jbpm3.). Secondly, my career is still my first priority at the moment(hope you understand, but I am very interested in your project).

        GWT is fine for me. Honestly, I am also working on GWT development and promoting GWT as the frontend development for my career. So it is not a problem to me.

        At the moment, I expect this project is generic to any industry. Therefore, the engine is critical and it will be framework based for inserting any plugin fragment for a specific industry use. This is the long term goal. But for the start, this project can focus on a certain industry for now, like your poC is for online retail shopping, right?

        I am not sure my thought match your thought on your head, but it can be tuned as the project goes.



  2. Magnificent goods from you, man. I have take into account your
    stuff prior to and you aare just too excellent.
    I actually like what you’ve acquirwd here, certainly like what you are saying and the best way during which you assert it.
    You are making it entertaining and you continue to care for to
    keep it wise. I can’t wait to learn much more fromm you.
    Thhis is actually a great site.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.