Re: [rules-users] Problems with Domain Specific Language in eclipse

2011-12-13 Thread Swindells, Thomas
 Personally - I would rather get an error when I make a mistake (e.g. do not
 write the DSL correctly) than get get an error for writing perfectly valid 
 code.
[Swindells, Thomas] But it isn't valid DSL code. DSL is normally written by 
business users who don't know anything about DRL, this is the target audience 
and for these people you don't want them to be able to accidentally do 
additional logic.
 Eclipse does support a DSL expansion window which allows you to find issues
 like misspellings.  The current approach requires a total commitment to DSL
 even if you want to use it under rare circumstances.

 I did note your suggestion about prefixing with '', but then my RHS looks
 different in rule files where I use DSL than it does in files where I do not 
 use
 DSL (something I would rather avoid).
Your entire file looks different in DSL than in a DRL anyway, it's a different 
language that allows embedding DRL, personally I think it is a good feature to 
explicitly need to identify that you know what you are doing.

Thomas



**
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problems with Domain Specific Language in eclipse

2011-12-13 Thread ronalbury
Thomas:

Yes, that explains why you implemented it as you did.  I guess we'll just
have to agree to disagree.

It appears possible to replace the Expander when bringing up the system in
Java ... is it possible to replace the Expander used by the Eclipse plug-in?

Thanks,
   Ron

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Problems-with-Domain-Specific-Language-in-eclipse-tp3579963p3582705.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Problems with Domain Specific Language in eclipse

2011-12-12 Thread Ronald Albury
I am just trying to learn DSL and have immediately run into issues.

I have a simple DSL in the file named XEasyApp.dsl :
*[condition][]{value} is an invalid Boolean={value} not
in(T,t,1,F,f,0)*

and then a simple DSLR in the file named Test.dslr:
*package com.onfs.easyapp.rules
import com.onfs.easyapp.EasyApp
expander XEasyApp.dsl

rule EasyApp Insured is Citizen Validation
when
$ea : EasyApp(priIns_eaInsuredIsCitizenInd is an invalid
Boolean)
then
$ea.addError(drools.getRule().getName());
end*

I get the expected expansion in the DRL Viewer:
package com.onfs.easyapp.rules
import com.onfs.easyapp.EasyApp

rule EasyApp Insured is Citizen Validation
when
$ea : EasyApp(priIns_eaInsuredIsCitizenInd not
in(T,t,1,F,f,0))
then

$ea.addError(drools.getRule().getName());
end

There are no Red X's when I view Test.dslr in the editor, however a problem
shows up in the Problems area below:
*DescriptionResourcePathLocationType
[13] Unable to expand: $ea.addError(drools.getRule().getName());
Test.dslr/TermXpressRules/src/main/rulesUnknownDrools Error*
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problems with Domain Specific Language in eclipse

2011-12-12 Thread ronalbury
I see that essentially the same question was asked right before I asked this
one.

I was expecting that DSL would translate only where there were DSL
translations available and leave the rest untouched.  I did not expect it to
be an error if no expansion was available (nor do I understand why that is
the case).

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Problems-with-Domain-Specific-Language-in-eclipse-tp3579963p3580049.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problems with Domain Specific Language in eclipse

2011-12-12 Thread Wolfgang Laun
You have got to...

On 12 December 2011 18:18, ronalbury ronalb...@gmail.com wrote:
 I see that essentially the same question was asked right before I asked this
 one.

 I was expecting that DSL would translate only where there were DSL
 translations available and leave the rest untouched.  I did not expect it to
 be an error if no expansion was available (nor do I understand why that is
 the case).

...see this from the reverse angle: people using DSL for the RHS would
be very surprised if the failure to expand a misspelled DSLR would not
be flagged. Fish or flesh.

See the 3rd option I indicated in that other thread.

-W


 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/rules-users-Problems-with-Domain-Specific-Language-in-eclipse-tp3579963p3580049.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problems with Domain Specific Language in eclipse

2011-12-12 Thread ronalbury
Personally - I would rather get an error when I make a mistake (e.g. do not
write the DSL correctly) than get get an error for writing perfectly valid
code.  Eclipse does support a DSL expansion window which allows you to find
issues like misspellings.  The current approach requires a total commitment
to DSL even if you want to use it under rare circumstances.

I did note your suggestion about prefixing with '', but then my RHS looks
different in rule files where I use DSL than it does in files where I do not
use DSL (something I would rather avoid).


--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Problems-with-Domain-Specific-Language-in-eclipse-tp3579963p3580113.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users