All,
Am using Drools Workbench 6.2.0.Final to declaratively create Guided Rules...
My situation is something like this:
Have a Loan Data Object with the following attributes:
- state - String
- amount - double
- interestRate - double
- message - String
- requirement - boolean
The auto-generated drl file is:
rule "Arizona"
when
loan : Loan( state == "Arizona", amount >= 1000 , amount <= 3000,
interestRate >= 0.15, interestRate <= 0.50 )
then
loan.setRequirement( true );
end
Question(s):
(1) How can I declaratively use the Guided Rules Editor to set the following when this rule fails:
loan.setMessage( "Allowed values for amount should be in the range of 1000 to 3000");
or
loan.setMessage( "Allowed values for interest rate values should be in the range of 15% to 50%" );
(2) Is there a way to declaratively customize the SOAP Response:
e.g.
<requirement>true</true>
or
<requirement>false</requirement>
<message>Allowed values for amount should be in the range of 1000 to 3000</message>
or
<requirement>false</requirement>
<message>Allowed values for interest rate values should be in the range of 15% to 50%</message>
Do not want to do this programmatically...
Thanks to all...