GWT hosted mode
by Michael Neale
GWT hosted mode has served us well, but I think I have reached the limit.
This I think we will move to the mode where you need to fire up an app
server, and then fire upt he hosted mode browser for debugging.
19 years
pluggeable evaluators
by Mark Proctor
Edson,
Is it possible to make the parser have pluggeable evaluators? From the
Descr/RuleBuilder side it's not too hard, but it does mean that the
operator can be any ID or String. The idea is the name would first be
looked up from a list of available evaluators, if it doesn't find it
then it looks at the list of methods matching the name with a single
parameter on the left fact.
Mar
19 years
Adding parameters to RulesTables
by Terry Laurenzo
I added some logic to the decisiontables module to allow properties
to be specified per RulesTable. This is done by declaring a
RulesTableConfig tag followed by properties that should apply to the
following RulesTable. I used this capability to allow declarations
of code snippets that should be inserted before/after generated
conditions and before/after the consequences on the right hand side.
This allows me to create more complicated rule templates.
For example, the declaration:
----
RuleTableConfig
LhsPreamble ##LHS PREAMBLE
LhsTrailer ##LHS TRAILER
RhsPreamble ##RHS PREAMBLE
RhsTrailer ##RHS TRAILER
----
produces the following DRL output:
----
package Testing_table_configuration;
#generated from Decision Table
#From row number: 14
rule "_14"
when
##LHS PREAMBLE
Abc(column == "123")
##LHS TRAILER
then
##RHS PREAMBLE
def.action;
##RHS TRAILER
end
----
The patch which includes these changes (against 3.0.5 source bundle)
is attached. I also added a test case spreadsheet to src/test/
resources/data which is not included in the patch but is attached to
this email. For some reason I was unable to get the patch to apply
cleanly from the command line but Eclipse took it just fine.
Let me know if this is of interest and is a candidate for commit to
SVN. If so, I can update the patch to apply against the trunk.
Terry Laurenzo
19 years
Parameterized type
by fanory
Hello,
I have a method on my business model that return a parameterized type:
public <P extends Profile> P getProfileValidAt(Class<P> profileClass, Calendar
validAt) {
List<P> history = getHistoryProfile(profileClass);
for(P profile: history) {
if (profile.getValidFrom().compareTo(validAt)<=0 &&
profile.getValidTo().compareTo(validAt)>=0) {
return profile;
}
}
return null;
}
I use jbossrule 3.0.3.
I my drl files, i use this method but it doesn't work. I have a compilation
error on the rules. If i change parameterized type to a specific profile class,
it works. Do jbossrule accept parameterized type as return value type ?
Thanks in advance.
19 years
design thoughts: package configuration and asset loading API
by Michael Neale
Kris - find attached - its not complete, but it will give you a start - very
simple.
Edson - I don't think the assembly of these file assets into a binary
package should be done in an IDE specific way - as we will want to do the
same from:
a) the repo
b) just an api or a directory?
c) a list of Reader objects, combined with each "asset type"
I am thinking
c) is the most generic - so we have an "assembly" api - of which the current
olde stuff is a simple subset:
eg: PackageAssembler.loadFrom(PackageConfig conf, RuleSource[] inputs)
....loadFrom(RuleSource ...) (for accumulating)
RuleSource is basically a Reader, plus some meta data to tell it if it is a
brl, or function, or rule, or dsl, or decision table, or whatever !
Then to satisfy a and b, and the IDE - we just have different adapters to
produce the RuleSource objects ?
Not sure if this should augment PackageBuilder or not - currently package
builder is kind of lower level, but I guess this could be part of it (but is
this API bloat? )
Basically it would feed the PackageBuilder api, so its really a front end of
sorts.
Thoughts ?
Mostly this package assembler would NOT be called directly by users - but by
tools (eg ant, IDE, repo deployer) that users use, whereas the
PackageBuilder is designed for use as it is now.
Michael.
On 3/7/07, Kris Verlaenen <kris.verlaenen(a)gmail.com> wrote:
>
> Sure, seems doable. Could you upload a zip containing a larger
> example maybe? I was thinking about some rule files (one for each
> rule, syntax exactly like current drl?), which implicitly refer to
> stuff that is defined in the package file (imports, globals, anything
> else), functions (also in a separate file I assume), etc.
>
> So something to test the builder with: if I'm able to parse that set
> of files, the builder would be supporting all important features :)
>
> Kris
>
> On 3/6/07, Michael Neale <michael.neale(a)gmail.com> wrote:
> > Kris, I updated this JIRA:
> >
> > http://jira.jboss.com/jira/browse/JBRULES-568
> >
> > Can you take a look, tell me if it makes sense, and if its doable.
> Probably
> > could be split into 2 if you like (one for DroolsBuilder, one for the
> GUI).
> > This is critical for BRMS integration, BUT, it is useful even without a
> BRMS
> > (eg this GUI coudl provide a hook to fire of the ant task to compile the
> > rules into a deployable binary package).
> >
>
19 years
TUTORIAL
by Rich Halsey
Mark,
I'm going to give some serious thought to doing the tutorial for JBoss Rules (as you suggested). I cannot promise anything definite at this time, but I will definitely look into it.
Rich Halsey
"NON ILLEGITAMATES CARBORUNDUM"
....God grant me...
The senility to forget the people I never liked
The good fortune to run into the ones that I do
And the eyesight to tell the difference."
19 years