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

A process with two activities is executed with errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.22.0.Final
    • 1.21.0.Final
    • Core Engine
    • None
    • False
    • None
    • False
    • ---
    • ---

      Runtime: quarkus

      Persistance: postgresql

      Prop: kogito.persistence.optimistic.lock=true

      Outer process:

      First subprocess (prepare logic with PreparePaymentModel):

      Second subprocess (execute logic with ExecutePaymentModel):

      An error occurs during the execution of this process:

      2022-05-24 10:08:04,060 ERROR [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (kogito-event-executor-0) Error processing message {"id":"cf79235a-bf4c-4cad-a5de-4ca1aa36a036","source":"/process/PaymentMessageStub","type":"processedpayment","time":"2022-05-24T07:08:03.979703Z","data":{"id":0,"sum":0,"account":"string","description":"string","date":"string","prepareResult":0,"paymentResult":1},"specversion":"1.0","kogitoprocinstanceid":"b2f6c48d-e281-441b-838d-5b4d361f1551","kogitoprocid":"PaymentMessageStub","kogitousertaskist":"1","kogitoprocrefid":"6d30407c-d5e1-45c2-8162-9868b771cc28"}: java.util.concurrent.CompletionException: org.kie.kogito.process.ProcessInstanceExecutionException: Process instance with id 6d30407c-d5e1-45c2-8162-9868b771cc28 failed becuase of java.lang.ClassCastException - class org.acme.kogitobpmn.PreparePaymentModel cannot be cast to class org.acme.kogitobpmn.ExecutePaymentModel (org.acme.kogitobpmn.PreparePaymentModel and org.acme.kogitobpmn.ExecutePaymentModel are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @771cbb1a)
          at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
          at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
          at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1766)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
          at java.base/java.lang.Thread.run(Thread.java:832)
      Caused by: org.kie.kogito.process.ProcessInstanceExecutionException: Process instance with id 6d30407c-d5e1-45c2-8162-9868b771cc28 failed becuase of java.lang.ClassCastException - class org.acme.kogitobpmn.PreparePaymentModel cannot be cast to class org.acme.kogitobpmn.ExecutePaymentModel (org.acme.kogitobpmn.PreparePaymentModel and org.acme.kogitobpmn.ExecutePaymentModel are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @771cbb1a)
          at org.kie.kogito.process.ProcessInstance.checkError(ProcessInstance.java:215)
          at org.kie.kogito.process.impl.ProcessServiceImpl.lambda$signalProcessInstance$41(ProcessServiceImpl.java:365)
          at java.base/java.util.Optional.map(Optional.java:258)
          at org.kie.kogito.process.impl.ProcessServiceImpl.lambda$signalProcessInstance$42(ProcessServiceImpl.java:363)
          at org.kie.kogito.services.uow.UnitOfWorkExecutor.executeInUnitOfWork(UnitOfWorkExecutor.java:33)
          at org.kie.kogito.process.impl.ProcessServiceImpl.signalProcessInstance(ProcessServiceImpl.java:361)
          at org.kie.kogito.services.event.impl.ProcessEventDispatcher.signalProcessInstance(ProcessEventDispatcher.java:110)
          at org.kie.kogito.services.event.impl.ProcessEventDispatcher.lambda$handleMessageWithReference$2(ProcessEventDispatcher.java:98)
          at java.base/java.util.Optional.map(Optional.java:258)
          at org.kie.kogito.services.event.impl.ProcessEventDispatcher.handleMessageWithReference(ProcessEventDispatcher.java:97)
          at org.kie.kogito.services.event.impl.ProcessEventDispatcher.lambda$dispatch$0(ProcessEventDispatcher.java:74)
          at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764)
          ... 3 more
      Caused by: java.lang.ClassCastException: class org.acme.kogitobpmn.PreparePaymentModel cannot be cast to class org.acme.kogitobpmn.ExecutePaymentModel (org.acme.kogitobpmn.PreparePaymentModel and org.acme.kogitobpmn.ExecutePaymentModel are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @771cbb1a)
          at org.acme.kogitobpmn.ExecutePaymentAttemptProcess$2.unbind(ExecutePaymentAttemptProcess.java:245)
          at org.jbpm.workflow.instance.node.LambdaSubProcessNodeInstance.handleOutMappings(LambdaSubProcessNodeInstance.java:210)
          at org.jbpm.workflow.instance.node.LambdaSubProcessNodeInstance.processInstanceCompleted(LambdaSubProcessNodeInstance.java:173)
          at org.jbpm.workflow.instance.node.LambdaSubProcessNodeInstance.signalEvent(LambdaSubProcessNodeInstance.java:160)
          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:623)
          at org.kie.kogito.process.impl.AbstractProcessInstance.send(AbstractProcessInstance.java:269)
          at org.kie.kogito.process.impl.AbstractProcess$CompletionEventListener.lambda$signalEvent$0(AbstractProcess.java:262)
          at java.base/java.util.Optional.ifPresent(Optional.java:176)
          at org.kie.kogito.process.impl.AbstractProcess$CompletionEventListener.signalEvent(AbstractProcess.java:262)
          at org.kie.kogito.services.signal.LightSignalManager.lambda$signalEvent$2(LightSignalManager.java:65)
          at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
          at org.kie.kogito.services.signal.LightSignalManager.signalEvent(LightSignalManager.java:65)
          at org.kie.kogito.services.signal.DefaultSignalManagerHub.publish(DefaultSignalManagerHub.java:42)
          at org.kie.kogito.services.signal.LightSignalManager.signalEvent(LightSignalManager.java:68)
          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:431)
          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:440)
          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.nodeInstanceCompleted(WorkflowProcessInstanceImpl.java:892)
          at org.jbpm.workflow.instance.node.EndNodeInstance.internalTrigger(EndNodeInstance.java:77)
          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:225)
          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:424)
          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:409)
          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:379)
          at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:50)
          at org.jbpm.workflow.instance.node.EventNodeInstance.triggerCompleted(EventNodeInstance.java:151)
          at org.jbpm.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:70)
          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:640)
          at org.kie.kogito.process.impl.AbstractProcessInstance.send(AbstractProcessInstance.java:269)
          at org.kie.kogito.process.impl.ProcessServiceImpl.lambda$signalProcessInstance$41(ProcessServiceImpl.java:364)
          ... 13 more 

      And in the management console (for some reason, three prepare subprocesses, instead of one):

       

       

       

       

        1. ExecutePayment.bpmn
          9 kB
          iuriy rybakov
        2. ExecutePaymentAttempt.bpmn
          50 kB
          iuriy rybakov
        3. image-2022-05-24-10-16-22-592.png
          236 kB
          iuriy rybakov
        4. image-2022-05-24-10-18-20-497.png
          74 kB
          iuriy rybakov
        5. image-2022-05-24-10-20-21-497.png
          69 kB
          iuriy rybakov
        6. image-2022-05-24-10-25-29-106.png
          171 kB
          iuriy rybakov
        7. PreparePayment.bpmn
          9 kB
          iuriy rybakov

              cnicolai@redhat.com Cristiano Nicolai (Inactive)
              iurybakov iuriy rybakov (Inactive)
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: