Coder Social home page Coder Social logo

johnaho / rulesengineeditor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexreich/rulesengineeditor

0.0 0.0 0.0 100.96 MB

Editor for Microsoft RulesEngine - Blazor UI library intended for integration in Web or Desktop

Home Page: https://github.com/alexreich/RulesEngineEditor

License: Creative Commons Attribution 4.0 International

C# 54.55% CSS 9.14% HTML 36.31%

rulesengineeditor's Introduction

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

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
    c:\> sqllocaldb
  2. Create an instance of the test database
    >sqllocaldb c "RulesEngineEditorDB" -s
  3. Open Package Manager Console (View > Other Windows > Package Manager Console)
    Add-Migration init
    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

  • More UI Updates - large field data (rule name, success, expression) autosize?
  • 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

❤️ Sponsor

rulesengineeditor's People

Contributors

alexreich avatar mongeon avatar rose-pace avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.