The previous posts only showed how to build a route using the Drools endpoint as the target consumer of the message, but what happen if we need to start the route from a Drools endpoint (the source endpoint) and send a message from the rules consequence to the target endpoint? In this case we need to use Drools channels.
A Drools channel provides a mechanism to send objects from the working memory to some external process or functions. Continue reading →
Maybe you noticed, or not, that this blog hasn’t had too much activity lately (but hey, I wasn’t blooging much before, right?). Well, one of the reasons was the Drools Developer Cookbook, a book that I was writing and that after a few months of hard work is finally finished and released by Packt Publishing.
Inside this book you will find lots of recipes to apply in your Drools projects, in order to take advantage of the latest features released in JBoss Drools 5.2 and 5.3. It covers all the main modules, Expert, Fusion, Guvnor, Planner and even jBPM5.
I would like to thank Packt Publishing & crew, Edson Tirelli, Geoffrey De Smet, Toni Rikkola and everyone else that in any way helped me.
The chapters 2 & 7 are available to read in the next links:
After a few months I’m back with another useful, or maybe not, post about the integration between Apache Camel and Drools/jBPM5. I decided to write this post because 1) people are continuously asking about the last changes in the integration and 2) I already had a POC using the last Drools/jBPM5/Camel integration in my github account.
So, in this example I’m going to explain how to use jBPM5 together with Apache Camel but the same concepts and configuration can be applied to a Drools integration with Camel. Continue reading →
The Apache Camel integration allows us to interact with a Drools Stateless or Stateful session through a pipeline. It basically works by transforming XML commands into executable commands and executing each of them. The advantage of this integration is that Apache Camel makes possible the implementation of more advanced enterprise integration patterns, which is an improvement of Drools Pipeline.
This integration with Drools allows us to add any of the current Camel components. Using the Apache Components you can, receive commands from several entry points and send the execution result to another entry point. Just to name a few of the components: JMS queue/Atom Feed/Mina connection/a Mail/etc. As you can see, this brings a more powerful interoperability mechanism to integrate your application with Drools. Actually Drools is using Camel 2.4.0 that allows a more strong internal integration between them.
Introduction to Drools Grid
This integration is coupled with another drools module called: drools-grid. This module allow us to interact with Drools sessions independent of the JVM location. At the moment we can use two implementations:
Local: Used when the drools sessions and clients are in the same JVM
Remote: Used when you have drools sessions on a remote JVM. Currently, the only implementation is based on Apache Mina. HornetQ support is actually done, but don’t available in trunk
Drools Grid is embedded inside the Drools Camel component, so don’t worry about further implementation information because this is hidden by Drools. With this information we can start to configure our Camel Context. Continue reading →
In the past days Drools Execution Server was updated to use a new version of the Drools Camel integration and more features were added.
One of the biggest differences is that now everything is configured using Spring, and no java code is included inside the WAR file. And, opposite to the previous version, SOAP isn’t supported out-of-the-box (you could use SOAP in the previous version) but you can add your own support right now.
As in the previous version, the configuration files are included in the WEB-INF/ folder inside the WAR file. Now we have three configuration files: beans.xml, camel-server.xml and knowledge-services.xml
beans.xml: It is the main xml file, but only is used to import the next two files. So, you don’t need to modify this one.
camel-server: This file includes the configuration of REST interface and Camel routes.