将对象列表中的字段与Drools中的字符串列表进行比较

时间:2017-07-17 12:49:42

标签: drools mvel

假设我在Drools中有一个Policy对象,该对象包含ListCover个对象,名为coversList为{{1}对象,称为String

requestedCovers对象包含Cover字段,该字段是type个对象。

如果requestedCover与封面列表中的类型不匹配,我想触发规则。

String

然而,这似乎触发了每个封面都是封面列表。

如何创建此规则?

2 个答案:

答案 0 :(得分:0)

这个笨重的对象中有两个列表,其中一个是另一个列表的剪切。你需要的是.overlay { display: block; position: absolute; top: 0; left: 0; width: 100%; height: 0; z-index: 10; transition: background-color .5s ease-in; background-color: rgba(0, 0, 0, 0); } .overlay-start-off { transition: height 0s ease-in 0; } .overlay-start-on { transition: height 0s ease-in .5s; } .overlay--show { height: 100%; background-color: rgba(0, 0, 0, 0.4); } (一组差异)的集合。

将设置差异作为方法编写,无论是在Policy中还是在(作为静态)单独的实用程序类中。

如果你坚持Drools,你必须

requestedCovers - covers.type

未测试!

答案 1 :(得分:0)

最后想出来了,感谢@laune的帮助

 <ScrollViewer Name="ScrollCompany"    >
  <StackPanel Name="stCompany" RenderTransformOrigin="0.5,0.5">

</StackPanel>
</ScrollViewer>


for(int i=0;i<maxCompany;i++)
{
     Grid objMain = new Grid();
      objMain.Name = "companyId" +  companyId;
    objMain.MouseDown += objCompany_MouseDown;

    // here I have adding logo and name and other thing ...

    stCompany.Children.Add(objMain);
}
相关问题