Commit Graph

56 Commits (main)

Author SHA1 Message Date
Abbas Cyclewala 9b53a9aa3a
Users/abbasc52/dotnet8 (#571)
* updated to dotnet 8

* fixed readme formatting

* removed unnecessary dependencies
2024-01-13 15:20:51 +05:30
Abbas Cyclewala 22353a38d0
Abbasc52/optional fast compile (#570)
* added setting to turn off fast compilation

* added test cases and docs on ReSettings

* added ruleparameter.create method

* updated CHANGELOG
2024-01-12 18:32:53 +05:30
Abbas Cyclewala 9bcf4f334b
Users/abbasc52/doc updates (#555)
* added custom type injection in docs

* updated expression parser to support null Resettings and added standalone evaluator sample

* fixed missing bracket
2023-11-26 14:38:11 +05:30
Abbas Cyclewala b783602fe6
updated dependencies (#554)
* updated dependencies

* updated changelog

* added test case to check both static and not static fields are accessible

* fixed warnings
2023-11-26 12:09:17 +05:30
Abbas Cyclewala 9e7918dde2
Abbasc52/linux behaviour test (#512)
* Added testcase as per bug

* fixed test case

* Added tests from bugs

* fixed version for FastExpressionCompiler

* updated changelog and added readme file in nuget
2023-08-16 08:53:08 +05:30
Abbas Cyclewala 103e817431
Added option to disable auto type registry (#501)
* - added option to disable auto type registry
- removed caching from RuleExpressionParser

* updated test cases

* added test cases
2023-07-12 18:18:11 +05:30
Abbas Cyclewala 47e7809591
Users/abcy/libupdate (#496)
* updated dependencies

* - Improved global param compilation for multiple rules

* update version number

* updated the changelog
2023-07-08 15:35:01 +05:30
Abbas Cyclewala caf41e3cd3
added basic tests for jobject based inputs (#454)
* added basic tests for jobject based inputs

* fixed test case
2023-02-01 13:23:18 +05:30
dependabot[bot] 7b4e45d2ad
Bump Microsoft.NET.Test.Sdk from 17.3.1 to 17.3.2 (#397)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.1 to 17.3.2.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.3.1...v17.3.2)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-14 09:46:56 +00:00
Abbas Cyclewala d0133155d6
* Updated dependecies (#394)
* * Updated dependecies
* fixed build error
* removed obsolete code

* fixed coverage threshold

* updated changelog

* removed key hashing as it can lead to conflicts

* updated container image
2022-10-01 10:23:01 +05:30
Steven Frew a74f73a44e
suggested fix for issue #384 (#386)
* fix for ruleparameter name changes against cached rules

* fixed indentation to match rest of code

* suggested change implemented
2022-09-05 09:14:18 +05:30
dependabot[bot] dd9f6f3979
Bump System.Text.Json from 6.0.3 to 6.0.4 (#359)
Bumps [System.Text.Json](https://github.com/dotnet/runtime) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v6.0.3...v6.0.4)

---
updated-dependencies:
- dependency-name: System.Text.Json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-19 19:48:57 +05:30
dependabot[bot] 840bcbc92b
Bump xunit.runner.visualstudio from 2.4.3 to 2.4.5 (#355)
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.4.3 to 2.4.5.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/commits)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abbas Cyclewala <abcy@microsoft.com>
2022-05-18 15:32:21 +05:30
dependabot[bot] b8cc8cbbb1
Bump System.Text.Json from 6.0.2 to 6.0.3 (#342)
Bumps [System.Text.Json](https://github.com/dotnet/runtime) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v6.0.2...v6.0.3)

---
updated-dependencies:
- dependency-name: System.Text.Json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13 20:30:39 +05:30
Abbas Cyclewala 571490455c
Abbasc52/combined fixes (#341)
* Fixed actions not working with complex objects

* removed Microsoft.Extensions.Caching dependency

* * updated nuget packages
* update dotnet version to 6 for demo/test proj
* improved integration with DynamicLinq

* added test case for jsonElement getProperty method

* updated test cases to cover case insensitivity

* updated workflow schema

* added schema for list of workflows

* fixed schema name and added to solution

* Update dotnetcore-build.yml

* Update dotnetcore-build.yml

* updated unit test proj to point to dotnet 6

* removed ilogger
2022-04-12 19:24:16 +05:30
Anton Kheystver 53213bf13e
Add ContainsWorkflow method to check if workflow exists (#283)
* Add ContainsWorkflow method to check if workflow exists

* Add method to interface

Co-authored-by: anton.kheystver <anton.kheystver@opensoftdev.ru>
2021-11-25 21:02:21 +05:30
Abbas Cyclewala 108fa91968
Enhancements (#282)
* * fixed workflowInjection not working
* added optional Inputs filter for EvaluateRuleAction

* * ActionContext now supports optional inputs
* Added support to pass additionalInputs to EvaluateRule Action
2021-11-23 17:47:10 +05:30
dependabot[bot] 4afdce6c49
Bump Microsoft.NET.Test.Sdk from 16.11.0 to 17.0.0 (#266)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.11.0 to 17.0.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.11.0...v17.0.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-18 00:34:02 +05:30
Alex Reich 2af72285bc
Lang updates (#235)
* conventional progress

* Revert "conventional progress"

This reverts commit 9b404416b9.

* Spelling fixes, request for author inclusion

* Update schema & readme to match new naming convention

Co-authored-by: Alex Reich <Alex_Reich@mechanicsbank.com>
2021-09-15 09:47:46 +05:30
Abbas Cyclewala 1449d05810
Added strongname signing for RulesEngine (#231)
* Added strongname signing
2021-09-09 16:03:52 +05:30
Alex Reich 7b089a8260
Nested rules null operator check (#230)
* conventional progress

* Revert "conventional progress"

This reverts commit 9b404416b9.

* Check for issue on Rules field with missing (null) operator

* Rule Validator cleanup + Rule Validation Tests

Co-authored-by: Alex Reich <Alex_Reich@mechanicsbank.com>
2021-09-07 03:58:23 +00:00
dependabot[bot] be8a91d651
Bump Microsoft.NET.Test.Sdk from 16.10.0 to 16.11.0 (#208)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.10.0 to 16.11.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.10.0...v16.11.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-18 12:27:41 +05:30
Alex Reich 34f77ed2ec
Make consistent singlar/plural names of instances to avoid downstream… (#193)
* Make consistent singlar/plural names of instances to avoid downstream ambiguous reference issues

* Reverted ReSettings pluralization

* conventional progress

* Overhaul to simplify, cleanup, deprecate pr

* Update README.md

* Reverted RuleActions

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* Deprecate RuleAction to plural

* Reverted some name changes per @abbasc52

* Clarity + VS.NET 2019 compilation fix

* Camelcase fixes

* Reverted Id properties

* Documentation updates

Co-authored-by: Alex Reich <Alex_Reich@mechanicsbank.com>
Co-authored-by: Alex Reich <alex@alexreich.com>
Co-authored-by: Abbas Cyclewala <abcy@microsoft.com>
2021-08-13 10:04:47 +05:30
Alex Reich 9f898b703b
Entity Framework demonstration (#186)
* Initial Commit

* WIP

* Readability + null ef issue r&d

* Cleanup

* Minimum Sample

* Refactored to remove EF from DemoApp

* Fixed RuleValidator issue
Added EmptyRulesTest for expected simple and nested rules empty exception

Co-authored-by: Alex Reich <alex@alexreich.com>
Co-authored-by: Alex Reich <Alex_Reich@mechanicsbank.com>
2021-07-22 21:59:26 +05:30
Abbas Cyclewala b763f718bc
Abbasc52/actions for nested levels (#182)
* Added support for nested rule actions

* Changed type for Actions
2021-07-20 16:54:32 +05:30
Abbas Cyclewala ec172c9b0f
made AddWorkflow throw exception when trying to add an workflow which already exists (#162) 2021-06-08 09:21:02 +05:30
Abbas Cyclewala 1a1cb540f4
updated packages and readme (#161) 2021-06-07 20:31:43 +05:30
Ashish Prasad 77ed54aca7
[158] Refresh compiled rules if stale. (#159)
* [158] Refresh compiled rules if stale.

* 1. AddWorkflow should update only new rules.
1. Change to `AreCompiledRulesUpToDate`.
1. Add test cases:
  1. AddWorkflow executing previous rules.
  1. AddOrUpdateWorkflow executing new rules.

* 1. [Typo] result2 should be aserted instead of result1.

1. [NIT] Assert previousResults and newResults instead of expected and actual.

* Validate rules first before checking if the workflow name is not already added..

Co-authored-by: Ashish Prasad <ashprasa@microsoft.com>
2021-06-07 05:48:21 +00:00
dependabot[bot] fcf172d6df
Bump Moq from 4.16.0 to 4.16.1 (#144)
Bumps [Moq](https://github.com/moq/moq4) from 4.16.0 to 4.16.1.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/compare/v4.16.0...v4.16.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abbas Cyclewala <abcy@microsoft.com>
2021-05-27 10:50:16 +05:30
dependabot[bot] 21d7848ec7
Bump AutoFixture from 4.15.0 to 4.17.0 (#141)
Bumps [AutoFixture](https://github.com/AutoFixture/AutoFixture) from 4.15.0 to 4.17.0.
- [Release notes](https://github.com/AutoFixture/AutoFixture/releases)
- [Commits](https://github.com/AutoFixture/AutoFixture/compare/v4.15.0...v4.17.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abbas Cyclewala <abcy@microsoft.com>
2021-05-27 00:54:48 +00:00
dependabot[bot] f3096f9aaa
Bump coverlet.collector from 3.0.2 to 3.0.3 (#148)
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 16:19:12 +00:00
dependabot[bot] cc5e0c59b1
Bump Microsoft.NET.Test.Sdk from 16.8.3 to 16.10.0 (#145)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.8.3 to 16.10.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.8.3...v16.10.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 21:41:01 +05:30
Martin 6e66784239
Fix SonarQube's "string.IsNullOrEmpty should be used" (#137) 2021-05-21 15:46:23 +05:30
Abbas Cyclewala 331776d3e7
perf mode for nested rules (#128)
* added perf mode for nested rules

* added more tests

* Added comments for NestedRuleExecutionMode and fixed typo

* updated readme
2021-04-27 12:17:42 +05:30
Abbas Cyclewala f3ac4316df
Abbasc52/null rule param fix (#119)
* Fixed scoped parameter throwing exception on compilation error
* Fixed null RuleParameter throwing exception
* Replaced thrown Exceptions with RuleException
2021-04-19 11:21:33 +05:30
Abbas Cyclewala c7b7d42efe
Made runtime error log as exception message by default (#107) 2021-03-02 14:55:47 +05:30
Abbas Cyclewala b49ffd207d
Abbasc52/nested fix (#96)
- Added GlobalParams support #97
- LocalParams now work at all nested levels #98
- Added Enabled field to Rule to enable/disable a Rule #99
- Fixed Rule compilation error not appearing as error message in certain cases #95
2021-02-02 10:29:21 +05:30
Abbas Cyclewala 04060e7159
Fixed LocalParams Cache not getting cleaned up (#93) 2021-01-21 16:09:25 +05:30
Abbas Cyclewala 9c8b9d484e
* fixed namespace issue (#82)
* fixed namespace issue
* added editorconfig
* cleaned up files based on editorconfig
2020-12-23 11:04:10 +05:30
Abbas Cyclewala 173d2a03c9
Updated version number to 3.0.0 (#79) 2020-12-16 17:40:01 +05:30
Abbas Cyclewala b39591eac1
Added support for unlimited inputs (#76)
* Added support for unlimited inputs
2020-12-11 14:48:52 +05:30
Abbas Cyclewala a90880f126
perf improvements and benchmarking (#70)
* added perf improvements

* Added benchmark tool
2020-11-16 14:06:35 +05:30
Abbas Cyclewala b68861dfd5
Merge develop to master (#68)
* Users/abbasc52/add-actions (#56)

* Removed ruleinput

* Simplified compiled params code

* clean up and renaming

* Fixed caching and made test cases more specific

* updated settings

* updated nuget and fix warnings

* Added test case for invalid input name

* changed input from object to dictionary

* Added action related fields and added expression output action

* Added evaluateRuleAction and added basic tests for actions

* made action names and context case insensitive

* Added exception handling

* fixed exception message for parsing error

* improved constructor for action factory

* Added build trigger for pr to develop

* Added more testcases for actions

* Shared same instance of parser for RulesEngine and OutputExpression action

* fixed review comments

* Added null check for actions not mentioned in json

* pull fixes from master (#61)

* Renamed ExecuteRule to ExecuteAllRulesAsync and added action support (#63)

* Added support for actions
* Renamed ExecuteRule to ExecuteAllRulesAsync

* added github nuget publish
2020-11-02 09:25:43 +05:30
YogeshPraj a71692f5da
Added option to throw error on expression compilation failure (#57) 2020-10-12 20:59:51 +05:30
David 845e92c6e1
Added MethodCallExpression support (#53)
* MemberAccessExpression / UnaryExpression / MethodCallExpression support as long as it evaluatues to a boolean value.
2020-09-21 15:51:31 +05:30
Abbas Cyclewala 6b66162e56
Users/abbasc52/bugfixes (#48)
* Added fix for cachekey
* Added fix for unknown identifier
* Updated version number for rulesengine
* Added testcase for instance utils and typecasting
2020-09-01 12:02:48 +05:30
joshidp 0bb1e5d9f9
Fix exception thrown when errormessage field is null (#43)
* format exceptio fix

* covering test case

Co-authored-by: Deepak Joshi <dejosh@microsoft.com>
2020-08-30 10:39:16 +05:30
Abbas Cyclewala c0488f1113
Moving latest changes in develop and reverting them from master (#41)
* Revert "Increased coverage threshold to 95 for PR"

This reverts commit b545c5b4cf.

* Revert "Converted expressions to delegates and code cleanup (#34)"

This reverts commit 75baa6e358.
2020-08-28 07:44:00 +05:30
Abbas Cyclewala 75baa6e358
Converted expressions to delegates and code cleanup (#34)
* Converted expressions to delegate and code cleanup

* fixed test cases
2020-08-04 10:29:02 +05:30
joshidp a0a8938892
Rules Engine param Feature (#24)
* Feature Description
Rules Engine has a param (like ‘var’ in c#) feature support now, it makes authoring and troubleshooting of issues very easy. Now you can breakdown your bigger statements into smaller logical expressions as parameters within a rule definition.

* renaming param to localParam

* adding change log for local param

Co-authored-by: Deepak Joshi <dejosh@microsoft.com>
2020-07-22 21:04:15 +05:30