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

runtime-tools-quarkus-extension uses quarkus-jsonb which conflicts with quarkus-resteasy causing issues around JSON serialization

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • None
    • None
    • Core, Runtime Tooling
    • None
    • 2021 Week 46-48 (from Nov 15)
    • Hide
      1. clone https://github.com/kiegroup/kogito-examples/tree/stable/process-decisions-rest-quarkus
      2. add runtime-tools-quarkus-extension to the pom.xml
      3. start the project in dev mode mvn clean compile quarkus:dev
      4. start a new process instance hitting the kogito openapi endpoint as described it the project's readme.md using the following JSON payload

       

      {
       "driverId": "12345",
       "violation":{
       "Type":"speed",
       "Speed Limit": 100,
       "Actual Speed":140
       }
      }

       

      1. notice that the Process instance variable violation is null.

      On the other hand, if you use the following payload 

      {
       "driverId": "12345",
       "violation":{
       "type":"speed",
       "speedLimit": 100,
       "actualSpeed":140
       }
      }

      the object Violation gest deserialized correctly because it uses the Class property original names and doesn't rely on Jackson @JsonProperty.

      Show
      clone https://github.com/kiegroup/kogito-examples/tree/stable/process-decisions-rest-quarkus add runtime-tools-quarkus-extension  to the pom.xml start the project in dev mode mvn clean compile   quarkus:dev start a new process instance hitting the kogito openapi endpoint as described it the project's readme.md using the following JSON payload   { "driverId" : "12345" , "violation" :{ "Type" : "speed" , "Speed Limit" : 100, "Actual Speed" :140 } }   notice that the Process instance variable violation is null. On the other hand, if you use the following payload  { "driverId" : "12345" , "violation" :{ "type" : "speed" , "speedLimit" : 100, "actualSpeed" :140 } } the object Violation gest deserialized correctly because it uses the Class property original names and doesn't rely on Jackson @JsonProperty .
    • ---
    • ---

    Description

      When adding runtime-tools-quarkus-extension to a Kogito Quarkus project it causes issues with REST endpoints relying on quarkus-resteasy and Jackson's annotation like @JsonProperty does not work properly.

      I believe the runtime-tools-quarkus-extension should be aligned with the rest of Quarkus REST stack based on Resteasy instead of jsonb.

       

      This issue has been discussed in this kie zulipchat thread: https://kie.zulipchat.com/#narrow/stream/232676-kogito/topic/jackson-binding

      Attachments

        Activity

          People

            pefernan@redhat.com Pere Fernandez Perez
            rafael.soares Rafael Soares
            Jan Stastny Jan Stastny
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: