Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-6356

Callback operation fails when the received event refers to a non existing processInsntanceId and a dummy process is created

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • None
    • None
    • None
    • False
    • False
    • Hide

      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.

       

       

      Show
      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.    

      When a cloud even is received for a processInstanceId that don't exists, or for instance was already completed, we have the following situations.

      1) an exception is produced in the lob

      2) but also a kind of dummy process with null id is created

        1. DummyProcessInstance1.png
          DummyProcessInstance1.png
          42 kB
        2. GetOperationResult.png
          GetOperationResult.png
          35 kB
        3. MoreDummyProcessInstances.png
          MoreDummyProcessInstances.png
          58 kB
        4. ProcessInstanceCreated.png
          ProcessInstanceCreated.png
          52 kB
        5. ProcessWasCompleted.png
          ProcessWasCompleted.png
          28 kB

            ftirados Francisco Javier Tirado Sarti
            wmedvede@redhat.com Walter Medvedeo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: