Tuesday, March 27, 2012

Guvnor - Improved default value handling

Some things start simple.

Take the "Default Value Editor" for example. This simple editor provides the means to define a default value for columns' cell values for the Guided Decision Table editor. When a new row is inserted the cell assumes it's default value. Simple.

The Default Value Editor has always been a TextBox and it was time it was improved to be consistent with the new improved "typed" editors used through-out Guvnor (with CR1 looming more extensive enhancements take a back seat).

The requirement was simple: make the editor suitable for the data-type of the column.

After the first day of re-factoring it became apparent things were not going to be quite as simple as I'd hoped. Things needing consideration:-
  • If a "Value List" is provided, the default value needs to be one of the values in the list
  • If the column represents a field with an enumeration the default value must be one of the enumeration's members
  • If the column uses an operator that does not need a value (e.g. "is null") a default value cannot be provided
  • If the column field is a "dependent enumeration" the default value must be one of the permitted values based upon parent enumeration default values, if any.
  • Default values are not required for Limited Entry tables.
  • Default values always remain optional.
  • Default values can be defined in either the Guided Decision Table editor or the Guided Decision Table Wizard.
The changes are now complete and committed to github in time for the CR1 branch. If you use decision tables, if you use default values be sure to check it out before Final.

Setting the default value of a Date column

Setting the default value of a cell with a Value List

What started as a quick enhancement before CR1 turned out to be more extensive than expected.

Saturday, March 24, 2012

Protege 3.5 Alpha released with Drools SWRLTab support

Thanks to Martin O'Connor, from Stanford, for implementing the Drools SWRLTab for Protege:
We are pleased to announce Protege 3.5 alpha! The main focus of the 3.5 series is the SWRLTab's support of the Drools rule engine, thus providing a completely free and open source solution for executing SWRL rules in Protege-OWL.

Please contact us via one of the Protege 3 mailing lists with questions, feedback, and bug reports.
Download Protege 3.5 alpha from the main Protege website (new users, please register first).

Release Notes

The contents of the release notes section describe changes relative to Protege 3.4.8.

Build 643 -- March 23, 2012

The SWRLTab now supports the Drools rule engine.

A new tab called the SWRLDroolsTab provides a graphical interface for interacting with this implementation. The existing SWRLJessTab is still available. All existing SWRL built-in libraries are supported in the Drools implementation.

Both the Drools and Jess implementations now use a pair of OWL 2 RL-based reasoners for performing inference (read more). These reasoners are also used by the SQWRL query language.

The Java APIs provided by the SWRLTab have changed slightly so users of these APIs will need to update their code. Information on these changes can be found here. The process of building the SWRLTab and its associated rule engines has also changed. The new build process is outlined here.


Thursday, March 15, 2012

Guvnor - Recent improvements

Other than a sighting at the London BRMS 2012 event last week it would appear I have been somewhat quiet in recent weeks. This, it can be argued, is a good thing ;)

However I've just finished a couple of improvements to Guvnor for CR1 I thought it worth telling you about:-

Improved numeric data-type handling

To be honest, numerical data-types in Guvnor have not been supported that well in the past. The best you'd get, to edit such values, was a text box that had very limited restriction on what could be entered. This was largely because the heart of Guvnor used to drive most of the editors was only aware of a generic "numerical" type.

With a little bit of blood, sweat and tears this has now been improved to differentiate between all of Java's primitive numerical types (byte, short, integer, long, double and float) together with BigDecimal and BigInteger. When adding a numerical field to a rule you now get an editor relevant for the type with more strict validation.

DRL generation has subsequently been improved to ensure the distinction between numerical sub-types is rendered correctly (most notably the treatment of BigDecimal and BigInteger in the right-hand-side of a rule for Java or MVEL dialects).

MVEL DRL example
rule "brl"
dialect "mvel"
$c : Container( )
$c.setBi( 35352324242424242424I );
$c.setBd( 4343.3434344343B );
update( $c );
Java DRL example
rule "brl"
dialect "java"
$c : Container( )
$c.setBi( new java.math.BigInteger("35352324242424242424") );
$c.setBd( new java.math.BigDecimal("4343.3434344343") );
update( $c );

Dependent enumerations

Dependent enumerations are now available to the Web Guided Decision Table editor in Guvnor. A dependent enumeration is one whose values depend upon the value of another (parent) enumeration. Examples include Continent\Country\Region, Manufacturer\Product etc.

Dependent enumerations are available to both Extended Entry and Limited Entry tables; together with appropriat
e expansion when generating an expanded form table.

Dependent enumerations also function in the BRL Rule Editor and Rule Templates.

For those wanting to see dependent enumerations in action and can't wait for CR1 here's a quick video demonstrating them: The dependent enumerations are shown first, then a new expanded form decision table is generated before being edited.

A couple of regressions were noticed by a vigilant community user (thanks Nicolas Héron) and have been subsequently fixed. The changes for both enhancements have been extensive hence I would urge you to download and try CR1, when it becomes available, so anything else untoward can be squashed before 5.4.0.Final.


Tuesday, March 13, 2012

RuleML2012 - The 6th International Symposium on Rules

