I assume Vehicle is in your POJO model?
I also assume your import statements (in your package configuration) also
include Vehicle (if it is in a different package to that in which your QA
Test is being defined)?
2011/10/17 Zink, John <JZink(a)plymouthrock.com>
Thanks for the advice Mike. I did a quick read of the user manual
and
was able to setup a rule based on some of the fields I created in the POJO.
****
** **
My next thing to try was to test a rule. So thru Guvnor I setup a “Test
Scenario”.****
When I click the “Run Scenario” I get a “[package configuration
problem]Error importing : Vehicle error”.****
** **
Any ideas?****
** **
*From:* rules-users-bounces(a)lists.jboss.org [mailto:
rules-users-bounces(a)lists.jboss.org] *On Behalf Of *Michael Anstis
*Sent:* Sunday, October 16, 2011 3:06 AM
*To:* Rules Users List
*Subject:* Re: [rules-users] Drools Guvnor -- Not seeing Model Correctly**
**
** **
Hi,****
You can create two types of Model I'm Guvnor: 1) a declarative model, in
which case you can open the model and see the facts and fields; 2) upload a
POJO model, in which case the model screen only allows you to download the
current version.****
When authoring rules in Guvnor you select a Fact (class) first and then
click on this to select fields.****
By what you describe I get the feeling you may not have read Guvnor's
user-guide. Please do have a look.****
With kind regards,****
Mike****
sent on the move****
On 16 Oct 2011 03:07, "johnz" <jzink(a)plymouthrock.com> wrote:****
I'm new to Drools. Want to play with Guvnor to see if it will be
applicable
for my application.
I have Guvnor running thru Eclipse/Jboss. I can get into Guvnor and create
categories and packages.
I create a real simple domain model (see below). I then upload the jar
file
to create a model in Guvnor.
After uploading i don't see anything appear on the model tab. i was
expecting to see the classes and attributes. when i try creating a new
rule
using the model i only see the class, but don't see any of the attributes.
what am i doing wrong?
here is the code for the domain model
public class Driver {
private String name;
private int age;
private Vehicle car;
public Driver() {}
public Driver(String name, int age, Vehicle car) {
this.name = name;
this.age = age;
this.car = car;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Vehicle getCar() {
return car;
}
public void setCar(Vehicle car) {
this.car = car;
}
}
public class Vehicle {
private Long id;
private String make;
private String model;
private String VIN;
private String damageType;
public Vehicle()
{
}
public Vehicle(Long id, String make, String model, String VIN, String
damageType)
{
this.id = id;
this.make = make;
this.model = model;
this.VIN = VIN;
this.damageType = damageType;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getMake() {
return make;
}
public void setMake(String make) {
this.make = make;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public String getVIN() {
return VIN;
}
public void setVIN(String vIN) {
VIN = vIN;
}
public String getDamageType() {
return damageType;
}
public void setDamageType(String damageType) {
this.damageType = damageType;
}
}
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-Guvnor-Not-seeing-Model-Correctl...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users****
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users