How to call a another drl file from one drl file
by Amila Silva
hi,
I have requirement to execute a chain of rules. One rule after another
and they are reusable.I need to know how to call another drl file from a drl
file. or in a then part of the
a rule.
thanks
Amila Silva
15 years, 5 months
Persistence and mina human task handling
by Balázs Molnár
Hello,
I tried to setup a sample standalone "hello" application that attempts to
run a process involving human tasks.
Main components were:
- mina task server (as documentation hinted, based on a sample),
- standalone "hello sort of" application running a ruleflow with some
workitems including a human task too,
- eclipse human task view.
I setup the persistence - following the documentation, asked for a jta
datasource and used bitronix transaction manager.
The application:
- begins a new user transaction
- creates a new process instance in a stateful session
- calls fireallrules
- waits on the console with System.in.read() (this was already a workaround
to avoid completing the user transaction before the human task is handled in
the HT view, this otherwise caused a nullpointer assigment at line 83 in
JPAWorkItemManager which tried to refer to variable "em" which when set
returned null for the following assignment if usertransaction were
committed:
EntityManager em = (EntityManager) this.workingMemory.getEnvironment().get(
EnvironmentName.ENTITY_MANAGER );)
... following the above the message reaches the human task server, and then
the task appears in the human task view - so far so good.
Then when the task is started and completed in the view, the
"GetCompletedTaskResponseHandler.execute()" begins handling the completed
message. Unfortunately this call fails with :
" no transaction started on this thread"
I have then checked the threads in the debug view and looked like the
message response is actually running in the "NioProcessor" thread. At this
point I got stuck. If there is some guideance on how to correctly setup
transaction management and Mina task client/human task work item handler it
would be very much appreciated.
thank you.
15 years, 5 months
Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:
by Pardeep.Ruhil@lntinfotech.com
Hi,
I am newbie to drools. I am facing the below exception when I m trying to
run my code through
Command Prompt.
I have set the all the jars in the xbootclasspath of my application , but
still I am getting the same exception.
I am able to run my application in eclipse , but the same when i run from
Command Prompt give me this exception.
Please help to get through the situation.
My exception is :
org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java
:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:274)
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:259)
at
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:176)
at
org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:153)
at
org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:242)
.
.
.
Caused by: java.lang.NullPointerException
at
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:92)
at
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:55)
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:270)
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.
______________________________________________________________________
15 years, 5 months
not able to debug drools flow
by Vishal Anand
Hi,
I am using Drools 5.0 and have create a simple application using drools flow, it runs perfectly but when trying to debug it as n drools application I get the following error:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
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]
While stack trace shows the following:
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(Unknown Source)
at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:101)
at org.drools.eclipse.launching.DroolsLaunchConfigurationDelegate.launch(Unknown Source)
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)
I am using eclipse 3.4
What could be the issue ?
Thanks
Vishal
15 years, 5 months
Checking variable values in rule conditions
by skasab2s
Hi guys,
as far as I understood, in the rule conditions I can check what objects are
in the working memory and so on..
But can I check for example a global variable value which I have declared in
the same .DRL-File?
for example:
global Boolean testWeanable
....
when
testWeanable==true
then
do this and that
end
or should I insert the variable testWeanable into the Working Memory to do
this?
Thanks a lot and many greets!
--
View this message in context: http://www.nabble.com/Checking-variable-values-in-rule-conditions-tp24388...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 5 months
Problem calling a function returning String
by rainbowflower
Hi all,
I am rather new to Drools and I have a problem using functions.
I have a rule like:
rule "rule 1"
when
eval(getEVAVersionsNr() == "1234")
then
System.out.println("rule fired");
end
The getEVAVersionsNr() method is present in a Java class
"ValidationUtilities.java", which I'm importing in my drl file and it looks
like this:
public class ValidationUtilities {
public static String evaVersionsNr;
public static String getZEVAVersionsNummer() {
return evaVersionsNr;
}
}
This static attribute "evaVersionsNr" is set to "1234" from another Java
class before I fire my rules. So, I assume that the eval construct should
return true. But, it does not return true and the consequence is not
exected.
Further info:
When I modify my rule like:
rule "rule 1"
when
eval(true)
then
System.out.println(getEVAVersionsNr());
end
the consequence part is getting executed and 1234 is getting printed.
I am really lost and I could not find out what goes wrong. If someone could
find out what I am missing, I shall be thankful.
Thanks in advance.
--
View this message in context: http://www.nabble.com/Problem-calling-a-function-returning-String-tp24375...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 5 months