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

Knative addon is not generating safe variable names from SW event source

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.16.0
    • 0.15.0
    • Core Engine
    • None
    • False
    • False
    • Undefined
    • ---
    • ---
    • 2020 Week 37-39 (from Sep 7)

      On SW engine, we are using the source field from the event definition to be the Message listener.

      Source in the CloudEvents specification is an URI, we should parse this name to a safe variable name when generating code for the CloudEventListenerResource, otherwise we might face errors like this:

      [ERROR] src/main/java/org/kie/kogito/app/CloudEventListenerResource.java (34:29) : ';' expectedsrc/main/java/org/kie/kogito/app/CloudEventListenerResource.java (34:40) : <identifier> expectedsrc/main/java/org/kie/kogito/app/CloudEventListenerResource.java (34:54) : <identifier> expectedsrc/main/java/org/kie/kogito/app/CloudEventListenerResource.java (34:61) : <identifier> expectedsrc/main/java/org/kie/kogito/app/CloudEventListenerResource.java (34:64) : <identifier> expectedsrc/main/java/org/kie/kogito/app/CloudEventListenerResource.java (34:69) : <identifier> expected
      

              rhn-support-zanini Ricardo Zanini
              rhn-support-zanini Ricardo Zanini
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: