1) use a SW with a callback state
2) create a new process instance
3) My process is now waiting in the callback state
If execute the GET operation to see all processes I can see the process instance.
4) By using kafka client I produce the event that the callback state is waiting for, and the callback operation receives the event and works as expected.
Since my process finishes after the event reception, I can easily verify that the process was completed successfuly as expected.
If I execute the GET operation again to see all process instances I can see no instances, which is correct.
5) Now I send a new cloud event, to the same topic, etc. It can be reproduced by using for example the same information passed in the even sent in 4)
This time, in the server low the following error is produced:
https://gist.github.com/wmedvede/e23e0e2ac6e9934964102f10ac22dd02
2021-12-02 12:10:43,914 ERROR [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (kogito-event-executor-0) Error processing message {"specversion":"1.0","id":"cbae09c8-27cf-4775-8345-d1997c4b65aa","source":"","type":"query_response_events","time":"2021-12-02T12:10:43.901899+01:00","kogitoprocrefid":"559b050b-1f3e-42ba-82af-72a8cd1d938d","data":{"answer":"the response2"}}: java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: There is no start node that matches the trigger query_response_events
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
6) now If a execute the GET operation to see all process instances, I can see the results below, which basically indicates that a kind of dummy SW process instance was created.
7) If I continue sending more events, more dummy instances are being created:
To reproduce the issue I think that the current callback example in kogito-examples can be used by producing two or more events.