This project is read-only.

[Terminology] - Explanation of words used by the rules engine

[Installation] - Installing More Rules Api

[RuleBooks] - Learn how rulebooks can be used.

[Rules] - Understanding and using rules

[LookupTables] - Understanding and using Lookuptables

[Tutorial] - A simple tutorial on creating Assemblies, Rulebooks, LookupTables and how they work together

Web Api via Javscript
Include the following script in your headers.
http://webapipath/Scripts/More.js

Executing the webapi**
Once the script is included you can invoke

ExecuteMoreRules(url, effectiveDate, ruleBook, inputs, selectItems, handleResult)

Parameters

  • String Url** - The url to the rules engine web api
  • String EffectiveDate - The effective date/assembly date to execute
  • String Rulebook - The name of the rulebook to execute
  • Array Inputs - The input variables the rule engine will process.
  • Array SelectItems - Null to return the full result. Or pass an array for specific items only to be returned
  • CallbackMethod HandleResult - A callback method to handle the rule engine result. The first parameter passed to this method will be the json object data result as a javascript object.


Example:
Pretend we have a rulebook named TierRules that looks like this

TierRulesA : true
 Tier1 : A + B
Tier2 : Tier1 * 0.5


To invoke this Rulebook it would look like this

 

ExecuteMoreRules(
    'http://YourDomain/MoreRulesApi/',
    '09/25/2013',
    'TierRules', 
    ["A":2,"B":2],
    null,
    function(d) {
        alert(d.TierRulesA.Tier2);
    }
);


 


This would show an alert box that would display "2".

Last edited Mar 13, 2013 at 9:05 PM by micahosborne, version 5

Comments

No comments yet.