JBoss BRMS 6.1 Realtime Decision Server (Rule Execution Server) & REST XML Payload

This is new in 6.1 and a very useful feature for exposing your rule as a service without having to write your own service implementation.  Previously one had the option of exposing it as s REST service using RESTEasy, the drools-camel component or other methods.  Now there is a built in mechanism to help expose the service while also being able to have some management capabilities.

This is exposed via the new kie-server webapp that is now installed with JBoss BRMS 6.1.

To get started you build & deploy your rule project, then register your rule server and add the container.  When you first start using it, the first question you may wonder is, what is the payload for this new rest service.  The message body is unique based on the facts used by the rules.  So what does an example XML payload look like?

<insert out-identifier="customer" return-object="true" entry-point="DEFAULT">
<insert out-identifier="account" return-object="true" entry-point="DEFAULT">
<customer reference="../../../insert/com.redhat.test.brmstest.fact.Customer"/>

I have included an example java class which generates the payload for you based on your fact model.  This is in the brms-rule-service project.  It uses the command based API of KIE.  At the moment only an XML payload is available.

My brms-example github project includes more details as well as more detailed instructions.

This is also available in the superset product JBoss BPM Suite 6.1


comments powered by Disqus