Drools Guvnor integration with MySql
by Pardeep.Ruhil@lntinfotech.com
Hi,
I want to integrate the Drools Govnor with extenal Database (MySql).
Can anyone help me how can i do the settings to connect to the extenal
database.
Thanks & Regards
Pardeep Ruhil
L&T Infotech Ltd
Mumbai
Ph: +919820283884
Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com
This Document is classified as:
L&T Infotech Proprietary L&T Infotech Confidential L&T Infotech
Internal Use Only L&T Infotech General Business
This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do
not use or disseminate the information, notify the sender and delete it
from your system.
______________________________________________________________________
16 years, 8 months
Default Sequential Mode Order in Decision Table
by bhavesh devashraye
As per the JBoss Project Documentation it is clear that if we set SEQUENTIAL = true then it will going to execute rules in Top to Down order but what if we make this flag false and even not set this field at all?
if SEQUENTIAL = false. Will it confirm Bottom to Top order of execution?
I have observed that if not set this SEQUENTIAL flag, by default rules get executed Bottom to Top order. Does this assumption is correct? Does JBoss always execute rules from Bottom to Top order if we not set this flag ( SEQUENTIAL ) ?
-Orbit007in
16 years, 8 months
drools 5 custom evalautor
by Asif Iqbal
Hi,
Im new to drools and am trying to implement the following, and really need to override the evaluator '>' and '<' for strings... Can someone please show me how to do this?
SomeClass(version > "02.00.01" && version < "02.00.20")
regards
I
16 years, 8 months
Creating custom evaluator in drools 5
by Asif Iqbal
Hi,
Im new to drools and am trying to implement the following, and really need to override the evaluator '>' and '<' for strings... Can someone please show me how to do this?
SomeClass(version > "02.00.01" && version < "02.00.20")
regards
I
16 years, 8 months
Validation in Guvnor fails due to unrecognized method of implemented interface
by Brody bach
Hi,
I have a class which implementes several interfaces
class MyClass implements interA, interB, interC {
private String nameA;
private String nameB;
private String ownString;
public String getNameA(){ ---impl of method from interface interA
return nameA;
}
public String getNameB(){ ---- impl method from interface interB
return nameB;
}
public String getOwnString{ ---- own method
return ownString;
}
}
Another class, MyBiggerClass has MyClass as its attribute:
class MyBiggerClass {
private MyClass myClass;
public MyClass getMyClass(){
return myClass;
}
}
In a rule, I use MyBiggerClass as follows:
$mybig : MyBiggerClass()
eval($mybig.getMyClass().getNameB().equals("HelloWorld"))
The evaluation fails, and it said
unable to resolve method using strict-mode: interA.getNameB()
As you can see, the validator checks as if the getNameB was a method of
interA (the first interface).
I'm wondering whether this is a bug, or do I have to somehow change the
structure of my class.
But the question is, why does it check the interfaces not the class itself?
Thanks for advices
Regard
bb
--
View this message in context: http://www.nabble.com/Validation-in-Guvnor-fails-due-to-unrecognized-meth...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 8 months
Drools User Group Meeting - London 17th of July
by Mark Proctor
Up to date details can be found here:
http://www.bsg.co.uk/Page.aspx?id=2924
14:15 -- 18.45, Friday 17th July, BSG House, London, EC1V
The next JBug is being held on Friday 17^th July. Attending the JBug at
BSG will be a fantastic opportunity to:
* Enhance your knowledge and skills through specialist speakers
talking about hot topics
* Share your knowledge with like-minded people
* Network and Socialise
The JBug is a regular gathering of JBoss Professional and other Open
Source product users, developers, technical managers and architects. It
provides a forum that enables users and customers to get together and
discuss new technologies, development methodologies, interesting use
cases and similar technical topics. At each meeting, different speakers
will present on topics that can be suggested by the group.
The agenda for the JBug has now been finalised and it will focus on open
source business rules management system and JBoss BRMS. Presentations
include:
* BRMS Platform 5 Key Note - Mark Proctor, Worldwide JBoss Rules Lead
/State of the Union, Future State/
* BRMS Platform 5 Interactive - Graham Gear, JBoss Solutions Architect
/Simple walk through of using the BRMS Platform/
* BRMS Platform 5 Use Case - BSG
Please click here <http://www.bsg.co.uk/page.aspx?ekfrm=1798> to
register your place at this event.
16 years, 8 months
Comparing multiple accumulations
by Richard Sherman
First I'm new to drools and secondly where I'm working we're using version 4.0.7.
I have a list of accounts and each account contains a list of transactions. I wish to accumulate charge transactions and compare them to an accumulation of payment transactions for a given time period (such as the last month). And it gets slightly more awkward in that if a payment transaction is of a certain type it needs to be converted from a 4 weekly figure to a monthly figure ( using / 4 / 7 * 365 / 12). I've tried to use structures as follows but they are causing the then part of the rule never to fire.
rule "Account in arrears"
salience 10
no-loop
when
$acc : Account( // balance between £500 and £1000
accountBalanceInPence >= 50000 &&
accountBalanceInPence <= 100000
)
$s : MessageInfo( accountNumber == $acc.accountNumber )
Number($charges : intValue) from
accumulate(
(Transaction(
transactionDate > oneMonthAgo &&
amountInPence > 0 &&
$value : amountInPence)
from $acc.transactions),
sum($value)
)
Number($adjustment : intValue) from
accumulate(
(Transaction(
transactionDate > oneMonthAgo &&
amountInPence < 0 &&
transactionCode == "Type 1" &&
$value : amountInPence)
from $acc.transactions),
sum(($value / 4 / 7 * 365 / 12) - $value)
)
Number( intValue > ($charges + $adjustment)) from
accumulate(
(RentTransaction
(transactionDate > oneMonthAgo
$value : amountInPence)
from $acc.transactions),
sum($value)
)
then
$s.setMessage( "Account in arrears" );
update($s); // flag update
end
Thanks
Richard
_________________________________________________________________
With Windows Live, you can organise, edit, and share your photos.
http://clk.atdmt.com/UKM/go/134665338/direct/01/
16 years, 8 months
classLoader issue...
by Jason Davidson
I'm getting this error message too. I'm running Drools 5.0.1 as a
bundle within an OSGi container. Like the parent post indicates it
worked with Drools 4.0.7 and it only happens when I put constraints on
fact fields.
Here's my stack:
Root exception:
java.lang.NoClassDefFoundError: org/drools/base/extractors/
BaseObjectClassFieldReader
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at org.drools.base.ClassFieldAccessorCache
$ByteArrayClassLoader.defineClass(ClassFieldAccessorCache.java:367)
at
org
.drools
.base
.ClassFieldAccessorFactory
.getClassFieldReader(ClassFieldAccessorFactory.java:135)
at org.drools.base.ClassFieldAccessorCache
$CacheEntry.getReadAccessor(ClassFieldAccessorCache.java:315)
at
org
.drools
.base
.ClassFieldAccessorCache.getReadAcessor(ClassFieldAccessorCache.java:
245)
at
org
.drools.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:
379)
at
org
.drools
.base.ClassFieldAccessorStore.merge(ClassFieldAccessorStore.java:270)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:
466)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:388)
at com.cjs.core.rules.RulesEngine.startEngine(RulesEngine.java:102)
at com.cjs.core.rules.RulesEngine.<init>(RulesEngine.java:44)
at com.cjs.core.rules.RulesEngine.getInstance(RulesEngine.java:58)
at
com
.cjs
.core
.rules
.RulesEngineServiceFactory.getEngine(RulesEngineServiceFactory.java:22)
at com.cjs.hazel.rules.test.Activator.start(Activator.java:21)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl
$1.run(BundleContextImpl.java:782)
at java.security.AccessController.doPrivileged(Native Method)
at
org
.eclipse
.osgi
.framework
.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:
773)
at
org
.eclipse
.osgi
.framework
.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
at
org
.eclipse
.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
352)
at
org
.eclipse
.osgi
.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at
org
.eclipse
.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:
1068)
at
org
.eclipse
.osgi
.framework
.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:
557)
at
org
.eclipse
.osgi
.framework
.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at
org
.eclipse
.osgi
.framework
.internal
.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at
org
.eclipse
.osgi
.framework
.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:
445)
at
org
.eclipse
.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:
220)
at org.eclipse.osgi.framework.eventmgr.EventManager
$EventThread.run(EventManager.java:330)
> Thanks for your answer !
>
> My configuration seems correct to me, I have all new jars in the
> classpath (the ones indicated in the file README-DEPENDENCIES.txt at
> the
> SVN trunk). I checked them all looking after another
> BaseObjectClassFieldReader class, but only drools-core contains it.
>
> By the way, rules are well compiled and executed, this issue only
> happens when I put constraints on fields. So I think if drools-core
> was
> not in the classpath, nothing would work at all...
>
> Le mercredi 01 juillet 2009 à 08:46 -0400, Edson Tirelli a écrit :
> >
> > It seems to me that the problem is not with the classloader of
> your
> > classes, but the classpath of the drools jars. Are you sure you
> > updated and have all the required new jars in your classpath?
> Drools 5
> > has a few new jars, like drools-api, that need to be available.
> Also,
> > check if there are any older jar still in the classpath that might
> be
> > clashing with the new jars.
> >
> > []s
> > Edson
> >
> > 2009/7/1 Julien Nicoulaud <julien.nicoulaud at bull.net>
> > Hi, I'm migrating my system from Drools 4.0.7 to Drools
> 5.1.0.
> > Now when I try to compile rules that check fact fields, I
> get
> > the
> > following exception:
> >
> > ERROR: EventDispatcher: Error during dispatch.
> > (java.lang.NoClassDefFoundError:
> > org/drools/base/extractors/
> BaseObjectClassFieldReader)
> > java.lang.NoClassDefFoundError:
> > org/drools/base/extractors/BaseObjectClassFieldReader
> >
> > ( http://paste2.org/p/296380 )
> >
> >
> > It seems the classloaders I pass to the configurations are
> not
> > taken in
> > account... I get exactly the same error if I do not specify
> > the
> > classloaders. Here is the code:
> > KnowledgeBuilderConfiguration kBuilderCfg =
> >
> >
> KnowledgeBuilderFactory
> .newKnowledgeBuilderConfiguration(null,classLoader);
> > KnowledgeBuilder knowledgeBuilder =
> >
> > KnowledgeBuilderFactory.newKnowledgeBuilder(kBuilderCfg);
> >
> > KnowledgeBaseConfiguration kbaseConfig =
> >
> >
> KnowledgeBaseFactory
> .newKnowledgeBaseConfiguration(null,multiBundleClassLoader);
> > kbaseConfig.setOption(EventProcessingOption.STREAM);
> > knowledgeBase =
> > KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);
> >
> > On Drools 4, we did exactly the same with PackageBuilder
> > instead of
> > KnowledgeBuilder and RuleBase for KnowledgeBase. So the
> > classloaders I
> > pass are the good ones... Is there some trick ?
> >
> > Thanks for any help !
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
> >
> > --
> > Edson Tirelli
> > JBoss Drools Core Development
> > JBoss by Red Hat @ www.jboss.com
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
16 years, 8 months
Drools SubFlow (Sub -Process) query API
by bdoshi
Hi,
I am new to drools and have following scenario and question.
Consider my main flow "A" (runtime instance id 111) which has and invokes
(subprocess)SubFlow "B" (runtime instance id 222).
Question,
Is there an API to find the list of subprocess (subflow) associated with
parent instance or parent process associated with a given subprocess?
e.g. in above case... From process instance 111 can we get handle or
information of 222
or
form process instance 222, can I get information of parent who created this
instance (111).
Thanks,
--
View this message in context: http://www.nabble.com/Drools-SubFlow-%28Sub--Process%29-query-API-tp24434...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 8 months