title: Dynamic configuring rules in a rule engine
body: <p>I'm designing a simple rule engine. Let me start by giving an overview.</p>
  
  <p>The engine is initialized with a configuration file which specific the rules to be run and also parameters that are intended to be used by these rules.</p>
  
  <p>Example: </p>
  
  <p>I have a incoming order object and I will would like to do some sanity check on it like
  the order quantity cannot be greater than some quantity X ( x is passed as a parameter to the engine. ) This is a simple example of a parameter being passed. </p>
  
  <p>A complex example:</p>
  
  <p>Some order Type.Some region.Some desk.Order Quantity = X</p>
  
  <p>Some order Type.Some region.Some desk.Some trader.Quantity = y.</p>
  
  <p>Some order Type.Some region.Some Product.Daily Volume = A</p>
  
  <p>Some order Type.Some region.Some desk.Daily Volume = B</p>
  
  <p>A lot of parameters like these are used to initialize the engine which are intended to be used by the rules.</p>
  
  <p>Question:</p>
  
  <p>How should these initialization parameters be passed to API ? -- JSON , XML ???</p>
  
  <p>What is the best software design practice to represent and process and store these parameters so that the rules can use this information ( like what's the quantity allowed for a trader group ? to do sanity checks on the incoming order object )</p>
  
  <p>I'm planning to implement this in C++</p>
  
  <p>Thanks in advance</p>