Skip to content

Commit

Permalink
In the README.md, there is an example of one creating a worklow and s…
Browse files Browse the repository at this point in the history
…ending 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<Workflow> workflows which is passed to the rules engine. The sample 'Example Workflow' is the only workflow in this list of workflows. (#334)

Co-authored-by: Charlie King <[email protected]>
  • Loading branch information
cking27 and seeking27 authored Mar 18, 2022
1 parent 4a2b345 commit 99bad9f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Workflow>();

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

Expand Down

0 comments on commit 99bad9f

Please sign in to comment.