Is drools the solution for my requirement.
by nitind
Hi,
We have 200 odd rules to be configured and wanted to know if drools can
be the optimum solutions. The rules are broadly classified into 2 categories
example 1 : We need to compare invoice no value in 10 documents and
if it matches perform A if it does not match perform B
The catch is the 10 different document may not
have the same Keyword i.e. Invoice no, instead it can Bill no, Invoice
number, Bill #, Inv etc.
example 2 : Search for Key word like Ferrari, BMW , if found need to
check if the individual is Authorized agent.
Question : Can the above be implement using Drools, second is it
worth the effort or just code if else in Java and get it done.
Thanks in advance.
Regards
Nitin
--
View this message in context: http://drools.46999.n3.nabble.com/Is-drools-the-solution-for-my-requireme...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Guvnor - more than one resource in changeset.xml
by rganesh84
I have 2 packages in Guvnor UI having different set of rule assets in it.
pkg1 -> UI rules
pkg2 -> Business rules
In the java application code base, is it mandatory to have 2 change set xmls
with different package contents?
[Java] // for UI rules
kagent.applyChangeSet(ResourceFactory.newClassPathResource("guvnor-tomcat-pkg1-changeset.xml"));
[/Java]
[Java] // for business rules
kagent.applyChangeSet(ResourceFactory.newClassPathResource("guvnor-tomcat-pkg2-changeset.xml"));
[/Java]
Can this be achieved having only one changeset holding multiple packaged
rules?
[change set]
<add>
<resource
source='http://server:8080/guvnor-tomcat/rest/packages/com.pkg1/source'
type='DRL' basicAuthentication="enabled" username="admin" password="admin"
/>
</add>
[/changeset]
If i add a resource to add tag, how do I call it in Java code?
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-more-than-one-resource-in-change...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Line breaks in DSLR
by Stefan
I have written a simple DSLR-rule with a rather long sentence in the
when-part:
-----------------------------------------------------------------
rule "NR3620"
when
tariff number of a position starts with "0301" and the duty measure
is one of "112", "122", "142", "141", "143" and code of condition is "M" and
customs value of position is less than the reference value of condition
then
Error F3620
end
-----------------------------------------------------------------
When I try to break up the sentence into serveral lines for better
readability I get an error. This does not word:
-----------------------------------------------------------------
rule "NR3620"
when
tariff number of a position starts with "0301" and
the duty measure is one of "112", "122", "142", "141", "143" and
code of condition is "M" and
customs value of position is less than the reference value of
condition
then
Error F3620
end
-----------------------------------------------------------------
Here is the corresponding expander (line breaks at the lhs of the 5th
when-clause are ok!):
-----------------------------------------------------------------
[when]condition code=condCode
[when]customs value=custValue
[when]reference value=condAmount
[when]less than=<=
[when]
tariff number of a position starts with {tariffNumberPrefix} and
the duty measure is one of {dutyMeasureCodes} and
code of condition is {conditionCode} and
{propPosition} of position is {comparator} the {propCondition} of condition
=
$measure: DutyMeasure(
tariffCode str[startsWith] {tariffNumberPrefix},
addCodeNumber in ({dutyMeasureCodes})
);
$condition: Condition(
condCode == {conditionCode}
)
$position: ImportPosition(
tariffNumber str[startsWith] {tariffNumberPrefix},
{propPosition} {comparator} $condition.{propCondition}
);
[then]
Error {code} = System.out.println("{code}");
-----------------------------------------------------------------
Any idea how to break up the long DSL-sentence into several lines?
Thx Stefan
--
View this message in context: http://drools.46999.n3.nabble.com/Line-breaks-in-DSLR-tp4025707.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
issue running Drools Expert 6.0 CR2 inside OSGi
by yelin66
I was able to have Drools Expert 5.3 running inside OSGi. However, the
bundles from 5.4/5.5 were having problem even to start inside the OSGi
container. I tried 6.0 CR2 recently, and encountered the following issue:
• Basically, my model class(es) failed to be loaded from the drools-core &
drools-compiler bundles, although the similar code worked in 5.3. I did some
investigation, and noticed that in 5.3 both drools-core & drools-compiler
have “DynamicImport-Package: *” in the bundle’s manifest file. I tried
manually adding “DynamicImport-Package: *” to the bundle’s manifest for 6.0
CR2, and that worked.
So what’s your suggestions on how to run 6.0 bundles inside OSGi? Would
appreciate your feedback.
--
View this message in context: http://drools.46999.n3.nabble.com/issue-running-Drools-Expert-6-0-CR2-ins...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
How Answers to community question Appear on more than one site
by Zahid Ahmed
Hi,
I also wanted to know that I replied on rules-users mailing list and now my answer is listed on http://www.marshut.com/ website instead of jboss community. Some answers get displayed at nabble.com.... Howcome some answers are visible on marshut and some on nabble. I just want to know is this a new technique to balance the load on community site.
Thanks and Best Regards,
Zahid Ahmed
12 years, 8 months
Persistence and event expiry
by DanielStahl
Hi,
I'm quite new to Drools, and very excited about the possibilities it offers,
but I need a bit of advice. I'm using Drools 6.0.0.CR1 to run a Stream
session in my application.
The application will be running for extended periods of time, so I need to
be able to delete facts over time. I can solve that nicely by declaring them
as events and letting them expire either implicitly or explicitly.
I also need the session to be persistent, so that if the application
restarts it resumes from any previously saved state. I can do that by
creating my own ObjectMarshallingStrategy and adding an EventListener,
marshalling upon insert/update/deletion of facts, and then unmarshalling
upon startup. That works.
My problem is that unmarshalled events never expire. To exemplify: Event A
will expire after 30s. Before that happens, though, the application restarts
and unmarshals the session. Event A is now still in the fact base of the
restarted session, but it will never expire. Since I'm new to Drools, I'm
assuming I'm doing something wrong, but I'm not sure what. So my question
is: is my setup reasonable, or is there a better way to achieve this? Is
this working as intended, or a bug? If working as intended, is there a
workaround?
Best regards,
Daniel Ståhl
--
View this message in context: http://drools.46999.n3.nabble.com/Persistence-and-event-expiry-tp4025697....
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Dublin : JBoss BRMS (Drools) event Wed 28th August
by Mark Proctor
Just a reminder this event is for tomorrow:
http://blog.athico.com/2013/08/dublin-jboss-brms-drools-event-wed-28th.html
---
Thanks to Sabeo and IrishDev I'll be doing two presentations now, one in the morning, and one in the evening. Both events are free, but you must register, and spaces are limited. So please help spread the word.
Both events are sponsored by Sabeo, and the evening event is hosted by Dublin Java User Group (aka DubJUG).
Morning Event
Date : 28 August
Start: 09:30
Location: The Westin Dublin Hotel, College Green, Westmorland Street, Dublin 2
URL: http://tinyurl.com/mfralbu
Evening Event
Date : 28 August
Start: 18:30
Location TCube, Pheonix House, 32-34, Castle St, Dunblin 2
URL: http://irishdev.com/Home/Events/896-Dublin-Java-User-Group-.html
12 years, 8 months
drools engine freezes when idle
by arcee123
Greetings,
I am a new drools developer. This is my first installation.
I have followed the instructions for installation, and was able to bring up
Govnor and my my repositories.
It appears to work great.
The problem is that if the service sits idle, meaning no requests of the
Govnor repository, the resources on the machine tie up, and the service
freezes.
I am attempting to find the culprit, but I was hoping that someone here
might have seen this before, and is able to help me on the start point to
figuring out what's wrong.
Thank you.
--
View this message in context: http://drools.46999.n3.nabble.com/drools-engine-freezes-when-idle-tp40256...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months