我有大量的Drools規則與類似的when
部分。例如。重複使用部分Drools` when when陳述
rule "Rule 1"
when
trn: TransactionEvent()
// some `trn` related statements
not ConfirmEvent (
processMessageId == trn.groupId)
then
// some actions
end
rule "Rule 2"
when
trn: TransactionEvent()
// some other `trn` related statements
not ConfirmEvent (
processMessageId == trn.groupId)
then
// some other actions
end
是否有可能定義一個時間這個說法
not ConfirmEvent (
processMessageId == trn.groupId)
,並根據需要以某種方式重用?
你能,請解釋第二個想法,並與代碼(規則)一些和平說明呢? –
添加到我的答案。 – Jeff
謝謝你的例子! –