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

4 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 :)
 
30. Aug 2014, 03:55 CET | Link
polo

Best friend successive good years, Gucci Shoes Factory, winter spent in Sanya, Monster Beats Outlet, so winter home, seems to be nowhere in sight, North Jackets Outlet, both a little rusty, Nike Air Max Shoes, but also very cordial, Burberry Outlet Online, forward to tonight, feather-like snow, MCM Bags Outlet, drifts underground, Coach Black Friday, looking at that the floc, Louis Vuitton Outlet, fly like snow Ling, Michael Kors Outlet Online, eloquent, Polo Outlet Online, flying in the sky, Cheap Canada Goose, limp walk downs, strange things, Marc Jacobs Outlet Online, I float thinking lianpian, North Outlet Online, poetic heart wenqing, not help surging surging, Coach Factory Outlet, so I borrowed the winter, Ralph Lauren UK, snows research ink, Longchamp Sacs Sortie, into the mind of inactivity, Michael Kors Outlet, the white snow everywhere, Monster Beats By Dre, wrapped in some different, Ralph Lauren Outlet, kind of scenery, Oakley Sunglaases Outlet, wherever the wind in the faces, of the people, Michael Kors Bags Outlet, who are very Huddled, could not help.

Post Comment