Declared fact metadata
by pagrus
Hi,
I'm exploring declared fact metadata capabilities, hoping that it will
enable declaring validation constraints.
One thing I cant find in both docs and API is the way to introspect the
metadata of certain declared fact type.
E.g, given the example from Drools Expert docs
declare Person
@author( Bob )
@dateOfCreation( 01-Feb-2009 )
name : String @key @maxLength( 30 )
dateOfBirth : Date
address : Address
end
... is it possible to determine programmatically what metadata is associated
with Person's attributes? Or more specifically - determine that "name" field
has "maxLength(30)" metadata associated?
Thanks,
Pavel
--
View this message in context: http://drools.46999.n3.nabble.com/Declared-fact-metadata-tp3014454p301445...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 9 months
Decision table imported into guvnor fails validation
by Lisa Horton
I have a decision table (xls) that I am able to successfully load into a knowledge base and test in my java code. However, when I import it into guvnor using the Create a File upload for xls type, validation fails with these errors:
[document list decision table] Rule Compilation error The type com.domain.job.AbstractJob is not visible The type org.apache.commons.lang.reflect.MemberUtils is not visible Syntax error on token "enum", Identifier expected The type org.apache.commons.lang.Entities is not visible The type com.abclegal.domain.activity.AbstractActivity is not visible Syntax error on token "enum", Identifier expected Syntax error on token "enum", Identifier expected The type org.apache.commons.lang.IntHashMap is not visible The type org.apache.commons.lang.builder.IDKey is not visible The import org.apache.commons.lang.NumberRange collides with another import statement The import org.apache.commons.lang.math.NumberUtils collides with another import statement
The spreadsheet does include import statement in the rules template section, including an import of com.domain.job.AbstractJob seen above. AbstractJob is in the POJO model.
I am at version 5.1.1
I'd appreciate any suggestions for troubleshooting. Also, is this the recommended way to integrate decision tables with Guvnor rules (i.e. to import into guvnor), or is there a better practice for managing decision tables along with other rule sources?
14 years, 9 months
Two Day Drools and jBPM Workshop (Argentina June) - Registration Now open
by Mark Proctor
You can now register for this event here:
http://droolsatba.eventbrite.com <http://droolsatba.eventbrite.com%20/>
Hurry limite spaces!!!
Mark
http://blog.athico.com/2011/05/2-day-drools-and-jbpm-workshop.html
Thanks to OSDE we now have a 2 day workshop planned in Argentina, Buenos
Aries, for June, with nearly all the core Drools and jBPM developers. A
MUST attend event for any developer in South America.
We are just finalising locations, agendas and speakers, we'll give more
firm details later, but initially the line up is as follows:
Where: Argentina (Buenos Aries)
Date: 16-17 June (Thu/Fri)
Speakers:
Mark Proctor - Group Lead and Drools co-founder
Kris Verlaenen - jBPM Lead
Edson Tirelli - Drools tech Lead
Geoffrey De Smet - Planner Lead
Michael Anstis - Business Tooling tech lead
Ray Ploski - Solutions Architect
Guest Speakers (so far)
Salatino Mauricio (Plugtree)
While us core developers will be focusing on Drools and jBPM, Ray will
be there to do talks on AS7, Seam and Infinispan.
14 years, 9 months
Is there any work going on for Drools on .net?
by rahultechie
Hi,
I am currently working on Drools on .net. What I found that the latest
version of drool .net is 3.0 which was developed around 2007. After that
there is work no done on Drool .net.
On above investigation following are my some of questions,
1. Whatever information I got is correct?
2. I want to use drools in my .net project. Latest version of Drools is 5.0
in JAVA, in future can we see Drools 5.0 in .net?
3. Is there any work around for now to use Drools 5.0 in .net?
Any link to above question will be useful.
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-work-going-on-for-Drools-o...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 9 months
Problem with sub-process rules inside multiple instances
by HMandic
Does anyone have a working example of a sub-process with rules, inside a
multiple instances node?
I can't get it to work properly.
This sub-process of mine has one script node (that just prints something)
and one rule. Multiple instances node gets a Collection of three elements,
so the sub-process in question should run three times, and it does.
The script node executes three times, as it should, BUT the rule executes
only for the first sub-process, not for the other two!
Just to clarify things - there's no condition in that rule, just a
System.out.print in RHS.
--
View this message in context: http://drools.46999.n3.nabble.com/Problem-with-sub-process-rules-inside-m...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 9 months
Smart Templates
by ChrisMu
Hi,
I'm trying to get a template (.drt) to generate 2 rules (.drl) from 2
datasets but by doing a little bit more work than direct substitution.
Data (service,value):
DC, AAA
DC, XYZ
Idea for the template - if value is of type1 then create Type object with
'Type1' as name. If value is of type2, use 'Type2' as name:
rule "DC_(a){row.rowNumber}"
when
Service(name == "DC")
then
Type.setName(eval(Service.getType(@{value})))
Type.setAtt(0,@{value})
end template
eval(Service.getType(@{arg0})) should take 'AAA' or 'XYZ' etc as arg and
return a string Type1/Type2 etc.
This would then generate 2 rules that look like:
rule "DC_0"
when
Service(name == "DC", value == "AAA")
then
RiskType.setName("Type1")
RiskType.setAtt(0,"AAA")
rule "DC_1"
when
Service(name == "DC", value == "XYZ")
then
RiskType.setName("Type2")
RiskType.setAtt(0,"XYZ")
...is this possible at all? I'm trying to avoid the eval step being done in
the actual rule (.drl) .
Thanks
Chris
--
View this message in context: http://drools.46999.n3.nabble.com/Smart-Templates-tp3006479p3006479.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 9 months
TimerService vs TimeMachine and date-effective
by drdaveg
A common issue that I am looking into is setting the execution date to test
future or legacy rules (i.e., with dates that are not the system date.) A
number of users have posted about TimeMachine, TimeServices and the perils
of setting the system date - but a JIRA lists TimeMachine as being remove
and TimeServices doesn't look like it has a setter for the execution time.
What is the API for simulating the date to be compared against effective and
expiration dates of rules that can be used by stateful sessions?
--
View this message in context: http://drools.46999.n3.nabble.com/TimerService-vs-TimeMachine-and-date-ef...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 9 months
how to do things like "distinct"?
by Simon Chen
Hi all,
I have the following problem.
Let's say, I have a class Number3(), with three fields a, b, and c.
I have the following rule:
rule "test3"
when
Number3($a: a, $b: b)
$minvalue: Number()
from accumulate(Number3(a == $a, b == $b, $c: c), min($c))
then
System.out.println($a + " " + $b + " " + $minvalue);
end
Say, I have four objects (1,2,3), (1,2,4), (1,3,4), (1,3,5).
The result shows four lines:
1 3 4.0
1 3 4.0
1 2 3.0
1 2 3.0
But I want the output to be:
1 3 4.0
1 2 3.0
meaning that for each unique pair of a and b, I want the rule to fire only once.
Is this doable?
Thanks.
-Simon
14 years, 9 months
Create rules programatically
by David Godfrey
Hi,
Can someone point me in the direction of documentation or code examples for
the following? I want to programatically create rules for execution, e.g.
within my application I will hold criteria which users will define, at
runtime I would like to build a component to extract these values (from my
app database) and build rules based on those values. Everything I've seen so
far seems to talk about using DRL files, ideally I want to programatically
create the entire rule in Java, and then call Drools to execute my rule set.
Thanks,
14 years, 9 months