Skip to Content
0
Former Member
Apr 01, 2009 at 02:52 PM

Using Java Classes Complex Types in Decision Tables

47 Views

Hi ,

I am trying to get the Vehicle Insurance Sample application to work with Java Classes instead of the XSD approach, I have the following Java Bean Class [CustomerVO] which has Complex types for [ClaimVO, InsuranceVO and VehicleVO].

public class CustomerVO {
            private InsuranceVO vehicleInsurance;
	private boolean married;
	private String state;
	public VehicleVO insuredVehicle;
	private String whereYouLive;
	private boolean hasDriver;
	private ClaimVO insuranceClaim;

...//accessor & mutator methods
}

public class InsuranceVO {
	private String insuranceType;
	private boolean includeTheft;
...
}

public class VehicleVO {
	private String make;
	private String model;
...
}

public class ClaimVO {
	private String damageType;
	private int noOfPeopleInVehicle;
...
}

The problem is after i have added the classes to the Rule Modeling--> Aliases I dont see the complex types in the Add Condition window, while creating decision table conditions. I am only able to see the simple types like String,boolean, int... We will be populating only the CustomerVO with all its complex and simple types and be invoking the Rules with it. Eg:

CustomerVO custVo = new CustomerVO();
//populated the complex type
inputList.add(custVo);
output =  ruleEngine.invokeRuleset(projectName, rsName, inputList);

Is there a way to use conditions like "CustomerVO.getInsuredVehicle.getMake" in the decision tables?

Thanks,

Raghav