* RuleML2012@ECAI - 6th International Symposium on Rules: *
* Research Based and Industry Focused *
* Montpellier, France, August 27-29, 2012. *
http://2012.ruleml.org *

The International Symposium on Rules, RuleML, has evolved from an annual series
of international workshops since 2002, international conferences in 2005 and
2006, and international symposia since 2007. This year the RuleML Symposium
will be held in conjunction with ECAI 2012, the 20th biennial European
Conference on Artificial Intelligence, in Montpellier, France, August 27-29,
2012. RuleML 2012 will include the RuleML Challenge Prize which awards the best
two demos.

We invite high-quality submissions related to (but not limited to) one or more
of the following topics:

* Rules and Automated Reasoning
* Logic Programming and Non-monotonic Reasoning
* Int'l Conference track on Pragmatic Web
* Rule-Based Policies, Reputation and Trust
* Rule-based Event Processing and Reaction Rules
* Fuzzy Rules and Uncertainty
* Rule Transformation, Extraction and Learning
* Vocabularies, Ontologies, and Business rules
* Rules in online-market research and online marketing
* Rule Markup Languages and Rule Interchange
* General Rule Topics

Important Dates
Abstract submission: March 25, 2012
Paper submission: April 1, 2012
Notification of acceptance/rejection: May 20, 2012
Camera-ready copy due: June 10, 2012
RuleML-2012 dates: August 27-29, 2012

Satellite Events
The RuleML2012 Symposium is also hosting
* The 7th AIS SigPrag Int.'l Conference Track on Pragmatic Web
* The RuleML2012 Doctoral Consortium:
* The 6th International Rule Challenge:
* Face-to-Face LegalRuleML OASIS TC meeting: 29 August, 2012

Posted By Prof. Dr. Adrian Paschke


Saturday, March 10, 2012

Get ready for jBPM Web Designer 2.1!!

We are close to releasing a new version of the jBPM Web Designer. This version will include awesome new features and numerous bug fixes - read all about it here!

Tuesday, March 06, 2012

Drools & jBPM Event : London 8th March 2012

Register now to join us for the free Drools & jBPM London 2012 event, hurry limited spaces :)

When Thursday 8th March
Where Ave Maria Lane, London, London EC4M 7DD (near St Paul's Tube)

Agenda trans
trans trans trans
09:00 trans Registration, tea and coffee
09:30 trans Introduction/ Welcome
09:45 trans Rules, Events & Processes: the Open Source way
Mark Proctor - Worldwide Technical Lead for BRMS & BPMS, Red Hat
10:45 trans Decision Tables
Michael Anstis, JBoss Core Developer, Red Hat
11:15 trans Tea/Coffee Break
11:30 trans BPMN2 and jBPM5
Kris Verlaenen, JBoss Core Developer, Red Hat
12:15 trans Solving Planning Problems
Geoffrey de Smet, JBoss Core Developer, Red Hat
12:45 trans Case Studies
13:00 trans Lunch and Networking


Sunday, March 04, 2012

Vehicle routing demo video

What's the optimal way to supply all locations with their request items, using 6 vehicles with a capacity of 100 items each?

This example will be part of Planner 5.4.0.CR1 :)

Update (16-MAR-2012):

In the latest version, I've pimped the GUI a little bit to make it more clear what vehicle routing does:



Saturday, March 03, 2012

Chained: the trick behind solving TSP and VRP in Planner with minimal code

Starting from 5.4.0.CR1 (soon to be released), Planner will have chained support: a feature specifically designed to help solve Traveling Salesman and Vehicle Routing like problems with minimal code. It's compatible with all the other planner features (construction heuristics, metaheuristics, real-time planning, ...) and it replaces a ton boilerplate code I used to have in the TSP example.

From the documentation:

A planning variable that is chained either:
  • Directly points to a planning fact, which is called an anchor.
  • Points to another planning entity with the same planning variable, which recursively points to an anchor.
Here are some example of valid and invalid chains:

Every initialized planning entity is part of an open-ended chain that begins from an anchor. A valid model means that:
  • A chain is never a loop. The tail is always open.
  • Every chain always has exactly 1 anchor. The anchor is a problem fact, never a planning entity.
  • A chain is never a tree, it is always a line. Every anchor or planning entity has at most 1 trailing planning entity.
  • Every initialized planning entity is part of a chain.
  • An anchor with no planning entities pointing to it, is also considered a chain.
The optimization algorithms and build-in MoveFactory's do chain correction to guarantee that the model stays valid:


Stay tuned... Vehicle routing (with capacity limits) demo video coming soon :)


Thursday, March 01, 2012

Build a Graphical Adventure Game in 20 minutes using JBoss Drools : All Hail the Wumpus


Today we take you on a 20 minute adventure. Building, almost from scratch, a complete graphical adventure game with Drools. The code will be part of the up coming Drools 5.4 release. The game is based on Wumpus World, from the book Artificial Intelligence: a Modern Approach.

All Hail the Wumpus

Please vote up on the dzone link at the bottom

For those wanting to try this now, you can use the latest snapshot build from hudson. It uses the new property specific extensions, so the examples cannot be run against older binaries.