Skip to content

Instantly share code, notes, and snippets.

@bsbodden
Created August 10, 2015 03:38
Show Gist options
  • Save bsbodden/f4d709516df8a9dd2e2c to your computer and use it in GitHub Desktop.
Save bsbodden/f4d709516df8a9dd2e2c to your computer and use it in GitHub Desktop.
Drools Loans DSL snippet
[condition][]the lender is “{mortgage_company}"=
mortgage:Mortgage(lender:lenderName == “{mortgage_company}",product:mortgageName)
[condition][]and there is an application=
application:LoanApplication(lenders contains lender)
[condition][]- with a FICO score below {score}=ficoScore<{score}
[consequence][]reject the application because “{message}"=
application.addMessage("Declined by " + lender + " because {message}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment