Functions for creating entities and executing rules. Should always be created via inrule.createRuleSession()
|
||
Parameters: entityName Type: string The name of the Entity to create boundValue Type: object An optional JavaScript object that contains data that the Entity will be bound to, if null an empty object is bound. |
||
Description: Creates and returns an Entity of the specified name and bound to the provided value |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Parameters: ruleSetName Type: string The name of the RuleSet to create arguments Type: Array of objects An Array of values to pass to the RuleSet. The values are bound to the arguments by ordinal positioning. If an argument is Entity, the value passed to it will be used as the Entity's bound value. If the RuleSet does not have parameters, pass an empty array. callback Type: function(log) A JavaScript function accepting a RuleExecutionLog object as its parameter |
||
Description: Executes the Independent Rule Set with the specified name. If arguments are provided they are passed to the Independent Rule Set. |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Parameters: ruleSetName Type: string The name of the RuleSet to create |
||
Description: Creates and returns a RuleSet |
||
Code Sample: var session = inrule.createRuleSession(); var ruleSet = session.createIndependentRuleSet("RuleSet1"); |
|
||
Description: Returns a JavaScript Array of Entity objects created explicitly via createEntity() or during the execution of rules in the current RuleSession |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Parameters: callback Type: function(log) A JavaScript function accepting a RuleExecutionLog object as its parameter |
||
Description: Applies all Auto Single-Pass Sequential Rule Sets and evaluates all Calculated Fields against all Entities in the current RuleSession. The callback provided is invoked upon completion of rule execution. If an error occurs during rule exection, the hasErrors property on the RuleExecutionLog will return True. Error details can be accessed via the runtimeErrors Array. |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Description: Returns an Array of Notifications from the last rule execution |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Description: Returns an Array of Validations from the last rule execution |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Parameters: date Type: Date A Date object representing the date/time used for the Today() and Now() syntax functions |
||
Description: Sets the value of the date/time to use for the Today() and Now() syntax functions during rule execution. If not set, new Date() will be used when rules execute. |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Description: Returns a RuleExecutionLog of the last rule execution |
||
Code Sample: var session = inrule.createRuleSession(); |
|
||
Description: Returns a DataManager object that is used to get Value Lists and Inline Tables |
||
Code Sample: var session = inrule.createRuleSession(); var myTable = session.dataManager.getInlineTable("MyTable"); |
|
||
Description: Returns an AuthoringMetadata object for the Rule Application |
||
Code Sample: var session = inrule.createRuleSession(); var displayName = session.metadata.displayName; |
Comments
0 comments
Please sign in to leave a comment.