Created
          March 11, 2016 09:15 
        
      - 
      
- 
        Save garethahealy/e34b097850da686632c9 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package org.acme.insurance.policyquote | |
| import org.acme.insurance.Driver | |
| import org.acme.insurance.Policy | |
| rule "SafeYouths" | |
| when | |
| //conditions | |
| driver : Driver(age >= 18 && < 25, numberOfAccidents < 1, numberOfTickets <= 1) | |
| policy : Policy(price == null, policyType == "AUTO") | |
| then | |
| //actions | |
| modify(policy) {setPrice(450)}; | |
| System.out.println("fired rule " + kcontext.getRule().getName()); | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment