0

I have a requirement to write an application in .Net that can allow business customers to define their own rules. I have been looking into BRE (Business Rule Engine) by Microsoft that comes in Biztalk server. What I understood so far is that BRE provides you a flexible rule composer to drag drop properties from your .Net entity and then assert it against some condition (predicate). However, this is pretty basic and straight forward idea which in my mind can be simply achieved by defining my own domain specific language for writing easy to understand business rules. All I have to do is to create a grammar using ANTLR or Coco/R and an interface where you can write and compile rules and I am good to go. Can someone shed some light on how BRE is offering more and why one should prefer it over custom made solution?

Michael
  • 41,989
  • 11
  • 82
  • 128
talaa123
  • 123
  • 1
  • 2
  • 14
  • There's a lot more to BRE than just having a grammar to parse rules and translate them to evaluations code can use. However, this is primarily an opinion based question. – Dan Field Nov 19 '15 at 18:01
  • Note also that BizTalk is written so that it multi-threads, if you were to write your own rule engine you would have to take care of that as well if it is to process multiple items at the same time. e.g. http://stackoverflow.com/questions/11017584/how-to-multi-thread-an-antlr-parser-in-java – Dijkgraaf Nov 19 '15 at 19:13

1 Answers1

0

The question's answer really depends on factors such as:

  1. The enterprise need: BizTalk is an integration platform and if your enterprise is already using BizTalk, There should not be any question of writing your own rule engine vs BRE since BRE provides most of the functionality you need from a rule engine with great performance, also providing ability to cache long term facts at run time if required. Business Rule Composer provides easy rule building as well as can be installed to business users for composing rules. In some complex scenario, this can be customized as well. These rules you can use within BizTalk using Orchestration or .NET class libraries. So with BizTalk its a great rule engine with lots of flexibility.
  2. If BizTalk is not your integration platform and you are considering it only for BRE then you need to think twice since using BRE itself also requires BizTalk license, also using BizTalk product only for BRE may not be cost effective. Something you need to think about.
Vikas Bhardwaj
  • 1,455
  • 8
  • 10
  • It is possible to use Azure BRE: https://azure.microsoft.com/en-us/documentation/articles/app-service-logic-use-biztalk-rules/, which might not require as heavy an investment in BizTalk in particular. But BRE does more than just tehse things. Do you need a RETE based rules engine? Are you going to have to implement the RETE algorithm yourself? Do you need multithreading, do you need hot deployments of rule/vocab updates, do you need to deal with XML and/or .NET objects, etc... – Dan Field Nov 20 '15 at 13:58
  • @VikasBhardwaj Yes BizTalk is not my integration platform and I only have to use BRE nothing else. I have a classical .Net application with database running on client side. I just wanna add a component to let client define it's own rules and execute them. You think I should write my own rule engine? Are there any open source solutions available? – talaa123 Dec 01 '15 at 16:40
  • @DanField Microsoft Azure won't let me create and account without credit card information. I just wanna use the trial first just to see if this will ever work according to my requirements. You have and idea on how to do it without filling out my credit card information? – talaa123 Dec 01 '15 at 16:41
  • Any rule engine you build or take as product needs minimum couple of components 1) Rule Engine Run time and 2) Rule Engine Designer. You may get many open source for 1st component, however I don't think there are open source which provides a designer to create those rules. You need to think about the scope of rules i.e. what kind of rules you want user to define. Limit your scope to the application need and then think about the solution "build vs buy". You may want to think about building a UI and ability to execute those rules yourself depending on the scope and complexity of rules. – Vikas Bhardwaj Dec 01 '15 at 16:57