I have a Camunda workflow for which i have created a Generic Execution Listener for all tasks. This has a field injection on a variable which i am using in the Listener logic. The value to this injected field is coming from an expression which is in turn evaluating a response body of a HTTP - Connector. I have created a loop (using a gateway and timer and feedback loop back to task if the response is not expected) over the Service Tasks(HTTP Connector) to check the response multiple times and hence trigger the Execution Listener multiple times. According to my logic of the loop this will run about 3 times and hence the Execution listener should also run 3 times. It runs fine for the first iteration but fails in the second iteration with the below error.
Field definition uses unexisting field, field is null
This goes fine if i retrigger the incident manually, not sure what is going wrong. Just to add there are lot of other tasks and the same execution listener is being triggered by all of them and it runs fine for all except for this case. Also if i remove the Listener on this service task, the workflow works fine.
I am running Camunda with Spring Boot Starter at v 7.13 with MySQL 5.7 as my DB backing Camunda.