Hi all,
I'd like to define some DSL sentences using Guvnor. Then using the
DSL-Editor from eclipse, I create the following mappings (for consequence):
1.
[CONSEQUENCE]Following "{time}" regulation "{regname}" is
violated=String
day = "{time}"; String regulation = "{regname}"; ViolatedRegulation vr
= new
ViolatedRegulation(emp, regulation, act, day);
violatedRegulationObject.add(vr);
Now..the problem I had:
If I try to crete rule using guided editor, in consequence, the created
string based on the input contains many white spaces
then
String day = " DAY "; String regulation = " day.max.working1 ";
if I use DSL business editor, the generated source code is ok.
2.
Actually the CONSEQUENCE part generated by eclipse DSL editor is not exactly
what I pasted above; Instead it was CONSEQUENCE[] (the square brackte was
empty and "CONSEQUENCE" is outside the bracket. But when I edited this using
text editor, and open the .dsl file using the DSL editor again, it shows
nothing, although the sentences still can be shown using text editor.
3. I had problem finding my DSL sentences (by pressing Ctrl+space) using
both guided editor and DSL editor in Guvnor at the beginning, because i had
the prefix condition/consequence/when/then all in small letters (sometimes
they are shown but sometimes not). As soon as I wrote them in capital, I can
find them without problem. Is the capital letter really a requirement?
Many thanks in advance for hints
Regards
--
View this message in context:
http://www.nabble.com/Problem-in-defining-DSL-in-Guvnor-%28and-some-possi...
Sent from the drools - user mailing list archive at
Nabble.com.