【问题标题】:JOINS in DROOLS加入流口水
【发布时间】:2018-08-21 15:43:05
【问题描述】:

我有两个数据对象。
1.)Customercust_idcust_typefirst_namemiddle_name
2.)accnt_prtcpntcust_idaccnt_idap_first_name)。

我需要在 accnt_prtcpnt pbject 中的 ap_first_name 字段上编写 Drools 规则,如果 cust_type 在客户对象中是“AV”,那么 ap_first_name 不应为空。我是 Drools 的新手,不知道该怎么做。可以使用公共字段cust_id 连接两个数据对象。我也在使用 KIE 工作台。

请帮忙!!

【问题讨论】:

    标签: drools drools-kie-server


    【解决方案1】:

    您的规则可能如下所示:

    rule "sample rule"
    when
        $customer : Customer( cust_type == "AV" )
        accnt_prtcpnt( cust_id  == $customer.cust_id, ap_first_name == null)
    then
        // do any action you need
    end
    

    您可以使用工作台中的普通 DRL 编辑器或一些引导式编辑器(引导式规则、引导式决策表......)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-06
      • 2011-06-21
      • 2012-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多