Re: [rules-users] exception jitting problem
by Mario Fusco
brendanneff wrote
>
> I read a few forum posts about updating to 5.4 CR1 (we're using 5.4
> Final), but wanted to ask and see if that's really the cause before I
> start changing the version. I also saw that casting as an Integer, which
> we do, could solve the problem. Could someone take a look at this and let
> me know if changing to CR1 would fix the issue or if there's a simpler
> solution?
>
I am afraid you misread some former email. I think nobody wrote (or at least
I couldn't find it) that using the 5.4.CR1 release instead of the 5.4.Final
could fix this problem. Quite the opposite actually. I fixed some of these
jitting issues we had between the CR1 and the Final and some others
(including the one you found) remained even in the Final release.
I think I've fixed all the outstanding jitting issues and these fixes will
be available in the upcoming 5.5 release (we are deploying the beta1 in
these days). However it would be great if I could reproduce the bugs you
found, both because I could check if they are actually fixed in the 5.5 and
possibly give you some more informed suggestions to workaround them in the
5.4. In order to do that, the only info I miss is how the CMVNewLoanBean
class is made. Could you please send its source code (or at least the parts
relevant for the 2 failing rules you have) ?
brendanneff wrote
>
> Here are the rules that seem to be causing the errors:
>
> rule "Cashcure - Average Monthly Income Less Than 1251"
> when
> $loan : CMVNewLoanBean( new
> Integer(getCustomer().getLatestEmployer().monthlySalary) < 1251)
> then
> $loan.setLenderError($loan.getCurrentLender().getName(), 20253);
> end
>
Out of curiosity, why do you create the new Integer there instead of just
doing:
CMVNewLoanBean( getCustomer().getLatestEmployer().monthlySalary < 1251)
Thanks for reporting this,
Mario
--
View this message in context: http://drools.46999.n3.nabble.com/exception-jitting-problem-tp4019763p401...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
System problems
by paco
I am using Drools 5.4.0, guvnor 5.3.0 and default database.
I imported the rules with XML file (550 KB) in Guvnor. After I can check,
validate and test (with run analysis button) the rules without problems.
Everything works fine.
After when I import ed other rules XML file (30,000 KB), I realized that the
system becomes too slow and obviously I can no longer veifier, validate or
test my rules.
Please suggest
--
View this message in context: http://drools.46999.n3.nabble.com/System-problems-tp4018363.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Adding .package files to a KnowledgePackage
by Paul Ryan
So drools will respect files with a .package extension as a place for declared types, functions, etc. when used with these in the class path. How can a import these into a KnowledgePackage/KnowledgeBase so they can get compiled along with stuff when this is not in the class path at startup? My use case is such that these are not in the same space and can't be loaded at startup time in most cases.
Any help is greatly appreciated,
-- Paul Ryan
13 years, 3 months
Changing the java compiler level in drools
by balaji.govindarajulu
I want to change the java compiler level to 1.6 but it doesn't seem to work
for me. I am trying to use generics in the consequence part.
Following is my code that I used to change the compiler level.
*Drools Version: 5.2.1 GA
JDK Version : 1.6*
*final Properties properties = new Properties();
properties.setProperty("drools.dialect.java.compiler", "JANINO");
properties.setProperty("drools.dialect.default", "java");
properties.setProperty("drools.compiler.lnglevel", "1.6");
PackageBuilderConfiguration packageBuilderConfiguration =
new PackageBuilderConfiguration(properties,(ClassLoader[]) null);
final KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder(packageBuilderConfiguration);*
Let me know where I am going wrong.
Thanks for the help.
--
View this message in context: http://drools.46999.n3.nabble.com/Changing-the-java-compiler-level-in-dro...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Cutom Attributes in Drools
by dme1
Hi,
Is there support for Custom Attributes in Drools? What I want to do is add
attributes which determines when rules should be fired as well as attributes
that the rule updates which I can query at a later time.
E.g. Fire rule only for specific regions. So when new rules are
created/added BAs can define if it is applicable to specific regions.
Then the rule could result in a violation that could or could not be
overriden, so I want to add an attribute called override which is set by the
rule, which I can check after all rules are fired. I can use MetaData to
define this, but I need a pre-defined list which BAs can choose from when
creating a new rule.
Any thoughts on how I can implement this would be appreciated.
Thanks,
dme
--
View this message in context: http://drools.46999.n3.nabble.com/Cutom-Attributes-in-Drools-tp4019692.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Re: [rules-users] Data Model Dependencies in Guvnor
by Stephen Masters
I think this is the only option:
Upload the model into the global area, then within each package, you can create a new model and instead of uploading you can "Import from Global".
Although this is duplication rather than dependency, and you need to copy into each of your packages every time the model is updated. :-/
There is a Jira based on a similar request, but it has been unresolved for a good while:
https://issues.jboss.org/browse/GUVNOR-1401
Steve
> On 14 Sep 2012, at 14:54, dme1 <mehtad(a)hotmail.com> wrote:
>
>> Thanks Stephen for the detailed explanation. I agree that its not a good
>> option to add the dependency to the Server lib, and I also do not want to
>> mix up facts between my Java project and Drools, for various reasons.
>>
>> One other related question though, is there a way in Guvnor to specify
>> dependency amongst packages, i.e. can I say that the Extended Package
>> depends on the Common Package and it able to view the Model and all other
>> artifacts from Common. I did not see a way to do this, but want to check if
>> there is any way this can be achieved, which can help with a number of
>> things including Overrides etc. (when implemented)
>>
>> Thanks,
>> dme
>>
>>
>>
>> --
>> View this message in context: http://drools.46999.n3.nabble.com/Data-Model-Dependencies-in-Guvnor-tp401...
>> 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
>
13 years, 3 months
Data Model Dependencies in Guvnor
by dme1
Hi,
I have created 2 projects in Eclipse - the first one is the Base Project
with the Model defined for this as BaseModel.jar. The send one is the
Extension Project which inherits the BaseModel and extends it, this Model is
called ExtendedModel.jar.
In Eclipse I can set the dependency on BaseModel in the Extended Project and
can write rules using the Base and Extended Models.
Now I create 2 packages in Guvnor one to represent the Base Project, the
second to represent the Extended Project. I upload the BaseModel to the
BaseProject and the associated technical rules and this all works well.
In the Extended Package I upload the "BaseModel.jar" successfully, however
when I try to upload the "ExtendedModel.jar" it gives me an Error. The only
way I can resolve my error is to update the ExtendedModel.jar to include all
classes from BaseModel.jar, so it seems like the Guvnor requires all
dependencies to be resolved within the Model jar and cannot reference other
Data Models within the same package.
Is there a way for Guvnor to lookup the other Models for dependencies and
resolve the dependencies? If not what is the recommended approach for
specifying dependent models in Guvnor?
Thanks,
dme
--
View this message in context: http://drools.46999.n3.nabble.com/Data-Model-Dependencies-in-Guvnor-tp401...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months