Over a million developers have joined DZone.

Examining Red Hat JBoss BRMS Design Time Architecture for Rules and Events (Part IV)

Here's our fourth look at Red Hat's JBoss BRMS design architecture, this time looking at rules and events.

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

This is the forth and final part in the series started around possible Red Hat JBoss Business Rules Management System (BRMS) deployment architectures.

Previously we covered in three separate articles the various deployment architectures and rule authoring tasks you have to deploy a rules and/or events project in your enterprise. 

In this article we move forward to the various aspects around rule deployments with a focus on the choices available to a rule administrator in delivering the rules to her enterprise applications.

Rule artifacts found in artifact repository.

Deploying With KieScanner

After the rule administrator builds a project it is available in the Artifact repository.  Select Open to get the contents of a pom.xml file.  The project is also downloadable as a jar file that can be included in your deployable artifact (e.g. EAR, WAR).

KieScanner deployment.

Once the project JAR is available in the Artifact repository the KieScanner will pick it up on the configured interval and load the new version into the KieContainer. 

Any new KieSessions created in the application will be created against the latest version.

Deploying Embedded

If you would rather not use the KieScanner or your rules do not change often enough to require a KieScanner then you can still embedded the rule project within your application. 

Embedding rules artifact into application.

Once the project is built its available for download from the Artifact repository page in JBoss BRMS Business Central workbench.

This can be downloaded manually and included into another version control repository or can be accessed through an URL and included in your application:

  • http://localhost:8080/brms-central/maven2/<project_path> 

As an example based on our figures included in this article, our project artifact could be found here:

  • http://localhost:8080/business-central/maven2/org/kie/example/project1/1.0.0/project1-1.0.0.jar
Rule administrator defines a realtime decision server
by putting a rule project into a container.

In this situation the rule project JAR is included in your application deployable (e.g. WAR/EAR) as any other JAR file would.

Deploying Realtime Decision Server

The final option available to a rule administrator has been included in JBoss BRMS 6.1,  an out-of-the-box rule decision server.  

This realtime decision server is deployed by default with JBoss BRMS, but can be deployed to any other web container since it’s a WAR. 

Realtime decision server deployments.

Rules can then be instantiated and executed through REST, JMS, or Java interfaces. The realtime decision server manages containers that can run independently of each other. A rule administrator can create a container and select a rule project that will run in that container.  

Once the container is started applications can access them through the container endpoint, for example:

  • http://localhost:8080/kie-server/services/rest/server/containers/Container1  

The container then exposes all the functionality needed by an application through its REST interface as detailed in the documentation.

Going Back

If you want to head back and catch up on the previous articles in this series:

Looking to Automate your business?

This concludes this series where we examined Red Hat JBoss BRMS design time architectures for rules and events, with thanks to John Hurlocker.

(Article guest authored together with John Hurlocker, Senior Middleware Consultant at Red Hat in North America)

Learn tips and best practices for optimizing your capacity management strategy with the Market Guide for Capacity Management, brought to you in partnership with BMC.

Topics:
redhat ,jboss ,integeration

Published at DZone with permission of Eric D. Schabell, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}