Replies: 18 comments 2 replies
|
please check out the documentation on the original website: this content is in the folder doc, and it has most of the documentation to use the tool. |
|
in my opinion the documentation touches on the basics. what is missed is a lot. example, is missing Actions. i am just saying that we need better documentation which has been something users of RulesEngine have always complained about. |
|
Nice, so what exactly are we missing in the documentation? Would be nice to know so we can work on it. A valid good point is how to create expressions, but we can see it here: |
|
expressions are 'sort of' created for us., something i want to fix, seems hardcoded at the moment |
|
|
If anyone can provide better insights (e.g., documentation/examples) on utilizing "OnSuccess or OnFailure," that would be splendid. Specifically, how to deserialize a JSON, as shown in the picture, is where I am stuck. Json File:
Code: Error: This exception was originally thrown at this call stack: Inner Exception 1: |
|
@uBoscuBo could you please edit your comment to include that code and not an image of it? |
|
@uBoscuBo, I understand the issue you're experiencing. This problem is related to JSON deserialization rather than the rules engine itself. Specifically, note that you don't need to replace anything in the example, as we have to have double quotes in for example this case To resolve this issue, you have two options:
By setting I hope this helps! If you have any further questions, feel free to ask. |
|
@RenanCarlosPereira - Thanks for the heads up. That solved that one issue, but now I am getting the following error. System.Text.Json.JsonException: 'The JSON value could not be converted to RulesEngine.Models.RuleExpressionType. Path: $.Rules[1].RuleExpressionType | LineNumber: 27 | BytePositionInLine: 46.' Was there a change to the schema that affected the deserialization of the WorkFlow object? |
No, we didn't change anything, remember you are Deserializing an workflow not a rule. |
|
@RenanCarlosPereira , my apologies. That was a typo. You are correct on that part. I'll rephrase the question since I have resolved my issue. According to the previous error,
The problem was with the second rule's RuleExpressionType. The model itself looks like it has already initialized as a LamdaExpression. The error will be resolved if I remove this line `"RuleExpressionType": "LambdaExpression" from the JSON itself. From my observation, explicitly stating the RuleExpressionType can cause issues as it is already initialized within the code. Thoughts? I guess the only problem is that the second rule won't output its expression. |
|
@asulwer The most significant difference that pops up is using "Actions" in the JSON files, hence why I have to use the For example, from the documentation:
I guess the only thing I am confused about is why the |
|
Workflows are just a set of rules grouped. you can pass RuleExpressionType or not, as it will fallback to the default both ways works |
|
@RenanCarlosPereira - Gotcha, that makes sense. I do appreciate y'all patience and assistance. |
|
@asulwer @RenanCarlosPereira any plans concrete plans on a docs page? I see the docs folder is there like in the upstream, but should it be shown through a wiki page, or a GitHub pages type of view? Saw it is an issue on it, but it does not feel too actionable before the format is decided. I see you already had a some back and forth earlier in this discussion about changes to the docs. If there is a plan/vision for docs changes, it would be nice to have them put down in an issue if you would want help on it. |
|
the original wiki is up. it may have some link errors. current changes which distinguish between original codebase and this fork is not reflected |
Uh oh!
There was an error while loading. Please reload this page.
Examples, comments and documentation are grossly lacking. if anyone is to use this repository each feature needs to be documented
All reactions