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.
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
If there is a Person
- age > 18
- name is "John Doe"
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
Kris
----- Original Message -----
From: mmquelo massi
To: Rules Users List
Sent: Tuesday, January 15, 2008 11:58 AM
Subject: [rules-users] Splitted Sentences in DSL...
Hi guys,
As u can notice in the
http://labs.jboss.com/file-access/default/members/drools/images//template... DSL
pop-up Menu,
we have got the sentence "Escalate the ticket" splitted into 3 different
sub-sentences:
1. Escalate
2. Escalate the
3. Escalate the ticket
When I open "org.drools.examples.TroubleTicketWithDSL.dslr" from the
"drools-examples/drools-examples-drl/src/main/rules/org/drools/examples"
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.
It just shows: "Escalate the ticket".
I expected to see all the above sentences, as I saw in the JBoss Drools Features page (
http://labs.jboss.com/file-access/default/members/drools/images//template... ).
So.... Why Do I get a different menu with just one sentence?
Is the .dsl file referred from the .drls in the "feature page" different from
the following one?
[condition][]There is a customer ticket with status of "{status}"=customer :
Customer( ) ticket : Ticket( customer == customer, status == "{status}" )
[condition][]There is a "{subscription}" customer with a ticket status of
"{status}"=customer : Customer(subscription == "{subscription}")
ticket : Ticket( customer == customer, status == "{status}")
[consequence][]Log "{message}"=System.out.println("{message} ");
[consequence][]Escalate the ticket=ticket.setStatus("Escalate");
update(ticket);
[consequence][]Send escalation email=sendEscalationEmail( customer, ticket );
One more question.
I have got no idea on the "Object" column which accours in the DSL Editor.
We have got "Language Expression", "", "Object" and
"Scope".
What does "Object" stand for?
Thank You for any help you can give me.
Massi
------------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users