Hi,<br><br>If you want to simply use rules created in Guvnor in your application there are (at least) 2 ways:-<br><br>(1) Use a KnowledgeAgent to download the binary rules from Guvnor. See the guvnor-examples for an example.<br>
<br>(2) Use REST to download the rules&#39; source DRL and add this to a KnowledgeBuilder. See the Guvnor documentation about REST.<br><br>If you really want to import the asset from Guvnor into Eclipse (using, I presume WEBDAV?) you will need to dig a bit.<br>
<br>org.drools.ide.common.server.util.BRXMLPersistence.unmarshal(String xml) will allow you you to create a org.drools.ide.common.client.modeldriven.brl.RuleModel from the XML.<br><br>You can then use org.drools.guvnor.server.util.BRDRTPersistence.marshal(RuleModel model) to get to the DRL.<br>
<br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 5 November 2012 21:42, dme1 <span dir="ltr">&lt;<a href="mailto:mehtad@hotmail.com" target="_blank">mehtad@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have created a template in Guvnor and exported to Eclipse. The file is in<br>
the &lt;org.drools.guvnor.client.modeldriven.dt.TemplateModel&gt; format when<br>
exported to guvnor. I want to use this within a Java application, for which<br>
I believe I will have to convert to &quot;.drl&quot;. How do I convert this file to<br>
&quot;.drl&quot; for use within a java app.<br>
<br>
Thanks,<br>
dme<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-use-a-Template-File-created-in-Guvnor-in-java-code-tp4020713.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-use-a-Template-File-created-in-Guvnor-in-java-code-tp4020713.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>