• Drools.Net Bug?


    这两天在看这个规则引擎,Drools JAVA版已经5.0了,可怜的drools.net,是基于3.0版本的.郁闷的是,MS有BUG.

    • 这是BUG么?

    1.在rule文件,你可以:
    global System.Collections.ArrayList list
    global System.Text.StringBuilder str
    global System.Int32 num
    但是不可以:
    global System.String myStr
    error: "Illegal class for global. Expected [cli.System.String], found [java.lang.String]."

    global cli.System.String myStr 显然错误,
    global java.lang.String myStr 编译通过,但运行不正确

    2.如此正确的rule:

    rule "eval test"
    when
        eval (true)
    then
        System.Console.WriteLine("eval test");
    end

    运行不了,或者说所测试过的任何eval语法,运行都是抛错误.drools.dotnet.examples 内所有示例也未见eval语法的使用例程,相当怀疑是drools.net的bug.

    • 这叫鬼异么?

    1.使用duration后是异步的
    假设你在一个rule前加duration 问题时,归则引擎的执行本身是在另外一个线程中进行的,反之在你的程序主线程的进行,(GolfingExample示例,加大外层循环,rule加入duration可试)

    rule "find solution"
    duration 1000
        when
           Golfer( fredsName : Name == "Fred",
                    fredsPosition : Position,
                    fredsColor : Color  )

    ...

    在哪个不知名的文档说明过,我找了半天也没发现...

  • 相关阅读:
    npm 版本不支持node.js的解决方法
    kolla-ansible运维
    Openstack Train部署 (kolla-ansible)
    存储使用的光纤交换机
    Openstack Train部署 (openstack-ansible)
    使用cockpit-ceph-deploy部署ceph集群
    ceph集群维护
    ceph生产环境规划
    分布式存储ceph部署
    openvswitch网桥的连接方式
  • 原文地址:https://www.cnblogs.com/solo/p/1606747.html
Copyright © 2020-2023  润新知