<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The screenshot shows the old approach, where each 
sentence is suggested word by word.&nbsp; This approach however contained some 
flaws and we weren't quite happy with it (it becomes very confusing if you have 
quite a few DSL sentences).&nbsp; That's why we reverted back to suggesting the 
entire sentence at once.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>About the Object column, you could use that to 
define sub-constraints (starting with a dash (-)) for one specific object.&nbsp; 
For example, suppose you want something like</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>If there is a Person</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;- age &gt; 18</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;- name is "John Doe"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The constraints for age and name should be 
specified as constraints that are only applicable for the Person class, and the 
"If there is a Person" should specify that it selects a Person class.&nbsp; So 
the object field is used to link constraints to the possible subconstraints that 
can be used for it.&nbsp; An example can be found in 
drools-compiler/src/test/resources/org/drools/lang/dsl/test_metainfo.dsl</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=mmquelo@gmail.com href="mailto:mmquelo@gmail.com">mmquelo massi</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org 
  href="mailto:rules-users@lists.jboss.org">Rules Users List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, January 15, 2008 11:58 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] Splitted Sentences 
  in DSL...</DIV>
  <DIV><BR></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Hi guys,</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>As u can notice in the <A 
  href="http://labs.jboss.com/file-access/default/members/drools/images//templatebaseddsl2.png">http://labs.jboss.com/file-access/default/members/drools/images//templatebaseddsl2.png</A>&nbsp;DSL 
  pop-up Menu, </DIV>
  <DIV>we have got the sentence "Escalate the ticket" splitted into 3 different 
  sub-sentences:</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>1. Escalate</DIV>
  <DIV>2. Escalate the</DIV>
  <DIV>3. Escalate the ticket</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>When I open "<EM>org.drools.examples.TroubleTicketWithDSL.dslr</EM>" from 
  the 
  "<EM>drools-examples/drools-examples-drl/src/main/rules/org/drools/examples</EM>"</DIV>
  <DIV>directory and i push "CTRL+SPACE" in Eclipse Europa 3.3, then 
  the&nbsp;pop-up menu I get back shows just one of the sentences above.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>It just shows: "Escalate the ticket".</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I expected to see all the above sentences, as I saw in the JBoss Drools 
  Features page ( <A 
  href="http://labs.jboss.com/file-access/default/members/drools/images//templatebaseddsl2.png">http://labs.jboss.com/file-access/default/members/drools/images//templatebaseddsl2.png 
  </A>).</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>So.... Why Do I get a different menu with just one sentence?</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Is the .dsl file referred from the .drls in the "feature page" different 
  from the following one?</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><EM>[condition][]There is a customer ticket with status of 
  "{status}"=customer : Customer( )&nbsp;&nbsp; ticket : Ticket( customer == 
  customer, status == "{status}" )<BR>[condition][]There is a "{subscription}" 
  customer with a ticket status of "{status}"=customer : Customer(subscription 
  == "{subscription}") ticket : Ticket( customer == customer, status == 
  "{status}") <BR>[consequence][]Log "{message}"=System.out.println("{message} 
  ");<BR>[consequence][]Escalate the ticket=ticket.setStatus("Escalate"); 
  update(ticket);<BR>[consequence][]Send escalation email=sendEscalationEmail( 
  customer, ticket ); </EM><BR></DIV>
  <DIV><STRONG>One more question.</STRONG></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I have got no idea on the "Object" column which accours in the DSL 
  Editor.</DIV>
  <DIV>We have got "Language Expression", "", "<STRONG>Object</STRONG>" and 
  "Scope".</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>What does "<STRONG>Object</STRONG>" stand for?</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Thank You for any help you can give me.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Massi</DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>rules-users mailing 
  list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></BODY></HTML>