GithubHelp home page GithubHelp logo

moutainhigh / rule-engine-7 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhaojc/rule-engine

0.0 0.0 0.0 471 KB

License: Apache License 2.0

Dockerfile 0.07% Java 98.28% Batchfile 0.03% Shell 0.03% FreeMarker 1.60%

rule-engine-7's Introduction

📌 规则引擎 RuleEngine 📌

License GitHub Stars GitHub Forks GitHub issues Percentage of issues still open

业务逻辑实现不再依赖于代码开发,可零代码实现复杂业务逻辑。

前端代码地址:https://github.com/DingQianWen/rule-engine-front
项目展示地址:http://ruleengine.cn/
申请登录权限联系QQ:761945125,Email:[email protected]

技术文档

简单使用:https://blog.csdn.net/weixin_42756198/article/details/109680143

技术栈/版本介绍:

  • 所涉及的相关的技术有:
    • SpringBoot 2.1.2
    • RabbitMQ
    • Redis、Redisson
    • MySQL 5.7.9
    • Mybatis-plus
    • Mybatis-plus-generator
    • Maven 3.3
    • Swagger

规则如何调用

规则通过在 http://ruleengine.cn 配置完成后,就可以调用接口来执行引擎中的规则了

POST http://ruleserver.cn/ruleEngine/execute
Content-Type: application/json

{
      "ruleCode": "phoneRuletest",
      "workspaceCode": "default",
      "accessKeyId": "", 
      "accessKeySecret": "",
      "param": {
            "phone": "13400000000"
      }
}

现在我们让此使用方式更加简单易用! 调用规则方项目pom.xml文件引入以下依赖

    <dependency>
        <groupId>cn.ruleengine</groupId>
        <artifactId>rule-engine-client</artifactId>
        <version>1.6</version>
    </dependency>

然后编写如下代码进行测试:

@EnableRuleEngine
@RunWith(SpringRunner.class)
@SpringBootTest
public class RuleTest {

    @Resource
    private RuleEngineClient ruleEngineClient;

    @Test
    public void test() {
        // 构建规则请求参数
        PhoneTestRule phoneTestRule = new PhoneTestRule();
        phoneTestRule.setPhone("134000000000");
        // 调用执行引擎中的规则
        OutPut outPut = this.ruleEngineClient.execute(phoneTestRule);
        System.out.println(outPut);
    }

}

@Data
@RuleModel(ruleCode = "phoneRuletest")
public class PhoneTestRule {

    /**
     * ElementField可选,默认code为属性name
     */
    @ElementField(code = "phone")
    private String phone;

}

现在你就已经学会了如何使用,更多使用方式敬请期待我们将文档补全!

下一步进展

  • 规则版本(开发中)
  • 规则监控(待开发)
  • 评分卡(待开发)
  • 决策树(待开发)
  • 决策表(待开发)

目前忙于工作,功能待完善,欢迎有兴趣伙伴加入我们!

如果觉得本项目对您有任何一点帮助,请点右上角 "Star" 支持一下, 并向您的基友、同事们宣传一下吧,谢谢!

rule-engine

rule-engine-7's People

Contributors

zhaojc 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.