cheese-rules.drl

来自「jboss规则引擎」· DRL 代码 · 共 22 行

DRL
22
字号
# Example DRL with expansion 
# (ie "domain specific language")

# declare expanders for domain specific and natural language extensions
use expander cheese.dsl.properties
#this one is just a simple properties file


rule cheese_rules
    when
        Bob is in atlanta
        Bob likes cheese
	    #There exists a Guest with name of "Michael" and sex of "Male"
        >Guest( name == seatingRightGuestName, rightGuestSex:sex, rightGuestHobby:hobby )
        >Guest( leftGuestName:name , sex != rightGuestSex, hobby == rightGuestHobby )

        #count => Count() can be replaced by
        bind count to Count
    then
        Send notification to Mark with message "hello"
        >System.out.println("and this is code")
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?