Parser returned a null Package : DecisionTable

37 views
Skip to first unread message

Ravi Mangalagiri

unread,
Feb 21, 2021, 9:34:02 PM2/21/21
to Kogito development mailing list
I am getting the following error with my sample decision table...

Getting the following error w
Exception in thread "main" org.kie.kogito.codegen.rules.RuleCodegenError: Errors were generated during the code-generation process:
[2,5]: [ERR 102] Line 2:5 mismatched input ';'
[0,0]: Parser returned a null Package

Here is the source:
https://github.com/ravim786/hayagriva/blob/int/src/main/resources/com/bluepitch/ruleapp/hayagriva/PropertyTypeCode.xls

What am I doing wrong?

--
Ravi Mangalagiri
703-505-4240 (c)

Toni Rikkola

unread,
Feb 22, 2021, 5:59:19 AM2/22/21
to kogito-de...@googlegroups.com
Hi,

Not sure, but one thing I see is that the Unit row is added, but on the right cell next to it there is no rule unit name.

Toni

--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/CALg%3DC8OuYxW4-OPnoA4UGpf-FgbLU3qTW5WiHPOmUyMmpEG6fw%40mail.gmail.com.

Jakub Grabowski

unread,
Feb 22, 2021, 7:16:25 AM2/22/21
to kogito-de...@googlegroups.com
You can also try to import SubjectProperty into your XLS. It's a "blind shot", because I haven't tried it but import issues are common in rules.

Regards,
Jakub.

Ravi Mangalagiri

unread,
Feb 22, 2021, 1:06:43 PM2/22/21
to Kogito development mailing list
Nothing worked. Can I have a simple decision table without ruleunit and queries?

When I remove both unit and queries rows.. it's now complaining about $l: /deriveProperttTypeCode



Ravi Mangalagiri

unread,
Feb 22, 2021, 9:11:42 PM2/22/21
to Kogito development mailing list
After going through the documentation, I fixed the decisiontable and now i am getting the following error

ParseExpressionErrorResult: Unable to Analyse Expression subjectProperty.getAttachmentType == "Detached":


Toni Rikkola

unread,
Feb 25, 2021, 6:00:39 AM2/25/21
to kogito-de...@googlegroups.com
Hi,

Could be that the header needs to be changed from "subjectProperty.getAttachment" to "subjectProperty.attachment".

What I do is I convert the table to DRL since I pick the errors easier that way. I used BC since I have it open here, but I believe it should be possible to just dump XLS to DRL. Maybe that helps a bit. Also depends what format you are the most familiar with.

Toni

Ravi Mangalagiri

unread,
Mar 28, 2021, 12:25:12 PM3/28/21
to Kogito development mailing list
I have uploaded the project in github : https://github.com/ravim786/hayagriva

I am trying to get a sample decisiontable working with kogito. The decisiontable fails to parse


InvalidExpressionErrorResult: Unable to parse consequence caused by: (line 3,col 90) Parse error. Found "}", expected one of  "%=" "&=" "*=" "++" "+=" "--" "-=" "/=" ";" "<<=" "=" ">>=" ">>>=" "^=" "|="

What am I doing wrong? I followed the documentation. 

Thanks for your time

Jozef Marko

unread,
Mar 29, 2021, 3:52:03 AM3/29/21
to kogito-de...@googlegroups.com
Hi Ravi, could you please try to update the action

from:
$loanApplication.subjectProperty.setPropertyTypeCode($param)

to
$loanApplication.subjectProperty.setPropertyTypeCode($param);

Notice the ending ';'.



--
Regards, Jozef
RHBA Quality Engineer

Ravi Mangalagiri

unread,
Mar 31, 2021, 5:06:42 PM3/31/21
to Kogito development mailing list
That worked. Thanks

Now to get a Resource generated, it looks like I need to define a query. 
I am trying to look for some documentation on how to define a query that will have my resource generated.

You received this message because you are subscribed to a topic in the Google Groups "Kogito development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kogito-development/kvgZLRDc8HY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/CAHZQSvo154-3v6qL1-gXZGf1PrnbdJ7WGWcOxkJcWJ7GG7Td2g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages