Over a million developers have joined DZone.

Using Business Rules in Your Bluemix Applications Without Hardcoding Them

· Cloud Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database on AWS. Try it now! Brought to you in partnership with MongoDB.

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.



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


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



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.

Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.

Topics:
cloud ,ibm ,business rules ,paas ,cloud platforms ,ibm bluemix ,eclipse

Published at DZone with permission of Niklas Heidloff, 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 }}