Showstopper issues for Drools Adoption in our organization
by kapokfly
Not sure if these are also your questions you might have with the rule engine
adoption, but we have seen 2 showstopper issues for drools adoption in our
organization, or it is just because we are lack of some necessary knowledge.
Issue 1) : pattern match for large data
There are cases in a rule we need find matched records against a large
population of data and perform some actions.
Example:
From 2 millions employee directory, find those belongs to Depart1 and
with salary increased by 10% last year.
Inserting all these employee's data into WorkingMemory is HUGE and
mission impossible, we can't simply load the entire db into the working
memory, do we have any other approach to accomplish or this is just not a
use case can be resolved by a rule engine?
Issue 2): Map business object to real engineering implementation
What we are trying to do is to build a rule UI which a business user without
engineering background of our codebase can work with; the business object we
show on the UI might be different with the real engineering objects already
in system, for example, on the UI a user might be able to able to see
something like person.address.addressLine1 but the actually implementation
might not be an object traverse implementation.
Example, the model could be Long Person.addressId ; then referring to his
address we need another lookup and we want to hide such complexity to the
end user.
The approach we took is to design a translation layer to translate the user
input to drools rule string, is this the right approach?
If not, any suggestions? I know Drools is mainly designed for developers but
just trying to see if there is any way we can work it around.
Thanks and looking forward to your recommendations.
Ivan
-----
Ivan, your Panda, forever
--
View this message in context: http://drools.46999.n3.nabble.com/Showstopper-issues-for-Drools-Adoption-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
drools + AWS
by Bobby Richards
anyone running a drools app or more specifically guvnor on amazon's web
service?
14 years, 2 months
Bug in org.drools.core.util.DateUtils after changing value of drools.dateformat?
by prasad.deshpande
Hi,
I need to change value of system property drools.dateformat dynamically. If
I change the property, I still get error while executing rule
15:49:21,828 ERROR [STDERR] Unable to create a Field value of type
'ValueType = 'Date'' and value '"01-11-2011"' : [Rule name='EFP_14']
java.lang.IllegalArgumentException: Invalid date input format: [01-11-2011]
it should follow: [dd-MMM-yyyy]
15:49:21,831 ERROR [WorkplaceController]
904C7394BB64620F6B0738EA27C6B08B[runNestedRuleFromLayout] Error evaluating
ruleset "asfsd" of type "DRL" with resource 16306 (type 104).
Could not parse knowledge.
I tried to look into the source-code & found that class
org.drools.core.util.DateUtils does not make use of changed value of
property "drools.dateformat". Also, looking at code it is clear that once
the class is loaded by classloader, any change in system property will not
be reflected.
Anyone any comments before I raise a bug?
--
View this message in context: http://drools.46999.n3.nabble.com/Bug-in-org-drools-core-util-DateUtils-a...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
jbpm 3.2.x verssion .....
by Sumeet Karawal
Hi,
Can any body let me know whether jbpm v 3.2.8 is compatible with sun
solaris. If not then which of the versions among v3.2.x is compatible with
it. As I have to install it in both Windows and Sun Solaris.
Thanks in advance,
Sumeet Karawal
Mailto: sumeet.karawal(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
14 years, 2 months
Collecting properties in a rule
by LCode
I am trying to write a rule via the guided rule editor and I am really
struggling.
The following is a simplified explanation of my scenario:
I have a model where there are lots of 'Town' objects, each town has any
number of 'Supermarket' objects and each supermarket has a list of integers
'locationID'.
Something like this....
<Town>
<Supermarket name = 'asda'>
<LocationID>15</LocationID>
<LocationID>18</LocationID>
</Supermarket>
<Supermarket name = 'tesco'>
<LocationID>13</LocationID>
</Supermarket>
<Supermarket name = 'lidl'>
<LocationID>13</LocationID>
<LocationID>15</LocationID>
<LocationID>18</LocationID>
</Supermarket>
</Town>
(apologies to the Sainsburys shoppers!!)
I need to write a rule that fires when there are precisely 3 unique location
ID's in the whole town.
So in the example above the complete list of locationIDs would be 13, 13,
15, 15, 18, 18
With the following unique numbers 13, 15, 18
therefore the rule would fire as there are 3 unique numbers.
I hope that makes some sense.
I understand that I should collect the locationIDs into a java.util.Set in
order to count unique entries and I can collect together all supermarkets
into an arraylist. However I cannot for the life of me seem to collect
LocationID across all supermarkets.
Thank you so much in anticipation, I realise this was rather long-winded!
--
View this message in context: http://drools.46999.n3.nabble.com/Collecting-properties-in-a-rule-tp35035...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
Using Drools with JSP application.
by sachintaware
Hello Everyone,
I am learning Drools engine and have come across an
issue.I am not able to configure the Rules,for using it in a web
application.I want a UI from which the user selects some values and based on
it the rules are executed by drools.I studied the examples and got them
working but they seem to be worked with standalone features.I would like to
seek some help over it.
Use Case:
A html-jsp form having a select box for states of a country.
When user selects a state,candidates from that state should be displayed by
the rule engine.
I have got the database connection working,but not able to configure rules
over jsp.I am using a Apache tomcat 5.0 server.
Thanks
Sachin
--
View this message in context: http://drools.46999.n3.nabble.com/Using-Drools-with-JSP-application-tp349...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
How to use RepositorySessionUtil.getRepository()?
by Praveen
Hi All,
I am using below piece of code from a standalone system to access the Rules
repository.
RulesRepository repository = RepositorySessionUtil.getRepository();
But we are getting RulesRepository Exception as below:
org.drools.repository.RulesRepositoryException
at
org.drools.repository.RepositorySessionUtil.getRepository(RepositorySessionUtil.java:69)
at TestSample.main(TestSample.java:45)
Do we need to initialise something before using the above piece of code?
Please suggest, TIA.
Regards,
Praveen.
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-use-RepositorySessionUtil-getRep...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
Guvnor (5.3.0 Final)- Rule using accumulate with windows:length delivers an unexpected result
by axel
Hello All,
I'm using Guvnor 5.3.0-Final with Tomcat 6.0 testing the following simple
rule getting unexpected results. Maybe someone can give me a hint whats
wrong in my rule.
Thanks in advance!
Axel
Short Rule description:
A list is built from selected event-facts evalEvent(@role (event), Double f,
String wam) over a certain window in a first line (because I found the hint
to do it seperately in another thread). Next, I want to caclculate the
avarage, but only from the selected events in the list. Finally, I check a
certain limit with the average and the RHS is just inserting a fact to
generate some output in the test case.
rule "Event Processing Evaluation"
dialect "mvel"
when
$list:java.util.List() from collect( evalEvent(wam == 'D1', f != null)
over window:length( 1 ))
$average:Double() from accumulate( evalEvent($vf:f) from
$list,average($vf) )
eval($average > 5)
then
internalEvent fact0 = new internalEvent();
fact0.setDesrc( "Internal Event: "+ $average );
insert(fact0 );
end
Test details from Guvnor Test that delivers an (for me) unexpected result:
I'm inserting three events, where the avarage of all three events is over
the limit, but taken only the last or last two (same result) as I want to do
with the window:length is not and shoud therefore not fire the rule. I added
below output details from the Guvnor Test that shows the following: The list
seams to be right (only the last event in $list), the avarage seams to be
right ($average = 5.0) - but the rule still fires.
It seams for me that the average of all three evnts is internally used for
eval($average > 5). I tried a lot of variants, but nothing works well. I'd
like to check to use an entry-point if that changes the result, but I found
no way within the Guvnor Test Case Editor putting enty points in for events.
OBJECT ASSERTED value:evalEvent( wam=D1, f=6.0 ) factId: 1
OBJECT ASSERTED value:evalEvent( wam=D1, f=5.0 ) factId: 6
OBJECT ASSERTED value:evalEvent( wam=D1, f=5.0 ) factId: 9
FIRING rule: [Event Processing Evaluation] activationId:Event Processing
Evaluation [3, 2, 0] declarations: $list=[evalEvent( wam=D1, f=5.0 )](2);
$average=5.0(3)
OBJECT ASSERTED value:internalEvent( desrc=Internal Event: 5.0 ) factId:
12
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-3-0-Final-Rule-using-accumulat...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
String length check
by lansyj
Hi folks,
I'm trying to create a guided rule which treats customers differently based
on the length of their customer ID. The generated rule source is as follows:
rule "OP Customer"
dialect "mvel"
when
$bean : ProgramMemberBean( profileVO.memberID.size() == "8" )
then
$bean.setSegmentCode( "OP_CUSTOMER" );
update( $bean );
end
Everything seems good to me, but I get the following error upon validation:
[OP Customer] [ERR 101] Line 4:53 no viable alternative at input ')' in rule
"OP Customer" in pattern ProgramMemberBean
[OP Customer] [ERR 102] Line 4:55 mismatched input '==' expecting ')' in
rule "OP Customer" in pattern ProgramMemberBean
Any help is very much appreciated.
Best Regards
-lj
--
View this message in context: http://drools.46999.n3.nabble.com/String-length-check-tp3502269p3502269.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months