首页 > 解决方案 > KIE Workbench 决策表没有给出任何结果

问题描述

这是我的规则文件;

package com.myspace.sample;

import com.myspace.sample.lookupValue;

rule "5 Year Loan"
    when
        LK:lookupValue(type=="5 Year")
    then
        LK.setValue("5");
end


rule "7 Year Loan"
    when
        LK:lookupValue(type=="7 Year")
    then
        LK.setValue("4.8");
end


rule "10 Year Loan"
    when
        LK:lookupValue(type=="10 Year")
    then
        LK.setValue("4");
end

这是我的对象模型

package com.myspace.sample;

public class lookupValue implements java.io.Serializable {

    static final long serialVersionUID = 1L;

    @org.kie.api.definition.type.Label(value = "name")
    private java.lang.String name;
    @org.kie.api.definition.type.Label(value = "type")
    private java.lang.String type;
    @org.kie.api.definition.type.Label(value = "value")
    private java.lang.String value;

    public lookupValue() {
    }

    public java.lang.String getName() {
        return this.name;
    }

    public void setName(java.lang.String name) {
        this.name = name;
    }

    public java.lang.String getType() {
        return this.type;
    }

    public void setType(java.lang.String type) {
        this.type = type;
    }

    public java.lang.String getValue() {
        return this.value;
    }

    public void setValue(java.lang.String value) {
        this.value = value;
    }
}

标签: javadroolsjbpmkiekie-workbench

解决方案


推荐阅读