CPU Spike creating a StatefulKnowledgeSession using OSGi
by David Conde
Good Morning,
I now have drools running on the Spring DM-Server but I am seeing a CPU
spike when creating a StatefulKnowledgeSession. I've tested this outside of
an OSGi environment and I don't see the spike. Does anyone know any settings
that I can change that might make this go away?
Thanks,
Dave
--
David Conde
CTO Calom Technologies
12 years, 10 months
OSGi version of Drools
by Flavius Vespasianus
Hello,
is there anywhere a OSGi bundle with Drools 4.0.7? I know about
com.springsource.org.drools.* but these had a lot of additional
dependencies and I wasn't able to get them work.
My problem is that I need to have three projects: one is the basic
library which uses Drools very intensively. The second project is editor
- an Eclipse plugin (that's why I need the OSGi bundle) using some
classes from the basic library. It doesn't use Drools, but there is a
dependency. The third project is classic Java application, also using
the basic library.
The basic library was originally created using standard Drools project
wizard (I have downloaded the Eclipse Drools plugin -
org.drools.eclipse). But when I tried to deploy it as an Eclipse plugin,
it couldn't find the Drools classes.
I found a little workaround - I have compiled the binaries (drools-core,
drools-compiler and from libs the mvel, antlr3 and eclipse-jdt-core)
into separate plugin using "Create a plugin from existing jars" wizard.
But if I add this dependency to the basic library, I get a
NullPointerException error on every dslr file and I cannot run the
application properly). At least the second project (editor) can be compiled.
What am I doing wrong? Or can I find somewhere the binaries compiled
correctly into OSGi bundle?
Thanks a lot!
Flavius
12 years, 11 months
Drools Expert 5 OSGi
by jflamy
I want to manage Drools Expert rules with Drools Guvnor. My understanding is
that requires the use of Drools Expert version 5.
I also need to use an OSGi-packaged version of Drools Expert.
I saw a forum posting in 2010 alluding to such a beast, but the springsource
forums only provide 4.0.7.
Is there a ready-made OSGi bundle for drools expert 5, or alternately
specific instructions for building one ?
Jean-François Lamy
--
View this message in context: http://n3.nabble.com/Drools-Expert-5-OSGi-tp681546p681546.html
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 11 months
MVEL expression
by Femke De Backere
Hi,
The following expression keeps returning the error [112,32]: [ERR 103]
Line 112:32 no viable alternative at input '+' in rule "RuleFlow-Split-
masterproef.ruleflows.shortsedation-18-22" in pattern Patient:
Patient(sedation.ultiva+0.02 > 0.1)
with sedation.ultiva returning a double
What am I doing wrong?
Thx,
Femke
12 years, 11 months
Re: [rules-users] Firing Mulitple packages
by Esteban Aliverti
Could you post the way you are using to add kassets to kbase?
El ago 13, 2010 12:20 p.m., "Vignesh" <viki.ccc(a)gmail.com> escribió:
Hi Esteban,
I have tried the same logic by adding all the packages in my application in
to the kbase and executed the same, but only the drl file got loaded in it,
other kassets like dsl, ruleflow present in it were not added to the same.
Do we need to add everything separetly?
Kindly let me know whether im missing something here.
Thanks,
Vignesh
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Firing-Mulitple-packa...
Sent from the Drools - User mailing list archive at Nabble.com.
____________________________________...
12 years, 12 months
Problem with DroolsFlow transaction
by HMandic
I have a problem with transaction manager in drools flow (at least I think
so).
I'm running an EJB3 application in Jboss AS 5.1.0GA with Postgres 8.4.4 as
database. I use one schema for my data and another for drools data. The
application itself is also split in two projects, one for my utility classes
that interact with drools and the other for my application that uses those
utility classes.
I'm using the same datasource and transaction type is JTA.
I have an object that holds a reference to processID from drools flow as one
of its fields. When I invoke my method to create that object (in a stateless
session bean), a transaction is opened and it lasts until the end of said
method. But somewhere inside that method I need to invoke
ksession.startProcess(processName, params) and then I get this:
java.lang.IllegalStateException: Wrong tx on thread: expected
TransactionImple < ac, BasicAction: -3f57ffd6:dfb:4c878d37:7e status:
ActionStatus.ABORTED >, actual null
at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:157)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
.
.
.
Does that mean that I need to run the drools part in a separate thread?
I'm clueless...
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-with-DroolsFl...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years
Connection with Active Directory multiple organizational units
by G3
I am able to authenticate with Active Directory but with only a single
organizational unit but not with users of multiple organizational units
This is my organizational structure
+cn=test,cn=con
--+ou=Sample1
-----uid:user1,uid:user2
--+ou=Sample2
-----uid:user3,uid:user4
--+roles
-----admin:uid:user1,user3
-----user:uid:user2,user4
I have set the admin rights accordingly in Guvnor.
I am using Jboss Guvnor standalone 4.2.3 and I am trying to connect
multiple organizational units using JAAS
my login-config.xml
---------------------
<application-policy name="adConnection">
<authentication>
<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule"
flag="required" >
<module-option
name="java.naming.provider.url">ldap://c.test.com:389/</module-option>
<module-option
name="java.naming.security.authentication">simple</module-option>
<module-option
name="bindDN">CN=Administrator,CN=Users,dc=test,dc=com</module-option>
<module-option name="bindCredential">password</module-option>
<module-option name="baseCtxDN">OU=Sample1,dc=test,dc=com</module-option>
<module-option name="baseFilter">(CN={0})</module-option>
<module-option name="rolesCtxDN">OU=roles,dc=test,dc=com</module-option>
<module-option name="uidAttributeID">member</module-option>
<module-option name="matchOnUserDN">true</module-option>
<module-option name="roleFilter">(member={1})</module-option>
<module-option name="roleAttributeID">CN</module-option>
<module-option name="roleRecursion">-1</module-option>
</login-module>
<login-module code="org.jboss.security.auth.spi.LdapExtLoginModule"
flag="required" >
<module-option
name="java.naming.provider.url">ldap://c.test.com:389/</module-option>
<module-option
name="java.naming.security.authentication">simple</module-option>
<module-option
name="bindDN">CN=Administrator,CN=Users,dc=test,dc=com</module-option>
<module-option name="bindCredential">password</module-option>
<module-option name="baseCtxDN">OU=Sample2,dc=test,dc=com</module-option>
<module-option name="baseFilter">(CN={0})</module-option>
<module-option name="rolesCtxDN">OU=roles,dc=test,dc=com</module-option>
<module-option name="uidAttributeID">member</module-option>
<module-option name="matchOnUserDN">true</module-option>
<module-option name="roleFilter">(member={1})</module-option>
<module-option name="roleAttributeID">CN</module-option>
<module-option name="roleRecursion">-1</module-option>
</login-module>
</authentication>
</application-policy>
and my component.xml
-------------------------
<security:identity authenticate-method="#{authenticator.authenticate}"
jaas-config-name="adConnection"/>
I donot get any errors in server console during deployment but when login
,I cannot login into Guvnor and I get password or user name incorrect.Can
some one help me out
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Connection-with-Activ...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 1 month
Drools 5 PseudoClock with StatelessKnowledgeSession
by Ben Scott
_______________________________________________________________________________________
Note: This e-mail is subject to the disclaimer contained at the bottom of this message.
_______________________________________________________________________________________
I'm wanting to use the date-effective and date-expiry rule metadata to add date specific rule variants within my app. To test these I was planning on using the pseudo clock and setting the expected date prior to executing the rules within a StatelessKnowledgeSession. I can set the clock easily enough, but can't understand why the getSessionClock() method is missing? It's on the StatefulKnowledgeSession, but not on the Stateless.
I'm initialising the session like this:
SessionConfiguration sessionConfiguration = new SessionConfiguration();
sessionConfiguration.setClockType( ClockType.PSEUDO_CLOCK );
StatelessKnowledgeSession session = _testKnowledgeBase.newStatelessKnowledgeSession(sessionConfiguration);
The only thing I could think of to set the pseudo clock was to write a command something like:
private static class SetPseudoClockCommand implements org.drools.process.command.Command<Boolean> {
public Boolean execute(ReteooWorkingMemory session) {
// Set the clock to the current date
pseudoSessionClock.advanceTime(new DateTime().getMillis(), TimeUnit.MILLISECONDS);
// Add a couple of days
pseudoSessionClock.advanceTime(2, TimeUnit.DAYS);
return true;
}
}
But this doesn't appear to take any effect whilst rules are running.
Is there another way to get programmatic access to the session clock, or some better way of changing the underlying date prior to rule execution?
Ben.
_______________________________________________________________________________________
The information transmitted in this message and its attachments (if any) is intended
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking of any action in reliance
upon this information, by persons or entities other than the intended recipient is
prohibited.
If you have received this in error, please contact the sender and delete this e-mail
and associated material from any computer.
The intended recipient of this e-mail may only use, reproduce, disclose or distribute
the information contained in this e-mail and any attached files, with the permission
of the sender.
This message has been scanned for viruses with Symantec Scan Engine and cleared by
MailMarshal.
_______________________________________________________________________________________
13 years, 1 month
Date validation in Guvnor
by mick00
Hi,
I want to validate the date format in my rule. I just want to check whether
my date is in the given format(yyyy-mm-dd) in my rule in Guvnor. Is it
possible to do such validation in Guvnor? I tried the same but got an
exception stating that the date is not in the given format(dd-MMM-yyyy). Can
someone suggest a solution as to how to validate the date in Guvnor?
Thanks,
mick
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Date-validation-in-Gu...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 1 month
Fusion and open-ended intervals?
by Barry Kaplan
A fusion design question:
I have events that represent intervals. Initially the intervals are
open-ended (kind a like the current state of an entity). Other events are
matched "during" the interval and correlated. At some point the interval
will be closed (eg, a specific downtime interval is closed because the
device is no online again).
All the events in this system are immutable -- so if some property of an
event changes, it is cloned and modified in working-memory. For the case of
the interval events, initially the interval is inserted open-ended, and at
some point later closed and then modified.
This does not work with fusion however, since an event's duration is
maintained by the fact-handle not the event itself. Hence a modify with a
now closed interval (ie, a finite @duration) has no effect. I'm guessing the
temporal values are maintained the handle to ensure stable values for the
behaviors that trigger based on temporal values, which is reasonable.
So I'm looking for alternative designs. Some are:
1) Modeled the intervals as begin/end events, but that gets messy real
fast (have to correlate
the begin/end events somehow, can't use evaluators like 'includes' or
'during', etc).
2) Retract the interval event when it is closed (this way closed intervals
no longer correlate
with other incoming events). But then we really have a manually
maintained state machine
using only facts, and there can be no reasoning over a series these
interval events.
(eg, 3 downtimes longer than 2 minutes in the last hour).
Opinions?
-barry
--
View this message in context: http://n3.nabble.com/Fusion-and-open-ended-intervals-tp719076p719076.html
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 2 months