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

Missing structureRef type for Message Start Event in VSCode BPMN editor

XMLWordPrintable

    • 2019 Week 47-49 (from Nov 18), 2019 Week 50-52 (from Dec 9)

      When you create a Message Start Event (but this issue probably occurs on other message events as well), the bpmn2:itemDefinition's `structureRef` does not get set to the type of the message:

      <bpmn2:itemDefinition id="visaapplicationType" structureRef=""/>
      

      And this `structureRef` is exactly what the Kogito code generators use to the constructs the MicroProfile Reactive Messaging Consumer:

      When you start the Kogito application using "mvn clean compile quarkus:dev", you get the following error:

      12:09:36,843 ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
              [error]: Build step io.quarkus.kogito.deployment.KogitoAssetsProcessor#generateModel threw an exception: java.lang.IllegalStateException: src/main/java/org/acme/test/TestMessageConsumer_3.java (45:59) : incompatible types: java.lang.Object cannot be converted to org.acme.travels.VisaApplicationsrc/main/java/org/acme/test/TestMessageConsumer_3.java (60:42) : incompatible types: java.lang.Object cannot be converted to org.acme.travels.VisaApplication
              at io.quarkus.kogito.deployment.KogitoAssetsProcessor.register(KogitoAssetsProcessor.java:248)
              at io.quarkus.kogito.deployment.KogitoAssetsProcessor.generateModel(KogitoAssetsProcessor.java:162)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:930)
              at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
              at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
              at java.lang.Thread.run(Thread.java:748)
              at org.jboss.threads.JBossThread.run(JBossThread.java:479)
      
              at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:149)
              at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:180)
              at io.quarkus.dev.DevModeMain.start(DevModeMain.java:94)
              at io.quarkus.dev.DevModeMain.main(DevModeMain.java:66)
      Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
              [error]: Build step io.quarkus.kogito.deployment.KogitoAssetsProcessor#generateModel threw an exception: java.lang.IllegalStateException: src/main/java/org/acme/test/TestMessageConsumer_3.java (45:59) : incompatible types: java.lang.Object cannot be converted to org.acme.travels.VisaApplicationsrc/main/java/org/acme/test/TestMessageConsumer_3.java (60:42) : incompatible types: java.lang.Object cannot be converted to org.acme.travels.VisaApplication
              at io.quarkus.kogito.deployment.KogitoAssetsProcessor.register(KogitoAssetsProcessor.java:248)
              at io.quarkus.kogito.deployment.KogitoAssetsProcessor.generateModel(KogitoAssetsProcessor.java:162)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:930)
              at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
              at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
              at java.lang.Thread.run(Thread.java:748)
              at org.jboss.threads.JBossThread.run(JBossThread.java:479)
      
              at io.quarkus.builder.Execution.run(Execution.java:108)
              at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:121)
              at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:115)
              at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:110)
              ... 3 more
      Caused by: java.lang.IllegalStateException: src/main/java/org/acme/test/TestMessageConsumer_3.java (45:59) : incompatible types: java.lang.Object cannot be converted to org.acme.travels.VisaApplicationsrc/main/java/org/acme/test/TestMessageConsumer_3.java (60:42) : incompatible types: java.lang.Object cannot be converted to org.acme.travels.VisaApplication
              at io.quarkus.kogito.deployment.KogitoAssetsProcessor.register(KogitoAssetsProcessor.java:248)
              at io.quarkus.kogito.deployment.KogitoAssetsProcessor.generateModel(KogitoAssetsProcessor.java:162)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:930)
              at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
              at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
              at java.lang.Thread.run(Thread.java:748)
              at org.jboss.threads.JBossThread.run(JBossThread.java:479)
      

      A reproducer project can be found here: https://github.com/DuncanDoyle/kogito-tooling-message-start-event-issue

            jenrique@redhat.com Jaime Enriquez (Inactive)
            rhn-gps-ddoyle Duncan Doyle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: