Adding many rules causes stack overflow

Using the Java API, when we try to deploy a DmnDefinition using the below snippet

DmnDeploymentBuilder builder = this.dmnEngine.getDmnRepositoryService().createDeployment().addDmnModel(definitionModel.getDecisionId().concat(".dmn"), definition);

DmnDeployment deployment = builder.deploy();

We get a stack overflow if the number of rules added to DecisionTable exceeds a certain number. This number is based on the memory which with the JVM starts. With 2GB, it failes at around 940 rules

This has been recently fixed, see fixes possible StackOverflowError when parsing DMN OutputValues · flowable/flowable-engine@85a0b0f · GitHub