Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.permapipe.lebanon.estimating;
- declare Fired
- rule: String
- end
- rule "F060" dialect "mvel"
- when
- then
- Fired f = new Fired();
- f.rule = "F060"
- insert(f);
- end
- rule "F060b" //this prints F060b: Fired( rule=F060 )
- dialect "mvel"
- when
- $rule: Fired()
- then
- System.out.println (drools.getRule().getName()+': '+$rule)
- end
- rule "F060c" //doesn't work
- dialect "mvel"
- when
- $rule: Fired( rule=="F060" )
- then
- System.out.println (drools.getRule().getName()+': '+$rule)
- end
- rule "F060d" //this prints F060d: Fired( rule=F060 )
- dialect "mvel"
- when
- $rule: Fired()
- eval( $rule.rule == "F060")
- then
- System.out.println (drools.getRule().getName()+': '+$rule)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement