<!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. 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). That's why we reverted back to suggesting the
entire sentence at once.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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.
For example, suppose you want something like</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If there is a Person</FONT></DIV>
<DIV><FONT face=Arial size=2> - age > 18</FONT></DIV>
<DIV><FONT face=Arial size=2> - name is "John Doe"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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. So
the object field is used to link constraints to the possible subconstraints that
can be used for it. 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> </DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV> </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> </DIV>
<DIV>Hi guys,</DIV>
<DIV> </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> DSL
pop-up Menu, </DIV>
<DIV>we have got the sentence "Escalate the ticket" splitted into 3 different
sub-sentences:</DIV>
<DIV> </DIV>
<DIV>1. Escalate</DIV>
<DIV>2. Escalate the</DIV>
<DIV>3. Escalate the ticket</DIV>
<DIV> </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 pop-up menu I get back shows just one of the sentences above.</DIV>
<DIV> </DIV>
<DIV>It just shows: "Escalate the ticket".</DIV>
<DIV> </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> </DIV>
<DIV>So.... Why Do I get a different menu with just one sentence?</DIV>
<DIV> </DIV>
<DIV>Is the .dsl file referred from the .drls in the "feature page" different
from the following one?</DIV>
<DIV> </DIV>
<DIV><EM>[condition][]There is a customer ticket with status of
"{status}"=customer : Customer( ) 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> </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> </DIV>
<DIV>What does "<STRONG>Object</STRONG>" stand for?</DIV>
<DIV> </DIV>
<DIV>Thank You for any help you can give me.</DIV>
<DIV> </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>