Possible to use functions in DRL when dialect is mvel?
by Stephen Masters
Hi folks,
Is it possible to refer to DRL functions from a DRL when the dialect is mvel?
I have been working on unit tests for a rule that were consistently failing due to not being able to find the function that should be imported. Having tried various formats (the documentation is rather unhelpful here) for the import, I thought I'd see what happened if I just switched to the Java dialect. Suddenly it worked without even needing an import statement.
Unfortunately, this forces me to switch from the neat ...
newFact.Property = otherFact.Property
... to the rather ugly Java-style
newFact.setProperty(otherFact.getProperty())
So I would quite like to know if there is an undocumented (or well-hidden-documented) mechanism for using functions when in mvel dialect. Or am I stuck with switching to Java?
Thanks in advance for any pointers anybody can provide,
Steve
12 years, 5 months
Guvnor execution server getting 401 when using AD-configured Guvnor as endpoint
by ndipiazza
We are using:
• Drools Execution Server that came with Drools 5.1
• Drools Guvnor 5.2 configured with active directory
The execution server and guvnor run on the same Tomcat and use the same
port.
With the execution server you can have a listener for each package within
the configuration file. I have two such files, from-file-system.properties
that points to a local directory where a drools binary package is manually
deployed. This works fine.
But I try to use with-guvnor.properties which points to a package binary on
5.3 Guvnor. Here is the file:
I get the following error:
Some sort of authorization error very likely related to the active directory
configuration within Guvnor 5.2.
This used to work for us just fine with an earlier version of Guvnor.
This used to work for us just fine with an earlier version of Guvnor.
How can I fix this issue?
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-execution-server-getting-401-whe...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months
drools-planner-distribution5.4 final unzipping error....
by domingo
Hi,
I am try to unzip the drools-planner-distribution-5.4.0.final.zip, while
unzipping I got the following warnig messages...
DeciderScoreComparatorfact...is password protested.Please enter the
passwordin the box..
File 'initializer' is password protected.Please enter the passwordin the
box..
File 'Factory' is password protected.Please enter the passwordin the box..
File 'MachineReassignmentSolution' is password protected.Please enter the
passwordin the box..
File 'MrOriginalMacineSolutionIn..' is password protected.Please enter the
passwordin the box..
File 'EmployeeConsecutiveAssignment' is password protected.Please enter the
passwordin the box..
...........
..............etc
I suspect some of the files are password protected...how to get rid of this?
thanks
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/drools-planner-distribution5-4-final-un...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months
drools planner
by domingo
Hi,
In the cloudbalance example...I noticed two comparator classes...
CloudProcessDifficultyComparator (this is for planning entity class
comparator) and CloudComputerStrengthComparator (this is for planning
variable comparator class),
please help me to understand more about these planning entity difficulty and
planning variable strength comparator classes.
why do we need this and why not use one class level comparator?
thanks,
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/drools-planner-tp4018035.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months
How to write a Heuristic Knowledge in Drools Expert?
by Daniel Souza
Today I was reading the book Expert System Principle and Programming and I
noticed a view point about *Knowledge Domain*:
/"A pratical limitation of many expert systems today is lack of *casual
knowledge*. That is, the expert systems do not have an understanding of the
underlying causes and effects in a system. It's much easier to program
expert systems with *shallow knowledge* based on empirical and heuristic
knowledge than with *deep knowledge* based on the basic structures,
functions, and behaviors of objects. For example, it's much easier to
program an expert system to prescribe an aspirin for a person's headache
than to program all the underlying biochemical, physiological, anatomical,
and neurological knowledge about human body..."/ In my case bioinformatics.
/"One type of shallow knowledge is *heuristic knowledge*."/
Should I use drools planning instead just drools expert? I know that drools
planning use heuristic to score the planning problem.
Daniel Souza
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-write-a-Heuristic-Knowledge-in-D...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months
Retriving an Object Array in the when clause of a rule.
by Amal Gupta
Hi All,
Is there a way to retrieve an object array from a Class getter in the when clause of a rule in a drl file ? I have tried a lot of things but they did not work out. The Problem is detailed below :-
The following class has a private parameter Column1 which is an Object type array.
public class EightColumnGenericClass {
private Object[] Column1;
/** Getters and Setters */
public Object[] getColumn1() {
return Column1;
}
public void setColumn1(Object[] column1) {
Column1 = column1;
}
}
Following is the method where I am creating the knowledgebase and utilizing it. I am reading a file record and splitting the columns. The columns[] array gets saved into the attribute of the class defined above.
public static void fnReadFromFile(String FilePath, String FileName){
/* Declarations and other code */
while ((str = brReadFromFile.readLine())!=null){
Columns = str.split(",");
ecgcPLC = new EightColumnGenericClass();
ecgcPLC.setColumn1(Columns);
ksession.insert(ecgcPLC);
}
ksession.fireAllRules();
}
I have to try and retrieve each cell of the Columns[] array in the entire collection and apply rules on individual cell. My drl file is given below.
rule "SourceSystemId = value"
when
c: EightColumnGenericClass()
Object[] columns: c.getColumn1();
for (Object o : columns)
{
System.out.println(o.toString());
# The condition I want here is - if (o.toString()=="1794")
}
then
#RHS Code
end
Is there a way to achieve this? Or is there something missing with my DRL file? Please assist.
Thanks in Advance,
Amal
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
12 years, 5 months
Drools & jBPM Workshops(Next Week) : June : WDC NYC
by Mark Proctor
http://blog.athico.com/2012/06/drools-jbpm-workshops-june-wdc-nyc.html
----pasted from url---
JBoss BRMS (Drools and jBPM) Workshops
Drools 5, the upstream for JBoss BRMS, is a Business Logic integration
Platform, and provides a unified and integrated platform for Rules,
Workflow and Event Processing. It's been designed from the ground up so
that each aspect is a first class citizen, with no compromises. Drools
may be easily used with jBPM, a flexible business process management suite.
Want to learn more?
Join us for one of two complimentary full day, hands-on workshop on
Drools and jBPM, where we will cover:
* The ecosystem that encompasses the Drools open source project and
the JBoss BRMS
* Benefits of rules systems, business workflows, and specific challenges
* The history of rules systems, where they are going, and the current
state of the art
* Various features of the BRMS via a hands on demo
* BPMN 2.0 and the future of Business Process Management
Be prepared to work hands-on with the tools, meet the team behind the
engine, and have your questions answered. This event will give you
unparalleled access to industry-recognized leaders in the rules community.
There are two dates to choose from:
* Tuesday, June 19 2012 in New York City
<http://app.engage.redhat.com/e/er?s=1795&lid=1384&elq=d3d6d783acbc4c7382b...>
* Thursday, June 21, 2012 (Government focus) in Washington DC
<http://app.engage.redhat.com/e/er?s=1795&lid=5482&elq=d3d6d783acbc4c7382b...>
Speakers:
Jim Tyrrell
<http://app.engage.redhat.com/e/er?s=1795&lid=5483&elq=d3d6d783acbc4c7382b...>,
Principle JBoss Solution Architect, Red Hat
Mark Proctor
<http://app.engage.redhat.com/e/er?s=1795&lid=5483&elq=d3d6d783acbc4c7382b...>,
Drools Project Lead and Founder, Red Hat
Edson Tirelli
<http://app.engage.redhat.com/e/er?s=1795&lid=5483&elq=d3d6d783acbc4c7382b...>,
Senior Software Engineer, Red Hat
Kris Verlaenen
<http://app.engage.redhat.com/e/er?s=1795&lid=5483&elq=d3d6d783acbc4c7382b...>,
jBPM Lead Engineer, Red Hat
Prakash Aradhya
<http://app.engage.redhat.com/e/er?s=1795&lid=5483&elq=d3d6d783acbc4c7382b...>,
Senior Product Manager, Red Hat
/*Attendees are responsible for bringing their own laptop to this event.
Please make sure your laptop has the ability to copy files from a USB,
which will provide the software for the hands-on sessions, and have JDK
1.6 already installed./
Register now as space is limited. We look forward to seeing you there!
12 years, 5 months
guvnor-distribution-5.4.0.Final problem
by domingo
Hi,
I have a question to the drools guvnor team....
In the guvnor-distribution binary folder contains three war files,
guvnor-5.4.0.Final-jboss-as-7.0, guvnor-5.4.0.Final-jboss-as-5.1 and
guvnor-5.4.0.Final-tomcat-6.0 respectively.
My question is
why these three specific war files?
Will it be work with other version of these app. servers?
Drools and Jboss are redhat products, than why guvnor is not supported by
all versions of jboss Apps server?
this raise lots of reliability related questions in the industry...I really
appreciate some one from the core team can answer these questions.
thanks,
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/guvnor-distribution-5-4-0-Final-problem...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months