RulesEngineEditor 1.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package RulesEngineEditor --version 1.1.2                
NuGet\Install-Package RulesEngineEditor -Version 1.1.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RulesEngineEditor" Version="1.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RulesEngineEditor --version 1.1.2                
#r "nuget: RulesEngineEditor, 1.1.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RulesEngineEditor as a Cake Addin
#addin nuget:?package=RulesEngineEditor&version=1.1.2

// Install RulesEngineEditor as a Cake Tool
#tool nuget:?package=RulesEngineEditor&version=1.1.2                

Rules Engine Editor

RulesEngineEditor Editor for Microsoft Rules Engine - Blazor UI library intended for integration in Web or Desktop
CC BY 4.0

Animation of Rules Engine Editor Demo

Overview

Rules Engine Editor is a library/NuGet package for use with Microsoft Rules Engine which itself is a package for abstracting business logic/rules/policies out of a system.

Installation

To install this library, download the latest version of NuGet Package from nuget.org.

How to use it

There are several ways to populate workflows for the Rules Engine Editor as listed below.

Rules are based on the Microsoft Rules Engine schema definition and can be stored in anything deemed appropriate like Azure Blob Storage, Cosmos DB, Azure App Configuration, Entity Framework, SQL Servers, file systems etc. For RuleExpressionType LamdaExpression, the rule is written as a lambda expressions.

The Rules Engine Editor can also use a format for Input Rule Parameters based on the schema defintiion and can likewise be stored as the aforementioned workflow schema. Input Rule Parameters allow the seeding of arbitrary input data to be used in the Rules Engine. Consider Input Rule Parameters like interactive "unit tests" which allow for "What-If" type analysis.

Live Demo

WebAssembly

https://alexreich.github.io/RulesEngineEditor

This can also be installed as a standalone PWA and used offline.

With Sample Data

https://alexreich.github.io/RulesEngineEditor/demo

Features

  • Works in conjunction with Microsoft Rules Engine
  • Real-time evaluation
  • Add, Edit, Delete in form view, JSON or switch between them
  • Drag, Drop objects to change order
  • Nested Rule support
  • Import, Download compliant Workflow json
  • Import, Download compliant Input Rule Parameter json
  • Design Time Support:
    • Pass pre-constructed instance of Rules Engine
    • Supports 2-way binding of Workflows
    • "Starter" Input Rule Parameter JSON
  • Allows for non-supported types in Rules Engine Workflow JSON

Usage

Simple:

<RulesEngineEditorPage />

Complex:

<RulesEngineEditorPage EditorRulesEngine="re" @bind-Workflows="Workflows" InputJSON="@Inputs" />

Complex (EF Supported):

<RulesEngineEditorPage EditorRulesEngine="re" @bind-WorkflowDatas="WorkflowDatas" InputJSON="@Inputs" />

Install

NuGet

Blazor WebAssembly / Client-side Blazor

  1. In Program.cs add
builder.Services.AddRulesEngineEditor();
  1. In _Imports.razor
@using RulesEngineEditor.Pages
  1. Add relevant styles, either add css included to site.css or inside the <head> element of wwwroot/index.html with the following statements:
<link href="_content/RulesEngineEditor/css/reeditor.css" rel="stylesheet" />
<link href="_content/RulesEngineEditor/css/dragdrop.css" rel="stylesheet" />

Server-side Blazor

  1. In Startup.cs add
services.AddRulesEngineEditor();
  1. In _Imports.razor
@using RulesEngineEditor.Pages
  1. Add relevant styles, either add css included to site.css or inside the <head> element of Pages/_Host.cshtml with the following statements:
<link href="_content/RulesEngineEditor/css/reeditor.css" rel="stylesheet" />
<link href="_content/RulesEngineEditor/css/dragdrop.css" rel="stylesheet" />
Entity Framework Demo Setup
  1. Ensure SQL Express is set up<br>c:\> sqllocaldb
  2. Create an instance of the test database<br>>sqllocaldb c "RulesEngineEditorDB" -s
  3. Open Package Manager Console (View > Other Windows > Package Manager Console)<br>Add-Migration init<br> Update-Database
Suppress top level Buttons

Any/all of the following menu buttons can explicitly disabled:
NewWorkflows, DownloadWorkflows, ImportWorkflows, AddWorkflow, NewInputs, DownloadInputs, ImportInputs, AddInput
See DemoEF for example usage.

What's Next

  • UI Update - large data (workflow, rule) handling
  • Support for more types (ActionInfo, RuleActions, etc.)
  • Continued synchronization with releases of Microsoft Rules Engine
  • Blazor Desktop

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

:heart: Sponsor

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.0 3,921 7/28/2023
1.3.1 3,179 1/30/2023
1.3.0 265 1/30/2023
1.2.2 300 1/30/2023
1.2.1 5,336 6/27/2022
1.2.0 418 6/27/2022
1.1.2 493 6/9/2022
1.1.1 2,648 10/29/2021
1.1.0 576 10/1/2021
1.0.11 427 9/25/2021
1.0.10 442 9/25/2021
1.0.9 441 9/21/2021
1.0.8 345 9/20/2021
1.0.7 343 9/19/2021
1.0.6 326 9/18/2021
1.0.5 305 9/18/2021
1.0.4 326 9/16/2021
1.0.3 360 9/16/2021
1.0.2 327 9/16/2021
1.0.1 333 9/16/2021
1.0.0 372 9/14/2021