From db07a6aa3cc5d7d3321c2fb0dfbc7866cf374f47 Mon Sep 17 00:00:00 2001 From: Charlie King Date: Thu, 17 Mar 2022 16:50:41 -0500 Subject: [PATCH] In the README.md, there is an example of one creating a worklow and sending it to the rules engine. This MUST be an array (not a single workflow) and the current documentation if one was following along would not compile. I updated the sample code to have a new var List workflows which is passed to the rules engine. The sample 'Example Workflow' is the only workflow in this list of workflows. --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fb965fc7..cc967e4b 100644 --- a/README.md +++ b/README.md @@ -84,12 +84,15 @@ rule.Expression = "count < 3"; rule.RuleExpressionType = RuleExpressionType.LambdaExpression; rules.Add(rule); -Workflow workflow = new Workflow(); -workflow.WorkflowName = "Example Workflow"; -workflow.Rules = rules; -workflow.Add(workflowRule); +var workflows = new List(); -var bre = new RulesEngine.RulesEngine(workflow.ToArray(), null); +Workflow exampleWorkflow = new Workflow(); +exampleWorkflow.WorkflowName = "Example Workflow"; +exampleWorkflow.Rules = rules; + +workflows.Add(exampleWorkflow); + +var bre = new RulesEngine.RulesEngine(workflows.ToArray(), null); ``` ### Entity Framework