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<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 <charlie.king@dimensional.com>pull/342/head v3.5.0
parent
4a2b345fe9
commit
99bad9ffff
13
README.md
13
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<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
|
||||
|
||||
|
|
Loading…
Reference in New Issue