All notable changes to this project will be documented in this file.
- Updated dependencies to latest
- Fixed RulesEngine throwing exception when type name is same as input name
- Added config to disable FastCompile for expressions
- Added RuleParameter.Create method for better handling on types when value is null
- Fixed Scoped Params returning incorrect results in some corner case scenarios
- Added option to disable automatic type registry for input parameters in reSettings
- Added option to make expression case sensitive in reSettings
- Fixed security bug related to System.Dynamic.Linq.Core
- As a part of security bug fix, method call for only registered types via reSettings will be allowed. This only impacts strongly typed inputs and nested types
- RulesEngine is now available in both dotnet 6 and netstandard 2.0
- Dependency on ILogger, MemoryCache have been removed
- Obsolete Properties and Methods have been removed
- Fixed name of RuleParameter is ignored if the type is recognized (by @peeveen)
- ILogger has been removed from RulesEngine and all its constructors
- RulesEngine(string[] jsonConfig, ILogger logger = null, ReSettings reSettings = null)
+ RulesEngine(string[] jsonConfig, ReSettings reSettings = null)
- RulesEngine(Workflow[] Workflows, ILogger logger = null, ReSettings reSettings = null)
+ RulesEngine(Workflow[] Workflows, ReSettings reSettings = null)
- RulesEngine(ILogger logger = null, ReSettings reSettings = null)
+ RulesEngine(ReSettings reSettings = null)
- Obsolete methods and properties have been removed, from the follow models:-
-
RuleResultTree
ToResultTreeMessages()
has been removed fromRuleResultTree
modelGetMessages()
has been removed fromRuleResultTree
modelRuleEvaluatedParams
has been removed fromRuleResultTree
model, Please useInputs
instead
-
Workflow
WorkflowRulesToInject
has been removed, Please useWorkflowsToInject
insteadErrorType
has been removed fromRule
-
Resettings
EnableLocalParams
has been removed fromReSettings
, Please useEnableScopedParams
instead
-
EvaluateRule
action now support custom inputs and filtered inputs- Added
ContainsWorkflow
method in RulesEngine (by @okolobaxa) - Fixed minor bugs (#258 & #259)
-
Made RulesEngine Strong Name and Authenticode signed
-
Renamed few models to streamline names (by @alexrich)
WorkflowRules
is renamed toWorkflow
WorkflowRulesToInject
is renamed toWorkflowsToInject
RuleAction
is renamed toRuleActions
Note: The old models are still supported but will be removed with version 4.0.0
- Added support for actions in nested rules
- Improved serialization support for System.Text.Json for workflow model
Breaking Change:
- Type of Action has been changed from
Dictionary<ActionTriggerType, ActionInfo>
toRuleActions
- No impact if you are serializing workflow from json
- For workflow objects created in code, refer - link
- Added AddOrUpdateWorkflow method to update workflows atomically (by @AshishPrasad)
- Updated dependencies to latest
Breaking Change:
AddWorkflow
now throws exception if you try to add a workflow which already exists. UseAddOrUpdateWorkflow
to update existing workflow
- Added globalParams feature which can be applied to all rules
- Enabled localParams support for nested Rules
- Made certain fields in Rule model optional allowing users to define workflow with minimal fields
- Added option to disable Rule in workflow json
- Added
GetAllRegisteredWorkflow
to RulesEngine to return all registered workflows - Runtime errors for expressions will now be logged as errorMessage instead of throwing Exceptions by default
- Fixed RuleParameter passed as null
- Fixed LocalParams cache not getting cleaned up when RemoveWorkflows and ClearWorkflows are called
- Moved ActionResult and ActionRuleResult under RulesEngine.Models namespace
- Added support for Actions. More details on actions wiki
- Major performance improvement
- 25% improvement from previous version
- Upto 35% improvement by disabling optional features
- RulesEngine now virtually supports unlimited inputs (Previous limitation was 16 inputs)
- RuleExpressionParser is now available to use expression evaluation outside RulesEngine
ExecuteRule
method has been renamed toExecuteAllRulesAsync
Input
field in RuleResultTree has been changed toInputs
which returns all the the inputs as Dictionary of name and value pair
- Added
Properties
field to Rule to allow custom fields to Rule
- Added exception data properties to identify RuleName.
- Optional parameter for rethrow exception on failure of expression compilation.
- Fixed binary expression requirement. Now any expression will work as long as it evalutes to boolean.
- Fixed exception thrown when errormessage field is null
- Added better messaging when identifier is not found in expression
- Fixed other minor bugs
- Adding local param support to make expression authroing more intuitive.
- Interface simplified by removing redundant parameters in the IRulesEngine.
- Custom Logger replaced with Microsoft Logger.
- Cache system added so that rules compilation is stored and thus made more efficient.
- Concurrency issue which arose by dictionary was resolved.
- Exceptions handling scenario in the case a rule execution throws an exception
- The first version of the NuGet