Its not straight forward but you can use the DRLDumper, one a
PackageDescr, assuming it parses without errors:
DrlParser parser = new DrlParser();
PackageDescr pkg = parser.parse( source,
dsl );
final DrlDumper drlDumper = new DrlDumper();
final String drlResult = drlDumper.dump( pkg );
Michael Neale wrote:
> no in 3.0 version unfortunately. You can tell the parser to print out
> the DRL - but it will just write it out the System.out (only for
> debuggin). Look in RuleParser for that option.
>
> In trunk - which will be the new version - there is a seperate step
> which outputs DRL - but I don't think that made it into the M1 release
> - should be in M2 though.
>
> On 3/7/07, *kingston* <raja_kingston(a)yahoo.co.in
> <mailto:raja_kingston@yahoo.co.in>> wrote:
>
>
> Is there anyway to get the DRL syntax out of the DSL format?
>
> Is there any Convenient API method Which takes rule in DSL format
> and the
> DSL File Name as arguments and returns the DRL Syntax ?
>
> --
> View this message in context:
>
>
http://www.nabble.com/DSL-to-DRL-File-Conversion---Is-it-possible---tf336...
> Sent from the drools - user mailing list archive at
Nabble.com
> <
http://Nabble.com>.
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users