RulesEngine icon indicating copy to clipboard operation
RulesEngine copied to clipboard

Improve Documentation

Open abbasc52 opened this issue 4 years ago • 13 comments

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.

abbasc52 avatar Feb 10 '21 07:02 abbasc52

post rule execution actions

asulwer avatar Apr 16 '21 19:04 asulwer

Post rule execution actions

jncengineering avatar Apr 26 '21 06:04 jncengineering

@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?

abbasc52 avatar Apr 30 '21 15:04 abbasc52

An example that makes use of Rule -> Properties , and where this is useful.

jafin avatar Sep 04 '21 12:09 jafin

@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:

  1. What does the property Rule.SuccessEvent actually do or what can it be used for?
  2. ExecuteAllRulesAsync takes a params[] object as parameter, what kind of objects are expected?
  3. ActionInfo has a property Context of type Dictionary<string, object>, what is expected to be put in as keys and values?
  4. When to use ExecuteActionWorkflowAsync vs ExecuteAllRulesAsync. The first one seems useable to execute a single rule but has very different parameters.

Expecho avatar Oct 16 '21 12:10 Expecho

I just want a working example in the readme that is all I am really looking for when I evaluate a project...

creed30 avatar Jan 27 '22 19:01 creed30

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 avatar Aug 27 '22 15:08 bsstahl

@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.

abbasc52 avatar Aug 29 '22 11:08 abbasc52

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?

squadwuschel avatar Dec 07 '22 13:12 squadwuschel

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.

pburrows avatar Feb 04 '23 13:02 pburrows

@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 avatar Mar 03 '23 15:03 jmiedreich

@jmiedreich please refer - https://microsoft.github.io/RulesEngine/#post-rule-execution-actions. I have updated the link in original post as well

abbasc52 avatar Mar 07 '23 04:03 abbasc52

Thank you

jmiedreich avatar Mar 07 '23 19:03 jmiedreich