apache / incubator-kie-kogito-apps

Kogito Apps - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
56 stars 125 forks source link

Duplicated information in the `variables` object #1989

Closed caponetto closed 4 months ago

caponetto commented 4 months ago

Describe the bug

Sometimes when variables are fetched from the Data Index, there is duplicated information in the response.

Expected behavior

I'd expect simply:

"variables": {
  "workflowdata": {
    "myKey": "myValue",
    "mantra": "Serverless Workflow is awesome!",
    "greeting": "Hello World"
  }
}

Actual behavior

If you fetch the variables, you'll get:

"variables": {
  "workflowdata": {
    "myKey": "myValue",
    "mantra": "Serverless Workflow is awesome!",
    "greeting": "Hello World"
  },
  "workflowdata.mantra": "Serverless Workflow is awesome!",
  "workflowdata.greeting": "Hello World"
}

See that mantra and greeting are duplicated.

How to Reproduce?

Take the Hello World workflow as an example and execute it with additional inputs, for instance:

{
    "myKey": "myValue"
}

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response