[rules-users] The constructor is not visible
suddeb
sudipta.deb at gmail.com
Thu Jan 17 15:45:46 EST 2013
Hi,
I am trying to create a rule:
//list any import classes here.
*import com.sudipta.sample.Student;
import com.sudipta.sample.PassType;
rule "If Student's age is less than 19"
when
$student : Student(age<19)
then
System.out.println("Child Pass for "+$student.getName());
System.out.println("Creating PassType Object..");
insert(new PassType($student,"Child"));
end*
I am getting the error:
The constructor PassType(String) is not visible
Whereas in the PassType class, the constructor is defined like:
*public class PassType {
private Student student;
private String type;
PassType(Student student, String type){
this.student = student;
this.type = type;
}
......
}*
Can anyone please help me why this error is coming? Thanks.
Regards,
Sudipta
--
View this message in context: http://drools.46999.n3.nabble.com/The-constructor-is-not-visible-tp4021627.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list