heidloff.net - Building is my Passion
Post
Cancel

Using Business Rules in your Bluemix Applications without hardcoding them

IBM Bluemix provides a service to define business rules external to your application code. This allows changing rules more dynamically without having to recompile and redeploy the complete application.

There is plenty of documentation available that I won’t repeat here: Business Rules documentation, developerWorks articles and samples and tutorials. Below is just a quick summary for what this service can be used and how to leverage it in Bluemix.

The example I’m using is from an article Build a hotel booking application which provides a detailed description how the service works. In this scenario a business rule is defined to determine the pricing of a hotel based on the date of the booking offering early booking discounts or last-minute offers. With the business rules service this can be done without low level programming skills using a Rule Designer plugin in Eclipse.

image

After the service has been created in Bluemix, you can get your connections settings.

image

In Eclipse you need to use these settings when deploying the rule to Bluemix from your IDE.

image

After the rule has been deployed to Bluemix, you can execute it via REST APIs. There is a Java sample that shows how to do this. You can also invoke the rule and receive the results in a Node-RED flow. Check out the sample flow. The dashboard of the service also provides an easy way to test the service.

image

Featured Blog Posts
Disclaimer
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
Trending Tags