来自 drools 决定的设置列表 table

Setting list from drools decision table

我正在使用 drools 来实现某些 condtion.I 不知道如何设置 来自 drools 决定 table.For 的 bean 的数组列表下面是我的 class.

public class Dog implements Serializable{

 private String id;
 private List<String> names;

}

我的决定table应该根据id设置名字列表paseed.How来实现这个?

Conditon    Action
d:Dog
id          ???(what needs to be done here)
1           "tom","jack","pearl"

这可以用通常的方式完成。

Condition    Action
d:Dog        d.getNames()
id           addAll(Arrays.asList($param))
Match id!    Add some names!   
1            "tom","jack","pearl"

您必须导入数组或使用完整的 class 名称。

如果您使用电子表格文件(.xlsx 或 .xls),那么您可以试试这个:

pojo 类:

public class CategoryEntity {

       private String type;
       private String allAction;
       private List<String> actionList; // list

       // Getters and Setters 

}

电子表格文件是这样的: