]
Mario Fusco reassigned DROOLS-5406:
-----------------------------------
Assignee: Toshiya Kobayashi (was: Mario Fusco)
Consolidated approach for dumping generated sources
---------------------------------------------------
Key: DROOLS-5406
URL:
https://issues.redhat.com/browse/DROOLS-5406
Project: Drools
Issue Type: Story
Components: core engine
Affects Versions: 7.28.0.Final
Reporter: Mykhaylo Adamovych
Assignee: Toshiya Kobayashi
Priority: Major
Using `drools.dump.dir = <String>` from KnowledgeBuilderConfiguration one can
configure directory for dumping generated sources. New DRLs are generated out of decision
tables and new java classes are generated out of DRLs into that location which makes it
possible to analyze errors and have better understanding how code will actually work.
DSL parser uses different approach for dumping. It looks for `#result` switch and one
need to configure logging for respective classes to see result of the parsing, see
{code}
org.drools.compiler.lang.dsl.DefaultExpander.expand(String drl)
{code}
Could it be consolidated approach used for all generated sources? Dump directory as a
single place for all generated sources looks very handy. Could you please add respective
logic for DefaultExpander to mimic
{code}
org.drools.compiler.builder.impl.KnowledgeBuilderImpl.generatedDrlToPackageDescr
{code} and dump generated sources into one place if respective property set?