Droolsルールの大部分は、類似のwhen
部分を持っています。例えば。Droolsの `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
それが1時間この声明
not ConfirmEvent (
processMessageId == trn.groupId)
を定義して、必要ならば何とか再利用することは可能ですか?
あなたは、plsは、第二の考えを説明し、コード(ルール)のいくつかの平和とそれを示してもらえますか? –
私の答えに追加されました。 – Jeff
例をありがとう! –