📄 helloworld.drl
字号:
package HelloWorld
#we don't use the import, as class is fully qualified below
#import org.drools.integrationtests.helloworld.Message
global java.util.List list;
rule "Hello World"
when
$m : org.drools.integrationtests.helloworld.Message(list contains "hello",
text:message == "hola",
number > 40,
birthday > "10-Jul-1974",
message matches ".*ho.*",
list excludes "wax")
then
// putting in a complex consequence, to make sure it picks up the variabels correctly
if (1==1) {
int a = 0;
}
try {
System.out.println("hello world with collections " + $m.getMessage());
} catch ( Exception e ) {
} finally {
list.add( $m );
}
$m.setFired(true);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -