Syntax diagrams available on my home page
by Wolfgang Laun
I finally found another program (PeterThiemann's Ebnf2ps) for creating
syntax diagrams from an EBNF grammar which is close to, but regrettably not
identical to the antlr3 grammar notation. Babel all over again.
You can download them as a pdf file from my home page
http://members.inode.at/w.laun/ or just follow this
link<http://members.inode.at/w.laun/drools/DroolsSyntax.pdf>.
The grammar has been streamlined according to what was discussed here
yesterday.
Currently they are copyright Wolfgang Laun, which doesn't mean I won't
contribute them to the Project. But the Team will have to make up their mind
whether they want them at all, and in which way, and whether they want to
include the production steps, etc. etc. Currently I run Ebnf2ps (a Haskell
program) to produce the diagrams as individual eps files, which are imported
by a simple LaTeX document. Some NTs had to be broken down so as not to
exceed the margins because this (otherwise fine) program doesn't have a
feature to wrap wide diagrams. If I get around to learning my umpteenth
programming language I might have a go trying to fix that...
-W
14 years, 3 months
predicate constraints - "arrow" symbol
by Wolfgang Laun
I found a reference to "predicate constraints" in a 2006 mail archive entry.
Since I've never seen it in the Expert manual or heard about it, I assume it
has been deprecated long time ago?
-W
14 years, 3 months
Syntax diagrams by antlr broken
by Wolfgang Laun
I discovered that antlrworks-1.4.jar is capable of producing syntax
diagrams, and I ran the modified DRL grammar through it.
The result is disappointing:
- eps output is broken: boxes are empty, texts are somewhere outside. (I
could fix this, but then it would suffer from the same problems as jpg/png -
see below.)
- jpg, png aren't useful, because
1. There is no wrapping of wide diagrams.
2. keywords (e.g. 'package') are represented as a sequence of single
letter terminals, which looks terrible (and produces even wider diagrams).
3. Lines overlap in certain cases, which is confusing.
-W
14 years, 3 months
Drools&jBPM Boot Camps 2011 USA and EMEA (Rules, Workflow, Event Processing and Ontologies)
by Mark Proctor
We are looking into an end of February date to do the next week long
Boot Camp, location to be decided - proposals for USA so far are
Chicago, Austin and Miami. The EMEA one will be Berlin, probably
overlapping with the 2011 JudCon.
The last boot camp had a medical focus and was a huge success. We have
more budget this year so hoping to build on that.
We are thinking of doing a Monday optional 1 day pre-conference "basics"
day, to avoid repeating the "what is a process, what is a rule, what is
an event" type talks. This also means we don't bore returning people
with repeated content and that everyone there has the basics.
Then follow up with 2 days of applied industry talks split into
"vertical tracks". Because of the high level of interest and success
last time, we will run a dedicated 2 day Medical/Healthcare track again.
Whether we run dedicated or mixed tracks for other verticals depends on
interest and people's willingness to present or organise and lead other
verticals. I imagine initially we'd probably do mini tracks, say half a
day per vertical. Some target verticals would be telecoms, commercial
finance (trading), consumer finance (mortgage/insurance/loans), logistics.
The 4^th day would then be an organised workshop day. We'll provide
bootable USB keys for all in attendance, so that we have a quick start
off (previously we wasted hours getting everyone up and running with
virtual images). The workshops will allow people to go through the very
basic examples or the more advanced examples and infrastructure set-up
with us on hand. Those that have their own projects and just want to
work on that with us on hand to offer help can do so too.
The 5^th day will be more of an open floor. Some people will leave
early, others will want to continue working through the basic examples
and making sure they can configure and set everything up. Others will
want dedicated discussion time to work on their own problems and ideas.
In general it's the day where the developers will be on hand for what
ever anyone wants -- you'll get out of it what you put in.
If you would like to present or even run and organise a vertical let me
know. In the past I've found for a vertical to work it needs a well
connected industry person to chair it, so we definitely need community
people to take up the mantle here. Talks can either be "What we did with
Drools and/or jBPM" or "This is an industry problem use case that could
be solved with Drools and/or jBPM" or just something that we think will
be of interest to the audience. The range of technologies covers (but
not limited too) rules (expert systems and other derivatives domains),
workflow, event processing and ontologies.
The event will again be free for attendance. We are thinking of opening
it up for sponsorship to help towards food and drink.
So if you are interested in talking, organising, sponsoring or just have
some general input then let us know - we want to progress in moving
these events to a more industry focus and not pure technology, for that
to happen we need YOU the community.
Mark
14 years, 3 months
Curious inconsisteny (?) in DRL.g
by Wolfgang Laun
Rules lhs_not and lhs_exist are analogous, and both of them are derivations
of lhs_unary.
But lhs_unary also has the alternative lhs_not_binding, which permits us to
write one of
these two forms:
not $label : Fact( )
not $label : ( Fact1() || Fact2() || ... )
Is this binding, which is restricted to the scope of 'not', useful in any
way?
Possibly within the 1st form, in an inline eval. But I don't see how it can
be used in the second case.
Why is the same binding not possible with 'exists'?
(This is not meant to say that I'd like to have binding for 'exists', too.)
-W
14 years, 3 months
RowAdapter incomplete in 5.1
by Eric Lindahl
I attempted to integrate the live query feature, but due to stubbed out
classes like RowAdapter, it fails.
Simple operations such as Row.get must work, but currently only partially
work.
Will there be a fix to RowAdapter/ Live Query for 5.1, or will I have to
wait for 5.2?
Thanks,
Eric
14 years, 3 months
Enhancing the usefulness of FOL clauses, take 2
by Wolfgang Laun
Observe:
rule "Bill Status"
salience 100
when
p :- exists Bill( paid == true )
then
System.out.println( "There are " + (p ? "some" : "no") + " paid bills."
);
end
rule "Pay Bills"
when
$bill: Bill( paid == false )
then
System.out.println( "Paying " + $bill.getAmount() );
modify( $bill ){ setPaid( true ) }
end
There are three unpaid Bills inserted, then fireAllRules():
There are no paid bills.
Paying 3000
There are some paid bills.
Paying 2000
Paying 1000
-W
14 years, 3 months
ResourceType - why is it not an enum?
by Wolfgang Laun
I find that the implementation shown below is more Java-ish. It would have
some
advantages when branching based on a ResourceType value, etc. No errors show
up when I use this in Eclipse.
YMMV.
-W
public enum ResourceType {
DRL ( "Drools Rule Language", "drl" ),
XDRL ( "Drools XML Rule Language", "xdrl" ),
DSL ( "Drools DSL", "dsl" ),
DSLR ( "Drools DSL Rule", "dslr" ),
DRF ( "Drools Rule Flow Language", "rf" ),
BPMN2 ( "Drools BPMN2 Language", "bpmn" ),
DTABLE ( "Decision Table", "xls" ),
PKG ( "Binary Package", "pkg" ),
BRL ( "Drools Business Rule Language", "brl" ),
CHANGE_SET( "Change Set", "xcs" ),
XSD ( "XSD", "xsd" );
private String description;
private String defaultExtension;
ResourceType( String description, String defaultExtension ) {
this.description = description;
this.defaultExtension = defaultExtension;
}
public static ResourceType getResourceType(final String resourceName) {
return valueOf( resourceName );
}
public static ResourceType determineResourceType( final String
resourceName ) {
try{
return valueOf( resourceName );
} catch( Exception iae ){
return null;
}
}
public boolean matchesExtension( String resourceName ) {
return resourceName != null && resourceName.endsWith(
"."+defaultExtension );
}
public String getDefaultExtension() {
return defaultExtension;
}
public String getDescription() {
return description;
}
public String getName() {
return this.name();
}
@Override
public String toString() {
return "ResourceType = '" + this.description + "'";
}
}
14 years, 3 months
Red Alert - laune releases again ;-)
by Wolfgang Laun
The intent of a minor extension is to streamline the documentation
facilities,
this time for the KnowledgBuilderOptionsKonfiguration. Most is in place,
viz.
<T extends SingleValueKnowledgeBuilderOption
<file:///extra/drools-5.1.1/javadoc/stable/drools-api/org/drools/builder/conf/SingleValueKnowledgeBuilderOption.html>>
T *getOption*(Class
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html><T>
option)
<T extends MultiValueKnowledgeBuilderOption
<file:///extra/drools-5.1.1/javadoc/stable/drools-api/org/drools/builder/conf/MultiValueKnowledgeBuilderOption.html>>
T *getOption*(Class
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html><T>
option,
String
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html> key)
But there is no way of obtaining the full set of a
MultiValueKnowledgeBuilderOption.
So I propose to add the simple
public <T extends MultiValueKnowledgeBuilderOption> Set<String>
getOptionKeys( Class<T> option );
which will let you retrieve them all with the 2nd method above.
for( String key: config.getOptionKeys(AccumulateFunctionOption.class
) ){
System.out.println( key + "->" +
config.getOption(AccumulateFunctionOption.class, key).getClass().getName()
);
}
collectList->org.drools.builder.conf.AccumulateFunctionOption
max->org.drools.builder.conf.AccumulateFunctionOption
count->org.drools.builder.conf.AccumulateFunctionOption
maximum->org.drools.builder.conf.AccumulateFunctionOption
sum->org.drools.builder.conf.AccumulateFunctionOption
avg->org.drools.builder.conf.AccumulateFunctionOption
average->org.drools.builder.conf.AccumulateFunctionOption
collectSet->org.drools.builder.conf.AccumulateFunctionOption
This doesn't unhide anything, does it? Any objections?
-W
14 years, 3 months