LHS compare two lists
by lnguyen
Hi,
I'm trying to determine if a user has the required certifications for a
position. So I'm comparing the list of required certifications to the list
of User Certifications but I'm throwing a nullPointerException even though I
check to make sure the list are not null on their respective objects. How do
I iterate between both list?
rule "Determine if the user has the required certifications"
dialect 'mvel'
no-loop true
salience 80
when
$user : User()
$profile : UserProfile($userCertifications : userCertifications,
eval(userCertifications != null)) from $user.userProfile
$position : Position($certifications : requiredCertifications,
eval(requiredCertifications != null))
exists ($certification: Certification() from $certifications and
UserCertification(certification == $certification) from $userCertifications)
then
System.out.println("The user has the required certifications");
end
public UserProfile
{
List<UserCertification> userCertifications;
//more fields
}
public Position
{
List<Certification> requiredCertifications;
//more fields
}
public Certification
{
Long id;
String name;
//more fields
}
public UserCertification
{
Long id;
Date certificationDate;
Certification certification;
//more fields
}
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/LHS-compare-two-lists...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Drools flow and BPEL (Drools 5.1)
by tim
Hello,
I am studying how to integrate Drools 5.1 into our product. And we will need
a BPEL engine embedded in Drools. I read from the "Drools Flow User Guide"
that "the Drools Flow engine is based on a generic process engine that
allows the definition and execution of different types of process languages,
like for example our RuleFlow language, WS-BPEL ..." But I can't find any
documentation or examples available for using BPEL in Drools. If you have
done something similar, please let me know. Any suggestion will be helpful!
Thanks in advarce!
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-flow-and-BPEL-...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
drools syntax highlighting editor
by Matt Young
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
is there a drools syntax highlighting widget along the lines of
tinymce for regular html pages. I'm certain there is a seam or JSF
component but my application is a JSP based springmvc application and
I would like to not have to migrate to something else, just to
provided a good rules editor in my application.
- --
Cheers,
Matt Young
solid(a)youngdev.net
http://youngdev.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMlSqqAAoJEO5jycTTPEzcm4gQAJzG22gY+KRj+D6EdJzH4PfH
/WARpfHy+wtyy2N6WGmvpOnmUXsa4f4OTyIdU/DPf+4Sg+qSrDzZ3FzcTB3clQwD
vRVxfcF3ggGzEgZxUYVsaJdAtuhOn/rTwlybZZJYhHVnSorglMWn/eGbzrTtFpMs
CWTl4oewkamKHfGcBOymhEs5CwCuCG18HEwggYAirnO278T3zm4N1b+eTyp2vpyQ
EP+KwIUbjCHyve3u2J2qOLw5ajlUe8rM2z8bRSXgRZUUwtcWl9I66l08oS21/4ZF
Yfnqz1SoEgcKW2Cd8KjQ7ELihP9PGFfwCAvLZv+A1fIGIgqNRY/bKVIo+cB0s8Pb
OWKgYIbGTKD34xon858J/yxkeh4NQS24RJXj/1WoKsqvbmB3OmBDdK4MkAaF1rtg
iTGGp56AaXSI+FMRUF6tTESQCai+g6noKQqyjooWcmO8fETFBsKs/k2voATziJ9z
OgVjwfQ3akO0SpFNggnG3YEFqWqaHlkeBw8cFt7LtVQf+S2YBEvkAqA7digb+czK
d/MdnhmGvshBXquJDUwwPcS6/+Q3c5PbBIoKxUTPmcKOL5JS29NfQOjsuJtMX1uS
xZ4HPlCkIncJLyYNuuwSja5qMgtxX0FYRCk7VZERevr0gUETtUWmigENJEAVHL1a
CbVl9QDLfAChJ5crxwDd
=VjEx
-----END PGP SIGNATURE-----
13 years, 9 months
Re: [rules-users] Welcome to the "rules-users" mailing list
by Aman
Hello,
I can see Drools 5.1 is going to add support for Spring integration.
How about Seams, I think it is already integrated, because in all
presentations, I haven't seen anyone referring to Seam.
Thanks
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of
rules-users-request(a)lists.jboss.org
Sent: Saturday, September 18, 2010 2:25 PM
To: boy18nj(a)gmail.com
Subject: Welcome to the "rules-users" mailing list
Welcome to the rules-users(a)lists.jboss.org mailing list!
To post to this list, send your email to:
rules-users(a)lists.jboss.org
General information about the mailing list is at:
https://lists.jboss.org/mailman/listinfo/rules-users
If you ever want to unsubscribe or change your options (eg, switch to
or from digest mode, change your password, etc.), visit your
subscription page at:
https://lists.jboss.org/mailman/options/rules-users/boy18nj%40gmail.com
You can also make such adjustments via email by sending a message to:
rules-users-request(a)lists.jboss.org
with the word `help' in the subject or body (don't include the
quotes), and you will get back a message with instructions.
You must know your password to change your options (including changing
the password, itself) or to unsubscribe. It is:
newpassword1
Normally, Mailman will remind you of your lists.jboss.org mailing list
passwords once every month, although you can disable this if you
prefer. This reminder will also include instructions on how to
unsubscribe or change your account options. There is also a button on
your options page that will email your current password to you.
13 years, 9 months
Re: [rules-users] Perfromance issues and memory leaks in Drools (Edson Tirelli)
by Nikhil S. Kulkarni
Hi Edson,
Thanks for the information.
But now I want to ask you one thing. I have seen your post. The problem in application is mainly usage of memory
You posted that Match 30,2010. I downloaded Drools 5.0 on August 2009 and I am using that.
SO this "True modify" algorithm is implemented in Drools 5.1 only or it is even available in latest Drools 5.0
If I use Drools 5.1 then Whether I will get any advantage.
In application we are using Rules Template ,Rule Flows and drls. When I am calling Rules from Java then it is taking more time compared to calling Java method from rules.
In addition to this can u suggest me how to write better rules Query.
I am using very simple way of writing Rules Query like :-
When
Abc : ABC(condition==A)
Then
Call method
End;
Thanks & Regards,
Nikhil S. Kulkarni
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Friday, September 17, 2010 9:30 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 46, Issue 58
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Perfromance issues and memory leaks in Drools (Edson Tirelli)
----------------------------------------------------------------------
Message: 1
Date: Fri, 17 Sep 2010 11:04:55 -0400
From: Edson Tirelli <tirelli(a)post.com>
Subject: Re: [rules-users] Perfromance issues and memory leaks in
Drools
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTinr2-+twT_myOijf1rc_wAw7E6CVtwjPNGKBOb_(a)mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"
Nikhil,
Maybe you are using the term "memory leak" loosely here, but otherwise,
Drools 4.0.7 and Drools 5.0.1 were both tested to exhaustion for memory
leaks and I can tell you that no memory leak was found, and I personally
doubt there is one there on regular use. Also, FYI, Drools 5.x eliminates
the need for shadow facts, what is a considerable memory save over 4.x, but
adds some other overheads for performance improvement that kind of offset
those gains. On the other hand, Drools 5.1.1 takes the algorithm to a new
level, saving a lot of memory on systems that use modify actions on their
rules.
http://blog.athico.com/2010/03/drools-halves-memory-use-with-new-true.html
Regarding your performance, all I can tell you is that a rules engine is
a relational engine that works pretty much like a database, and rules as
databases queries. The same way you can write SQL queries that run fast or
slow on a database, you can write rules that run fast or slow on a rules
engine. It all depends on how the rules/queries are written, how your data
model/domain model looks like, etc.
So, regarding your question, we can't tell you how to improve those
metrics without knowing your domain model, rules and etc.
[]s
Edson
2010/9/17 Nikhil S. Kulkarni <Nikhil.Kulkarni(a)mastek.com>
> Hi,
>
>
>
> I have written 2 different Drools programs. One is with
> Using rule Base of Drools 4.0 and other is using Knowledge Base of Drools
> 5.0.
>
> I was trying to check that is there any improvement in Drools 5.0. But I
> haven?t got any performance improvement in Drools 5.0 code compared to
> Drools 4.0.
>
>
>
> One more important thing is I am calling this drools code
> from My application which itself is heavy application, when I am doing
> Performance tuning
>
> I got one point i.e. session.execute() method is taking around 6-7 seconds
> to initialize rules and even the memory utilized by Rules is huge.
>
>
>
> So is there any way that we can reduce the Memory leakage and improve
> performance.
>
>
>
> Waiting for Reply.
>
>
>
> Thanks & Regards,
>
> Nikhil S. Kulkarni
>
> Emp No: - 9254
>
>
>
>
>
> MASTEK LTD.
> In the US, we're called MAJESCOMASTEK
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, 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. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100917/2573a18...
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 46, Issue 58
*******************************************
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, 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. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 years, 9 months
Fwd: Early bird registration ENDS TODAY: Rules Fest 2010
by Edson Tirelli
Hey people,
I am glad to see that people are registering for the bootcamp (and the
conference)! Hope to meet you all there! If you've never been to Rules Fest
before (this is the 3rd year it is happening), it is the only technical,
no-fluff, conference in Rules Engines and related technologies that I know
of. I had a great time last 2 years and I know it will not be different
this year.
And for those that did not registered yet, just a reminder, the early
bird discount ends today as per the e-mail bellow.
Edson
---------- Forwarded message ----------
From: Rules Fest Association <Rules_Fest_Association(a)mail.vresp.com>
Date: 2010/9/17
Subject: Early bird registration ENDS TODAY: Rules Fest 2010
To: tirelli(a)post.com
International Rules Fest 2010 Conference
[image: Header.jpg]
*Studied, Defined, Explained, Illustrated*:
Rules & Decisioning Technologies Made Easy
[image: Register Now Before September 17
deadline!]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/934511...>
*Conference fee*:
*$399*
*Early Bird Registration*
*$349*
*Register today and save $50!*
*Conference package deal*:
- 4 nights and 3 days at the historic Dolce Hayes Mansion
Resort<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/01a454...>
- A boot camp of choice
- Continental breakfast and lunch each day
- Discount off from the Rules Fest 2011 conference
- *$999 ($225 savings)*
*Bootcamps*
Rules Fest 2010 offers a number of hands-on tutorial and coding sessions
known as "bootcamps." These events give all developers — from novice to
advanced — a chance to learn new technologies and/or techniques while being
coached by those who know them well. All bootcamps are a full day, and they
run concurrently on Thursday, October 14th, the day after the main
conference ends.
More info on Bootcamps...<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/ba8eec...>
Hi ,
Dozens of the world’s top thinkers, developers , architects, engineers and
programmers from industry and academia will come together on October 11-14
to present a single-track of 17 hot topics reasoning, inferencing,
artificial intelligence and pattern matching … at the heart of many
solutions to modern, complex computing problems.
The world's only technical conference devoted to the practical application
of all rule-based and knowledge-based reasoning, inferencing, and
decisioning technologies will feature 3 days of presentations.
*Conference Agenda<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/6091ae...>
*
Topic categories include:
- Reasoning *in Action*
- Reasoning Methodologis & Best Practices
- Reasoning and Management
- Reasoning Trends
Factoid: RulesFest 2010 speakers comprise
7 CEOs
6 Ph.D.s
4 CTOs
8 Senior Developers
1 Vice President
View abstracts<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/23762b...>
*Click to register and save $50
<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/8f9172...>
*
For info: www.rulesfest.org<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/4ccfdf...>
;
Email: info(a)rulesfest.org
*Join the Dialog on
Rules Fest 2010!*
[image: Rules Fest 2010 on
Twitter]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/7db47d...>
[image: "Like us" on
Facebook]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/be1ef2...>
[image: Join our LinkedIn
Group]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/f0ea72...>
A message from Rules Fest 2010 Vice Chairman, Charles Young of Solidsoft:
[image: Message from Rules Fest Vice Chairman Charles Young,
SolidSoft]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/80c81e...>
*RulesFest 2010*
*International Conference on Reasoning Technologies *
[image: Rules Fest 2010: International Conference on Reasoning
Technologies]<http://cts.vresp.com/c/?VisionArtsCommunicat/b85f095f0f/4dadcb8b59/9d220c...>
serving Software
Engineers
Developers
Architects
and
Programmers
Contact Information: Rules Fest Association, Inc.
6655 W. Sahara Avenue Suite E-102
Las Vegas, Nevada 89146
------------------------------
Click to view this email in a
browser<http://hosted.verticalresponse.com/756695/b85f095f0f/1343038631/4dadcb8b59/>
If you no longer wish to receive these emails, please reply to this message
with "Unsubscribe" in the subject line or simply click on the following
link: Unsubscribe <http://cts.vresp.com/u?b85f095f0f/4dadcb8b59/mlpftw>
------------------------------
Rules Fest Association, Inc.
6655 W. Sahara Avenue Suite E-102
Las Vegas, NV 89146
Read <http://www.verticalresponse.com/content/pm_policy.html> the
VerticalResponse marketing policy.
[image: Try Email Marketing with VerticalResponse!]
<http://www.verticalresponse.com/landing/ef/?mm//b85f095f0f>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
13 years, 9 months
Perfromance issues and memory leaks in Drools
by Nikhil S. Kulkarni
Hi,
I have written 2 different Drools programs. One is with Using rule Base of Drools 4.0 and other is using Knowledge Base of Drools 5.0.
I was trying to check that is there any improvement in Drools 5.0. But I haven't got any performance improvement in Drools 5.0 code compared to Drools 4.0.
One more important thing is I am calling this drools code from My application which itself is heavy application, when I am doing Performance tuning
I got one point i.e. session.execute() method is taking around 6-7 seconds to initialize rules and even the memory utilized by Rules is huge.
So is there any way that we can reduce the Memory leakage and improve performance.
Waiting for Reply.
Thanks & Regards,
Nikhil S. Kulkarni
Emp No: - 9254
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, 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. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 years, 9 months
How to activate/deactivate a rule.
by Ritesh
Hi,
I have 3 rules in my drl file and want the last one should get fired only
after all the facts in rule1 and rule2 gets inserted in working memory.
Please see below code for more understanding. Please suggest.
Thanks
declare DistinctAT
d_auditT : String
end
declare ActualSum
auditT : String
sumOfThree : BigDecimal
end
rule "insert combined sum"
dialect 'java'
when
ABC( $a:A, $b:B, $c:C )
then
BigDecimal actSum = $c.multiply(0.13);
ActualSum $as = new ActualSum();
$as.setAuditT($a);
$as.setSumOfThree(actSum);
insert($as);
System.out.println("AT :" + $movAuditT);
end
rule "insert distinct AT"
dialect 'java'
when
$a : ActualSum( $AT : auditT )
not DistinctAT( d_auditT == $AT )
then
DistinctAT $disAT = new DistinctAT();
$disAT.setD_auditT($AT);
insert($disAT);
System.out.println("Done!");
end
rule "Get Sum Group by AT"
dialect 'java'
when
DistinctAT( $dAT: d_auditT )
$total : Double()
from accumulate( ActualSum( auditT == $dAT, $actSum_Main : sumOfThree ),
sum( $actSum_Main ) )
eval(
chkRuleExpre( $total,$lfna_SEI,$r_SEI )
)
then
System.out.println("Done Main Rule, total :" + $total);
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-activate-deact...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months