On 6 May 2011 04:09, boy18nj <span dir="ltr"><<a href="mailto:boy18nj@gmail.com">boy18nj@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for reply.<br>
<br>
Your suggestion did not work me. If you look this provided example-<br>
<br>
-ticketing.dsl<br>
[condition][]There is a customer ticket with status of "{status}"=customer :<br>
Customer( ) ticket : Ticket( customer == customer, status == "{status}" )<br>
[condition][]There is a "{subscription}" customer with a ticket status of<br>
"{status}"=customer : Customer(subscription == "{subscription}") ticket :<br>
Ticket( customer == customer, status == "{status}")<br>
[consequence][]Log "{message}"=System.out.println("{message} ");<br>
[consequence][]Escalate the<br>
ticket=ticket.setStatus("Escalate");update(ticket);<br>
[consequence][]Send escalation email=sendEscalationEmail( customer, ticket<br>
);<br>
<br>
<br>
There are quotes everywhere. And you are suggesting me to remove. WOW!!!<br></blockquote><div><br>Surely you know that in DRL and Java string literals must be surrounded by quotes. I didn't tell you to omit them from everywhere.<br>
<br>As for a DSL, the author decides where there are quotes. You can define<br>
[when][]There is ""{blurb}""=...<br>
or <br>
[when][]There is """{blurb}=...<br>or whatever. <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Please post the corrected code if possible for fire sprinkler example.<br>
<font color="#888888"><br></font></blockquote><div>[condition][]There is fire in "{room}"=Fire( {room} : room )
<br>[condition][]"{sprinkler}" is in same "{room}" and sprinkler is
"{off}"={sprinkler}: Sprinkler( room == {room}, on == {off} )
<br>[consequence][]Turn on the "{sprinkler}"=modify( {sprinkler} ){setOn(true)};
<br><br>when<br> There is fire in "$room"<br> "$sprinkler" is in same "$room" and sprinkler is "false"<br>then<br> Turn on the "$sprinkler"<br> <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888">
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Unable-to-create-DSL-properly-tp2901873p2906621.html" target="_blank">http://drools.46999.n3.nabble.com/Unable-to-create-DSL-properly-tp2901873p2906621.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>
</font></blockquote></div><br>