RulesEngine
RulesEngine copied to clipboard
Improve Documentation
RulesEngine has many amazing features but lacks detailed documentation on those.
- Json based rules defination
- Multiple input support
- Dynamic object input support
- C# Expression support
- Extending expression via custom class/type injection
- Scoped parameters
- Post rule execution actions
Please comment on which feature you feel needs more/improved documentation.
post rule execution actions
Post rule execution actions
@asulwer @jncengineering Can you refer this - https://microsoft.github.io/RulesEngine/#post-rule-execution-actions and let me know if you need more details for it?
An example that makes use of Rule -> Properties , and where this is useful.
@abbasc52 As a complete beginner I have trouble using and understanding this. I am creating a demo application using code to setup the rules. Couple of things I cannot find in the docs:
- What does the property
Rule.SuccessEventactually do or what can it be used for? ExecuteAllRulesAsynctakes aparams[] objectas parameter, what kind of objects are expected?ActionInfohas a propertyContextof typeDictionary<string, object>, what is expected to be put in as keys and values?- When to use
ExecuteActionWorkflowAsyncvsExecuteAllRulesAsync. The first one seems useable to execute a single rule but has very different parameters.
I just want a working example in the readme that is all I am really looking for when I evaluate a project...
Is this statement from the ReSettings section of the Getting Started wiki page (still) accurate?
While, lambda expressions are quite powerful, there is a limit to what they can do because of the fact that the methods that a lambda expression can do are limited to System namespace of .Net framework.
Before I knew enough to realize that list.Contains() from the System.Linq namespace wouldn't work as shown in the code sample for Custom Types, I used it in an expression and it, in fact, does work. I have the unit tests to prove it. Perhaps this is a legacy example from earlier versions that is no longer accurate and needs to be adjusted or removed?
I'd be happy to simplify my example and post a code-snippet if it would help.
@bsstahl many of the linq operations works as is, maybe we can use a different example so as to not confuse users.
List of all linq operations supported can be found here - https://dynamic-linq.net/expression-language#sequence-operators
And you are right, that statement does need some work. If you are interested, we could add linq support as a separate feature, and you can help with the documentation.
It would be nice if you could add an section for best practices for unit Testing Rules? Or how other people solve this issue with continuously changing rules, do you test these rules if the result is the expected SuccessEvent?
Actions seem to need a LOT more documentation. Apparently there are certain "magic" names you need to use for the names of actions? ("OutputExpression") and for the name of context dictionary items ("expression") that isn't documented clearly. Are there more magic strings to use? Another option beside documenting would be making these values into enums instead.
@asulwer @jncengineering Can you refer this - https://github.com/microsoft/RulesEngine/blob/docs/docs/index.md#post-rule-execution-actions and let me know if you need more details for it?
The link is dead...is there a new page?
@jmiedreich please refer - https://microsoft.github.io/RulesEngine/#post-rule-execution-actions. I have updated the link in original post as well
Thank you