apache / incubator-kie-kogito-runtimes

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

Using Event as start state and toStateData causes stack overflow #3541

Closed fjtirado closed 3 weeks ago

fjtirado commented 1 month ago

Describe the bug

As described in title, using this workflow definition causes a statck overflow because internall workflowdata is recursiverly being assigned to itself as part of the filter

{
"id": "GreetCustomersWorkflow",
"name": "Greet Customers when they arrive",
"version": "1.0",
"specVersion": "0.8",
"start": "WaitForCustomerToArrive",
"states":[
{
"name": "WaitForCustomerToArrive",
"type": "event",
"onEvents": [{
"eventRefs": ["CustomerArrivesEvent"],
"eventDataFilter": {
"data": "${ .customer }",
"toStateData": "${ .customerInfo }"
},
"actions":[
{
"functionRef": {
"refName": "greetingFunction",
"arguments": {
"message": "${ .customerInfo.name } "
}
}
}
]
}],
"end": true
}
],
"events": [{
"name": "CustomerArrivesEvent",
"type": "customer-arrival-type",
"source": "customer-arrival-event-source"
}],
"functions": [{
"name": "greetingFunction",
 "type": "custom",
  "operation": "sysout"
}]
}

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

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