There is a limit on the size of a string that quarkus can store (64k)
The root cause is that we are trying to use the recorder for something that is not ready to support. We are trying to use it as a fast-in-memory-automatically-populated cache for source add-on. It was a nice try and it works for most Serverless Workflow files but it is too risky.
The obvious solution is to remove the recorder and use the db instead (rather than rolling back to copy the sources in a well known place within the jar, that leads to other issues that we do not want to face again).
Now, the question is, which db? (remember persistence in Kogito is optional). We can either require the presence of a persistent addon for source addon to be enable or use an independent embedded db for it (and store all sources in a resource file that will be created at deployment time and avilable at runtime)
This limit was reached in the community for bpmn files, https://groups.google.com/g/kogito-development/c/q8_gTrVXQnc/m/gZNCjanEAgAJ