Connectivity with Database
by kedar vyawahare
Hi all,
I want to make Connectivity to a external Database through my Drool Guvnor
so that I can directly create rules on attributes of that tables of
Database.
Please suggest me some way to solve this problem.
Thanks in Advance.
Kedar.
15 years
How to trigger a certain task within an ad-hoc subprocess
by Wen Yao
Hi,
I am implementing an ad-hoc subprocess similar to the one described in the
Drools&jBPM blog:
http://planet.jboss.org/view/post.seam;jsessionid=24F0449616816E6271113E1...
I am using BPMN 2.0 and drools 5.1
After I created a embedded subprocess, I changed the xml element to
adHocSubProcess and added a rulegroup associated with this subprocess.
My question is, how can I trigger one of the tasks (or process fragments) in
the ad-hoc subprocess? The following function can only be used to trigger a
reusable subprocess:
drools.getWorkingMemory().startProcess("org.drools.examples.cdss.ClinicalPathwayX"),
instead of isolated tasks/fragments in the adhoc subprocess.
Further, can this be done in the java class using API, instead of using
rules?
Any help will be appreciated, better with examples. Thanks a lot!
Best regards,
----
Wen
15 years
Guided Rule Editor inconsistency for DSL's
by drdaveg
I've noticed that the LHS of the Eclipse Guided Rule Editor can employ DSL
sentences or an object model, but there doesn't seem to be a manner to
incorporate the DSL on the RHS of rules (other in "free form" code)
Is that by design? Or is there some property that can enable the dialog
box/drop-down list editing of rules in the DSL on the RHS?
It seems odd that the capability works out-of-box for the left hand side,
but not the RHS. Thanks!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Guided-Rule-Editor-in...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
by Greg Barton
Yes, but I just fired up a small project using it and it used 100% of CPU. If you build the attached project you'll see the tests run just fine. (They use fireAllRules.) If you launch from the commandline, ("java -jar target/DroolsBoxes-1.0.jar") which uses fireUntilHalt, the rules fire (and complete) just fine, but it continues to use 100% of a cpu core indefinitely. This is with 5.1.1. If I change the drools version to 5.2.0-SNAPSHOT it compiles but the tests won't run. They all fail with the following exception:
java.lang.NoSuchMethodError: org.drools.spi.DeclarationScopeResolver.<init>([Ljava/util/Map;Ljava/util/Stack;)V at org.drools.rule.builder.RuleBuildContext.<init>(RuleBuildContext.java:72) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1198) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:629) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28) at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:75) at com.sample.DroolsTest.go(DroolsTest.java:31) at com.sample.BoxTest.test0(BoxTest.java:21)
--- On Thu, 3/17/11, Edson Tirelli <ed.tirelli(a)gmail.com> wrote:
From: Edson Tirelli <ed.tirelli(a)gmail.com>
Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
To: "Rules Users List" <rules-users(a)lists.jboss.org>
Date: Thursday, March 17, 2011, 10:47 AM
To be honest, I believe so, but didn't profiled it extensively. I used fireUntilHalt() in my Webinar yesterday on a live demo and it worked nicely.
Edson
2011/3/17 Greg Barton <greg_barton(a)yahoo.com>
Has the performance problem with fireUntilHalt been fixed in 5.2?
--- On Thu, 3/17/11, Makewise - Vitor Rui Mendonça <Vitor.Mendonca(a)brisa.pt> wrote:
From: Makewise - Vitor Rui Mendonça <Vitor.Mendonca(a)brisa.pt>
Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
To: "'Rules Users List'" <rules-users(a)lists.jboss.org>
Date: Thursday, March 17, 2011, 7:01 AM
Hi Thomas, thanks for the info!
I googled it quite a bit and I think it’s a path to be explored, albeit I’ve saw several messages on the mailing list regarding performance issues
when using fireUntilHalt.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
-----Inline Attachment Follows-----
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years
Basic doubt regarding Drools Fusion - @expires
by Makewise - Vitor Rui Mendonça
Hi all!
I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here…
Imagine that I have an event:
declare A
@role( event )
@expires( 1h )
end
On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory.
My doubt: When does event A expires?
a) One hour after it was inserted (time-based and without the “fireAllRules()” method call) or
b) by calling “fireAllRules()” method (event-based)
T.I.A.
Vítor Mendonça Moreira
Analista / Programador
Direcção de Investigação e Desenvolvimento
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.
2500 - 206 - Caldas da Rainha
Tel: (+351) 262 832 196
Fax: (+351) 262 186 455
Web: www.makewise.pt<http://www.makewise.pt>
Uma empresa: Grupo Sousa Pedro<http://www.sousapedro.com>
[cid:image002.jpg@01CBE3EF.C9596900]
________________________________
Declaração:
A informação contida nesta mensagem, e os ficheiros anexos, é privilegiada e confidencial, destinando-se exclusivamente ao(s) destinatário(s).Se não é o destinatário (ou o responsável pela sua entrega ao destinatário) e recebeu a mesma por engano, fica notificado que é estritamente proibido reproduzir, guardar ou distribuir toda ou qualquer parte desta mensagem e ficheiros anexos.Por favor reencaminhe a mensagem para o responsável pelo seu envio ou contacte-nos por telefone e elimine a mensagem e ficheiros anexos do seu computador,sem os reproduzir.
Disclaimer:
The information contained in this message, and any files attached, is privileged and confidential, and intended exclusively for the included addresses.If you are not the intended recipient (or the person responsible for delivering to the intended recipient) and received this message by mistake, be aware that copy, storage, distribution or any other use of all or part of this message and the files attached is strictly prohibited. Please notify the sender by reply e-mail or contact us by telephone and delete this message and the files attached, without retaining a copy.
________________________________
15 years
Re: [rules-users] drools design question
by Esteban Aliverti
You could also use drools (maybe a decision table) to select the different
drl files.
Best regards,
El mar 16, 2011 8:24 p.m., "marunam" <sutavis(a)gmail.com> escribió:
Hi,
We are developing an insurance application and we have decided to use drool
rules for our business rules
Now, we could have global business rules(applies to all states), specific to
state, specific to factor X, specific to factor Y etc. This way we are
expecting many drl files.
Now, when the application runs, we would know the values for state, factor
X, factor Y etc. and using these values we would determine(using database)
which drl files to load dynamically and just run the rules in those drls.
Is this approach recommended? Do you have any suggestions?
Thanks
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/drools-design-questio...
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
15 years
Custom dates with @date-effective and @date-expires
by Faisal Shafique
Hi,
Can I use any arbitrary date for the drools execution so that correct rules are fired based on not current date but any arbitrary date? This is in the context of @date-effective and @date-expires metadata that can be specified as part of a rule. Drools expert documentation seems to imply that this metadata uses "current date" though I am not clear what current date (system date?) means.
Thanks
Faisal Shafique
15 years
Problem with Drools debuggin in Eclipse Reg:
by Murali Venugopal
Hi,
I'm encountering a strange problem with debugging an Drools application
in Eclipse Platform. I couldn't find any help in the internet. Also, i
can't find any previous post in this mailing list. Please try to help me.
My Platform details are below:
OS: Fedora 13
Eclipse: Galileo
Java: JDK 1.6 Update 21
Drools version: 5.1.1
Snapshot of the Error message:
*Console Output:*
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports
initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
*Event Details:*
**
*Message:*
An internal error occurred during: "Launching DroolsTest (4)".
*Exception Stack Trace:*
java.lang.IncompatibleClassChangeError: Expected static method
org.drools.eclipse.launching.DroolsVMDebugger.renderCommandLine([Ljava/lang/String;)Ljava/lang/String;
at
org.drools.eclipse.launching.DroolsVMDebugger.run(DroolsVMDebugger.java:182)
at
org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:101)
at
org.drools.eclipse.launching.DroolsLaunchConfigurationDelegate.launch(DroolsLaunchConfigurationDelegate.java:30)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Thanks in advance.
Regards,
_ _ _ _ |.
| | ||_|| (_||| \/
Get your world in your inbox!
Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id!
Log on to http://www.sify.com
********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a person responsible for delivering the
information to the named recipient, you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin(a)sifycorp.com
15 years
Open file leak in Drools Compiler
by Chris Selwyn
I am running Drools (actually JBoss Rules 5.1.0 ) in Glassfish.
My deployable is an EJB that uses a StatelessKnowledgeSession to run
some rules that I get from a KnowledgeAgent that has a Changeset with a
.drl in it.
Therefore, I have placed the drools compiler into the deployable and it
all appears to work.
Glassfish has a clever little mechanism that, when you unload a
deployable that had some open streams, it tells you all about it (and
kindly closes them).
Glassfish is reporting that InputStreams are being left open that were
opened in the isPackage() method of
org.drools.commons.jci.compilers.EclipseJavaCompiler.
That method has the following code in it:-
final InputStream is =
pClassLoader.getResourceAsStream(ClassUtils.convertClassToResourcePath(pClazzName));
if (is != null) {
return false;
}
So, when "is" is not null (i.e. open), it is forgotten about and not closed.
Isn't this a potential file handle leak?
Chris Selwyn
15 years
Drools server link to Guvnor repository
by Sébastien Raickman
Hi all,
I would like to connect to drools-server with HTTPClient with the following
config:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:drools="http://drools.org/schema/drools-spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://drools.org/schema/drools-spring
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-containe..."><drools:execution-node
id="node1" /> <drools:kbase id="kbase1"
node="node1"/>
<drools:kagent id="kagent1"
kbase="kbase1">
<drools:resources>
<drools:resource type="CHANGE_SET" source="classpath:changeset.xml"
/>
</drools:resources>
</drools:kagent>
<drools:ksession id="ksession1"
type="stateless" kbase="kbase1" node="node1"/>
</beans>
where my changeset.xml is adding a snapshot deployed with Guvnor.
But I am not able to trig the rule with the following client:
BatchExecutionCommandImpl command = new BatchExecutionCommandImpl();
command.setLookup("ksession1");
InsertObjectCommand insertObjectCommand = new InsertObjectCommand("TEST");
FireAllRulesCommand fireAllRulesCommand = new FireAllRulesCommand();
command.getCommands().add(insertObjectCommand);
command.getCommands().add(fireAllRulesCommand);
String xml = BatchExecutionHelper.newXStreamMarshaller().toXML(command);
HttpClient httpClient = new HttpClient();
httpClient.getHostConfiguration().setHost("host", 8080);
PostMethod postMethod = new
PostMethod("/drools-5.1.1-server/kservice/rest/execute");
postMethod.setRequestEntity(new StringRequestEntity(xml, null, null));
try {
httpClient.executeMethod(postMethod);
int code = postMethod.getStatusCode();
System.out.println(code);
String rep = postMethod.getResponseBodyAsString();
System.out.println(rep);
} catch(Exception e) {...}
Do someone have any idea how to achieve this?
Thanks
Sebastien
15 years