See inline.<br><br><div class="gmail_quote">On 7 May 2012 18:30, FILIPPO AGAZZI <span dir="ltr">&lt;<a href="mailto:filippo.agazzi@studenti.unipr.it" target="_blank">filippo.agazzi@studenti.unipr.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Davide,<br>thank you very much for your suggestions. I&#39;m very pleased to see that you find interesting this topic..i have to think about the possibility to come there to discuss about this, cause i&#39;m really really busy between thesis and job. But i&#39;m interested and i&#39;ll think about it, and i&#39;ll write you a mail about this in the next days. I&#39;m sorry to disturb you again, but i need to ask you some technical details, because i need to go on with my thesis work...<br>

<br>You suggest use of rule template, i read about this, but my doubt are:<br><br>- i find examples (<a href="http://planet.jboss.org/post/drools_rule_templates" target="_blank">http://planet.jboss.org/post/drools_rule_templates</a>), where data is taken from a spreadsheet and then used to generate rules, from the rule template. I see that particular instructions are used, such as <i>@{row.rowNumber},</i> that i think can be used only with data stored in a row-column format. So this example can&#39;t help me about data from xml. But i read that rule template can be used with generals data format, but i can&#39;t find anything from which i can start about xml data...can you help me in some way? Any example or web resourse?<br>
</blockquote><div><br>A rule template is just a boilerplate (or macro) with a set of formal macro parameters. The instantiation process may be driven by rows of a spreadsheet (one instantiation per row) or by a collection of Java objects (one instantiation per object), or from a Map. So, if you deserialize your XML into a set of Java objects of some class, you may create one rule from each object, inserting the object&#39;s attribute values as actual macro parameters. Note that these parameters can represent anything: a simple literal, or an expression or something more complex: it&#39;s just text. <br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- i&#39;m confusing about the translator: if i use rule template, i need a tranlsator too? Or is it an alternative? I think that is an alternative, because if i translate xml with an xsl stylesheet, i can otbtain directly the rules, without using rule template..is it correct, or i need translator also if i use rule template, and generate rules from xml data?<br>
</blockquote><div><br>First, you expand a template file, which results in in a string, and then you compile this DRL text.<br><br>See the section on &quot;Templates&quot;, i.e., 6.2 in the Expert manual for version 5.3.0. I admit that I wrote that, so if you find anything amiss, please let me know so I can correct it.<br>
<br>-W<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>Thanks in advance,<br>Filippo<br><br><br><div class="gmail_quote">2012/5/4 Davide Sottara <span dir="ltr">&lt;<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Dear Filippo,<br>
I would use rule templates to generate rules from the XML, and then use them<br>
to create a new session, or add them to an existing session. The translator<br>
itself could be implemented in DRL? XSLT? ...?<br>
Inserting a Policy would hardly work generally, Drools does not (yet) have<br>
full prolog-like unification, so that solution would be feasible only if you<br>
could write meta-rules to join Policies and runtime data/facts.<br>
Leaving the technical details apart, the mapping between WS-Policy and rules<br>
is an interesting topic... would you be interested in coming to Bologna and<br>
spend a few hours discussing the problem in greater detail?<br>
Davide<br>
<br>
----------------<br>
Davide Sottara, PhD<br>
Post-Doc Affiliate<br>
Faculty of Engineering<br>
University of Bologna<br>
Italy<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/rules-users-Ws-Policy-and-drools-rules-tp3959245p3960925.html" target="_blank">http://drools.46999.n3.nabble.com/rules-users-Ws-Policy-and-drools-rules-tp3959245p3960925.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" target="_blank">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>
</font></span></blockquote></div><br>
<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>
<br></blockquote></div><br>