Skip to content

Instantly share code, notes, and snippets.

@lucamolteni
Forked from tarilabs/dump GDST to DRL.java
Created February 5, 2018 10:46
Show Gist options
  • Save lucamolteni/6359bff44caf7ec21f7bfcbf074876b0 to your computer and use it in GitHub Desktop.
Save lucamolteni/6359bff44caf7ec21f7bfcbf074876b0 to your computer and use it in GitHub Desktop.
dump GDST to DRL
org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 unmarshal =
org.drools.workbench.models.guided.dtable.backend.GuidedDTXMLPersistence.getInstance().unmarshal(
new String(Files.readAllBytes(Paths.get("src/main/resources/guidedTable.gdst")))
);
String drl = org.drools.workbench.models.guided.dtable.backend.GuidedDTDRLPersistence.getInstance().marshal(unmarshal);
System.out.println(drl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment