Help

This is a small thing that I ran into when writing Decision Tables using OpenOffice:

Let's say in a CONDITION column you want to write the following pattern:

section : Section(type == "$param") from company.sectionList

If you type this into the column (without cut/paste) it will look like:

section : Section(type == “$param”) from company.sectionList 

The difference here is the double quotes generated by OpenOffice. If you do not change all of them and try to load your Decision Table with for example:

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
DecisionTableConfiguration config = KnowledgeBuilderFactory.newDecisionTableConfiguration();
config.setInputType(DecisionTableInputType.XLS);
kbuilder.add(ResourceFactory.newClassPathResource("mydecisiontable.xls"), ResourceType.DTABLE, config);
.....

you will get the following type of exception:

[8,29]: [ERR 101] Line 8:29 no viable alternative at input ''
[8,39]: [ERR 101] Line 8:39 no viable alternative at input ''
[9,29]: [ERR 101] Line 9:29 no viable alternative at input ''
[9,37]: [ERR 101] Line 9:37 no viable alternative at input '' 

...just something small to consider when debugging your Drools Decision Tables. Note that Decision Table support was added to Seam since 2.2.0.CR1

2 comments:
 
28. Apr 2010, 17:55 CET | Link
Mike

Thanks! Saved me from going crazy.

ReplyQuote
 
21. Jun 2012, 03:26 CET | Link
Toshiya
I've just found that the auto correction can be disabled with [Tools]->[Auto Correct Options] -> [Localized Options] in LibreOffice :)
Post Comment