Modelling multi instance output

41 views
Skip to first unread message

Jakub Grabowski

unread,
Jan 26, 2021, 8:20:57 AM1/26/21
to Kogito development mailing list
Hi All,

I'm having issue with modelling reusable multi-instance process. There is a collection definition section for input and output (MI Collection input/ouput) and while it seems to work fine for input, I'm struggling hard with output.
My problem is:
1. If I define Mi Collection Output as an object extending ArrayList (it works for input), my process compiles but throws an error as it tries to cast ArrayList to my class.
2. If I define Mi Collection Output variable type as java.util.ArrayList it complains about missing yandex during compilation.

Caused by: java.lang.RuntimeException: Error while generating proto for data model
        at org.kie.kogito.quarkus.deployment.JandexProtoGenerator.generate(JandexProtoGenerator.java:86)
        at org.kie.kogito.quarkus.deployment.JandexProtoGenerator.generateModelClassProto(JandexProtoGenerator.java:231)
        at org.kie.kogito.quarkus.deployment.JandexProtoGenerator.extractDataClasses(JandexProtoGenerator.java:213)
        ... 15 more
Caused by: java.lang.IllegalStateException: Cannot find class info in jandex index for java.util.ArrayList

Have you encountered such problem? Maybe you have some clues on how to create jandex index for ArrayList to make it work (suggested solutions with beans.xml or application.properties are rather unusable as ArrayList doesn't come as maven dependency).

Regards,
Jakub Grabowski.

Jakub Grabowski

unread,
Jan 28, 2021, 6:52:08 AM1/28/21
to Kogito development mailing list
It seems to work fine on Quarkus 1.11.0.Final (I've upgraded recently)...

Process variable is defined as java.util.ArrayList. No custom classes extending ArrayList needed.

Regards,
Jakub.

Adrian Apthorp

unread,
Feb 28, 2021, 12:54:40 AM2/28/21
to Kogito development mailing list
I'm having a similar issue. However, in my case the compiler throws an error even when I just have the collection declared as a process variable. I stripped my process definition down to see where the errors were coming from. I'm using Quarkus 1.11.0.Final.

[ERROR] Caused by: java.lang.IllegalStateException: Cannot find class info in jandex index for java.util.ArrayList
[ERROR]     at org.kie.kogito.quarkus.deployment.JandexProtoGenerator.messageFromClass(JandexProtoGenerator.java:140)
[ERROR]     at org.kie.kogito.quarkus.deployment.JandexProtoGenerator.generate(JandexProtoGenerator.java:82)
[ERROR]     ... 17 more

Adrian Apthorp

unread,
Feb 28, 2021, 1:01:52 AM2/28/21
to Kogito development mailing list
Alternatively does Kogito support loop cardinality? This is all I need for my use case.
Reply all
Reply to author
Forward
0 new messages