Package declaration problem
by dileep_sivaraman
Our drl file snippet looks something like this :
Snippet :
<package name="com.bofa.strata.component.rules"
xmlns="http://drools.org/drools-3.0"
xmlns:java="http://drools.org/semantics/java"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs chemaLocation="http://drools.org/drools-3.0 drools-3.0.xsd
http://drools.org/semantics/java java.xsd">
<import
name="com.bofa.strata.component.rules.ProcessRuleHelper.ProcessRuleDTO" />
<import name="com.bofa.TS.AIM.IV.components.JobRequestInfo" />
<import name="com.bofa.strata.interfaces.IValueObject" />
<import name="com.bofa.strata.component.service.ServiceRequest" />
<import name="com.bofa.TS.AIM.IV.components.CheckItem" />
<import name="com.bofa.strata.presentation.accountrecord.AcctRcdItem" />
<import name="com.bofa.TS.AIM.IV.components.EstmtItem" />
<import name="java.util.List" />
<import name="java.lang.String" />
<import name="java.util.ArrayList" />
When we try to fire the rules we get the following exception.
org.drools.rule.InvalidRulePackage: Function Compilation error
Rule Compilation error The import com.bofa.TS cannot be resolved
When we change the package from "com.bofa.strata.component.rules" to
"com.bofa.TS.AIM.IV" ,it compiles fine.
Queries :
1) How do we arrive at a safe package name?
2) On what basis is the error thrown ?
--
View this message in context: http://www.nabble.com/Package-declaration-problem-tf3374964.html#a9392071
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 8 months
Using rules with database scenario
by Joe Chuby
Hi all,
First time trying to learn JBoss Rules here. We have a pretty large database (DBMS), we want to build some rules and retrieve data based on the rules.
Could someone give a hint or an example of this usage scenario? I mean, how can I use rules for database query, without writing my rules in SQL directly? We are currently writing everything in HQL (Hibernate), but the rules change every 3 months on average, so that's not a way to maintain the system. Therefore, we want to extract that portion of the business logic out of the code. The data structure does not change, but the rules keep on changing.
I'm reading the user's guide, running thru the examples, writing some of my own, but still no clue how to make it work with database.
If someone could give a sample, that would be greatly appreciated.
Thanks a lot.
---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
17 years, 8 months
Need Inputs on Project
by Kalyan Mudumbai
Hi,
We are considering to use JBoss Rules for one of our new projects. The end
product is pretty much a transaction processing engine - where in we get
some trades and we need to process the trades and insert them into the
database. As we can get many trades and as there are many conditions that
have to be satisfied and a lot of enrichment that needs to be done, we want
to make use of some rule based engine to validate and enrich the incoming
data. The application has to support quite a significant amount of
throughput in a concurrent system where trades can get processed on multiple
threads.
I'd like to know if anyone has ever considered JBoss Rules for time critical
scenarios. If anyone has some performance figures that would be of immense
help.
Cheers
Kalyan
17 years, 8 months
RE: [rules-users] Rules with Lookup Tables...
by Anstis, Michael (M.)
I don't have the syntax at hand but Edson has previously posted about
using "from" in similar circumstances.
This would allow you to access a lookup table on a database as part of
the LHS of a rule.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of jdepaul
Sent: 01 March 2007 19:35
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Rules with Lookup Tables...
I need to evaluate a set of Rules with some of the operators comparing
values
from Facts against a changing Lookup Table - for instance:
Some Partners may have several lookup tables defined like this:
NISSAN has partner_ids = {2222, 4444, 5555, 66666} and port_locations =
{ABC, EFG, GEE, FDD...} - these values are stored in the database and
need
to be evaluated at run-time.
I suppose one way I could do this is to write a rule like this (sorry,
syntax probably off a bit)...:
rule "partner and port match"
when
$shipment: Shipment(customerName== "NISSAN", partnerID== "2222"
|| customerName=="NISSAN",
partnerID=="3333"
|| customerName=="NISSAN",
parternID=="4444")
|| customerName=="NISSAN",
portLocation=="ABC"
|| customerName=="NISSAN",
portLocation=="EFG"
|| customerName=="NISSAN",
partLocation=="FDD")
then
System.out.println("Found the right one!");
end
Trouble is that the values in these lookup tables change frequently, so
I
would like to create a rule that references a lookup table that does a
DB
lookup to evaluate the values at run-time - something like this:
rule "partner and port with lookup-table"
when
$shipment: Shipment(customerName== "NISSAN", partnerID in
$(partner_ids
) ) <-- db lookup here
|| customerName=="NISSAN", portLocation
in
$(port_locations)) <-- db lookup here
then
System.out.println("Found the right one!");
end
I know this is probably a stretch in this case - just wondering if
anyone
else was able to solve such a problem?! If so, how -
Thanks,
James
--
View this message in context:
http://www.nabble.com/Rules-with-Lookup-Tables...-tf3329159.html#a925682
5
Sent from the drools - user mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
17 years, 8 months
LHS and value
by Patrick Santana
Guys,
I have this LHS
1. when
2. map:Map();
3. map.put("UID","0");
4. eval(MapUtils.getString(map, "SUPPLIER").equals("{supplier}"));
Is it possible what I try to do in the line 3? I'm receiving: unknown:66:18 Unexpected token '"UID"'
Thank you very much,
Patrick
PS.: I'm using a .dsl file. I just removed it from here to simplify.
____________________
Patrick Santana
patrick(a)digitalbio.be
___________________________________________________________
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
17 years, 8 months
Rule does not fire after modify
by seeker
I have a rule working.
I that rule I have a fact which I want to change (meaning: a property on my
factobject) - i tried modify, this didnt work, so I now retract and assert
it anew.
I checked that with eclipse-debugger-workingmemoryview. It is really removed
and then changed and inserted again into the workingmemory.
The rule does not get fired after that, even when I set the same properties
on my factobject.
Is there something that has to be done besides modify/ retract and assert?
--
View this message in context: http://www.nabble.com/Rule-does-not-fire-after-modify-tf3369145.html#a937...
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 8 months
Commons-logging configurations errors. WHY?
by Sergio Szychowski
Hi,
this error seams to be caused by commons-logging api, take a look at
http://www.qos.ch/logging/thinkAgain.jsp
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.drools.compiler.PackageBuilder.loadCompiler(Unknown Source)
at org.drools.compiler.PackageBuilder.<init>(Unknown Source)
at org.drools.compiler.PackageBuilder.<init>(Unknown Source)
at
nova.common.session.GenericSession.configTaskData(GenericSession.java:225)
at
nova.common.session.GenericSession.initSession(GenericSession.java:77)
at
nova.test.entity.client.TestFrameTask.initSession(TestFrameTask.java:268)
at nova.common.task.FrameTask.init(FrameTask.java:12)
at nova.test.entity.client.TestFrameTask.init(TestFrameTask.java:90)
at nova.common.task.SimpleLauncher.launchTask(SimpleLauncher.java:65)
at nova.common.task.SimpleLauncher.main(SimpleLauncher.java:25)
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by
java.lang.NullPointerException) (Caused by
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:353)
at
org.apache.commons.jci.compilers.EclipseJavaCompiler.<clinit>(EclipseJavaCompiler.java:52)
... 10 more
17 years, 8 months