alexreich/RulesEngineEditor
关于
Microsoft RulesEngine 的编辑器:一个可集成到 Web 或桌面应用中的 Blazor UI 库。
网站与应用开发可以做什么
- 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
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Rules Engine Editor
Editor for Microsoft Rules Engine - Blazor UI library intended for integration in Web or Desktop

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
- Current Workflow dropdown, switch between workflows as well as pass in current workflow as a parameter
- Nested Rule support
- Import, Download compliant Workflow json
- Import, Download compliant Input Rule Parameter json
- Entity Framework support for load and save (example in Server project)
- 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
- .NET 6 Support
Usage
Simple:
<RulesEngineEditorPage />
Complex:
<RulesEngineEditorPage EditorRulesEngine="re" @bind-Workflows="Workflows" InputJSON="@Inputs" />
Complex (EF Supported):
<RulesEngineEditorPage EditorRulesEngine="re" @bind-WorkflowDatas="WorkflowDatas" InputJSON="@Inputs" />
Install
Blazor WebAssembly / Client-side Blazor
- In
Program.csadd
builder.Services.AddRulesEngineEditor();
- In
_Imports.razor
@using RulesEngineEditor.Pages
- Add relevant styles, either add css included to
site.cssor inside the<head>element ofwwwroot/index.htmlwith the following statements:
<link href="_content/RulesEngineEditor/css/reeditor.css" rel="stylesheet" />
<link href="_content/RulesEngineEditor/css/dragdrop.css" rel="stylesheet" />
Server-side Blazor
- In
Startup.csadd
services.AddRulesEngineEditor();
- In
_Imports.razor
@using RulesEngineEditor.Pages
- Add relevant styles, either add css included to
site.cssor inside the<head>element ofPages/_Host.cshtmlwith 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
- Ensure SQL Express is set up
c:\> sqllocaldb - Create an instance of the test database
>sqllocaldb c "RulesEngineEditorDB" -s - Open Package Manager Console (View > Other Windows > Package Manager Console)
Add-Migration initUpdate-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.
Now supporting Chinese
What's Next
- More UI Updates - large field data (rule name, success, expression) autosize?
- Pretty JSON Expression Handling - Prism Live?
- PDF Printing, XSLX Export
- 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.
探索相关项目
加载中…
