Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Vijay K Pandey
Thanks Tihomir. Edson also suggested the same and it worked. Thanks

-Original Message-
From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Tihomir Surdilovic
Sent: Friday, August 14, 2009 1:48 PM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

Try adding the DSL before the DSLR:

   





Vijay K Pandey wrote:
>
> Hi,
>
>
>
> I am trying to get a very simple DSL working but all the time it gives
> the error of *Unable to expand:* If I take the DSL away everything
> runs fine, not sure whats going on.
>
>
>
> So what I did is strip away all other stuff and just added a plain
> simple DSL -- but still the same error
>
>
>
> *Unable to expand: LOGGING*
>
>
>
> *DSLR file Contents:*
>
>
>
> package test.rules
>
> dialect "mvel"
>
>
>
> expander testing.dsl
>
>
>
> rule "TestingCheck"
>
>
>
>   when
>
>   then
>
> *LOGGING *
>
> end
>
>
>
> *DSL file content*
>
> [consequence][]LOGGING=System.out.println("hello");
>
>
>
> *ChangeSet XML file (test_changeset.xml)*
>
> 
>  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
>
>
> xs:schemaLocation='http://drools.org/drools-5.0/change-set
> drools-change-set-5.0.xsd' >
>
>
>
>
>
>
>
>
>
> 
>
>
>
> *I am loading the changeset set via*
>
>
>
> KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>
> kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"),
> ResourceType.CHANGE_SET);
>
>
>
> Any hint what is going wrong?
>
>
>
> Thanks
>
> Vijay
>
>
>
> 
>
> ___
> 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
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Tihomir Surdilovic
Try adding the DSL before the DSLR:

   




 
Vijay K Pandey wrote:
>
> Hi,
>
>  
>
> I am trying to get a very simple DSL working but all the time it gives 
> the error of *Unable to expand:* If I take the DSL away everything 
> runs fine, not sure whats going on.
>
>  
>
> So what I did is strip away all other stuff and just added a plain 
> simple DSL -- but still the same error
>
>  
>
> *Unable to expand: LOGGING*
>
>  
>
> *DSLR file Contents:*
>
>  
>
> package test.rules
>
> dialect "mvel"
>
>  
>
> expander testing.dsl
>
>  
>
> rule "TestingCheck"
>
>  
>
>   when
>
>   then
>
> *LOGGING *
>
> end
>
>  
>
> *DSL file content*
>
> [consequence][]LOGGING=System.out.println("hello");
>
>  
>
> *ChangeSet XML file (test_changeset.xml)*
>
> 
>  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
>
>  
> xs:schemaLocation='http://drools.org/drools-5.0/change-set 
> drools-change-set-5.0.xsd' >
>
>
>
>
>
>
>
>
>
> 
>
>  
>
> *I am loading the changeset set via*
>
>  
>
> KnowledgeBuilder kbuilder = 
> KnowledgeBuilderFactory.newKnowledgeBuilder();   
>
> kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"), 
> ResourceType.CHANGE_SET);
>
>  
>
> Any hint what is going wrong?
>
>  
>
> Thanks
>
> Vijay
>
>  
>
> 
>
> ___
> 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] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Vijay K Pandey
Suggestion (DSL first) by Edson works perfectly. Thanks a lot Edson!.

Thanks
Vijay

From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli
Sent: Friday, August 14, 2009 12:24 PM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working


   Not true. [consequence] and [then] are synonyms, and [consequence] is the 
preferred way.

   I think the problem is the order in which you are loading the resources. Add 
the DSL before adding the DSLR.

   []s
   Edson
2009/8/14 Premkumar Stephen mailto:pre...@gmail.com>>
you need to change
[consequence][]LOGGING=System.out.println("hello");
to
[then][]LOGGING=System.out.println("hello");
Regards,
Prem


2009/8/14 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>

Thanks, but I have gone through this before and I don't see any issue in the 
DRL & DSL file I wrote. Also within the eclipse plug-in, "Rete View" comes up 
fine for the DRL but while running as java application, "Unable to expand:" 
error comes.





From: 
rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org> 
[mailto:rules-users-boun...@lists.jboss.org<mailto:rules-users-boun...@lists.jboss.org>]
 On Behalf Of Premkumar Stephen
Sent: Friday, August 14, 2009 11:53 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working



http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html
 Section 4.10.2

2009/8/14 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>

Hi,



I am trying to get a very simple DSL working but all the time it gives the 
error of Unable to expand: If I take the DSL away everything runs fine, not 
sure whats going on.



So what I did is strip away all other stuff and just added a plain simple DSL 
-- but still the same error



Unable to expand: LOGGING



DSLR file Contents:



package test.rules

dialect "mvel"



expander testing.dsl



rule "TestingCheck"



  when

  then

LOGGING

end



DSL file content

[consequence][]LOGGING=System.out.println("hello");



ChangeSet XML file (test_changeset.xml)



   

   

   

   





I am loading the changeset set via



KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"), 
ResourceType.CHANGE_SET);



Any hint what is going wrong?



Thanks

Vijay



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



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


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



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com<http://www.jboss.com>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Edson Tirelli
   Not true. [consequence] and [then] are synonyms, and [consequence] is the
preferred way.

   I think the problem is the order in which you are loading the resources.
Add the DSL before adding the DSLR.

   []s
   Edson

2009/8/14 Premkumar Stephen 

> you need to change
> [consequence][]LOGGING=System.out.println("hello");
> to
> [then][]LOGGING=System.out.println("hello");
> Regards,
> Prem
>
>
>
> 2009/8/14 Vijay K Pandey 
>
>>  Thanks, but I have gone through this before and I don’t see any issue in
>> the DRL & DSL file I wrote. Also within the eclipse plug-in, “Rete View”
>> comes up fine for the DRL but while running as java application, “Unable to
>> expand:” error comes.
>>
>>
>>  --
>>
>> *From:* rules-users-boun...@lists.jboss.org [mailto:
>> rules-users-boun...@lists.jboss.org] *On Behalf Of *Premkumar Stephen
>> *Sent:* Friday, August 14, 2009 11:53 AM
>> *To:* Rules Users List
>> *Subject:* Re: [rules-users] Drools 5 - Not sure why this simple DSL not
>> working
>>
>>
>>
>>
>> http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.htmlSection
>>  4.10.2
>>
>>  2009/8/14 Vijay K Pandey 
>>
>> Hi,
>>
>>
>>
>> I am trying to get a very simple DSL working but all the time it gives the
>> error of *Unable to expand:* If I take the DSL away everything runs fine,
>> not sure whats going on.
>>
>>
>>
>> So what I did is strip away all other stuff and just added a plain simple
>> DSL -- but still the same error
>>
>>
>>
>> *Unable to expand: LOGGING*
>>
>>
>>
>> *DSLR file Contents:*
>>
>>
>>
>> package test.rules
>>
>> dialect "mvel"
>>
>>
>>
>> expander testing.dsl
>>
>>
>>
>> rule "TestingCheck"
>>
>>
>>
>>   when
>>
>>   then
>>
>> *LOGGING *
>>
>> end
>>
>>
>>
>> *DSL file content*
>>
>> [consequence][]LOGGING=System.out.println("hello");
>>
>>
>>
>> *ChangeSet XML file (test_changeset.xml)*
>>
>> >
>>  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
>>
>>  xs:schemaLocation='http://drools.org/drools-5.0/change-set
>> drools-change-set-5.0.xsd<http://drools.org/drools-5.0/change-set%0Adrools-change-set-5.0.xsd>'
>> >
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> 
>>
>>
>>
>> *I am loading the changeset set via*
>>
>>
>>
>> KnowledgeBuilder kbuilder =
>> KnowledgeBuilderFactory.newKnowledgeBuilder();
>>
>> kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"),
>> ResourceType.CHANGE_SET);
>>
>>
>>
>> Any hint what is going wrong?
>>
>>
>>
>> Thanks
>>
>> Vijay
>>
>>
>>
>>
>> ___
>> 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
>>
>>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Premkumar Stephen
you need to change
[consequence][]LOGGING=System.out.println("hello");
to
[then][]LOGGING=System.out.println("hello");
Regards,
Prem


2009/8/14 Vijay K Pandey 

>  Thanks, but I have gone through this before and I don’t see any issue in
> the DRL & DSL file I wrote. Also within the eclipse plug-in, “Rete View”
> comes up fine for the DRL but while running as java application, “Unable to
> expand:” error comes.
>
>
>  --
>
> *From:* rules-users-boun...@lists.jboss.org [mailto:
> rules-users-boun...@lists.jboss.org] *On Behalf Of *Premkumar Stephen
> *Sent:* Friday, August 14, 2009 11:53 AM
> *To:* Rules Users List
> *Subject:* Re: [rules-users] Drools 5 - Not sure why this simple DSL not
> working
>
>
>
>
> http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.htmlSection
>  4.10.2
>
>  2009/8/14 Vijay K Pandey 
>
> Hi,
>
>
>
> I am trying to get a very simple DSL working but all the time it gives the
> error of *Unable to expand:* If I take the DSL away everything runs fine,
> not sure whats going on.
>
>
>
> So what I did is strip away all other stuff and just added a plain simple
> DSL -- but still the same error
>
>
>
> *Unable to expand: LOGGING*
>
>
>
> *DSLR file Contents:*
>
>
>
> package test.rules
>
> dialect "mvel"
>
>
>
> expander testing.dsl
>
>
>
> rule "TestingCheck"
>
>
>
>   when
>
>   then
>
> *LOGGING *
>
> end
>
>
>
> *DSL file content*
>
> [consequence][]LOGGING=System.out.println("hello");
>
>
>
> *ChangeSet XML file (test_changeset.xml)*
>
> 
>  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
>
>  xs:schemaLocation='http://drools.org/drools-5.0/change-set
> drools-change-set-5.0.xsd<http://drools.org/drools-5.0/change-set%0Adrools-change-set-5.0.xsd>'
> >
>
>
>
>
>
>
>
>
>
> 
>
>
>
> *I am loading the changeset set via*
>
>
>
> KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>
> kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"),
> ResourceType.CHANGE_SET);
>
>
>
> Any hint what is going wrong?
>
>
>
> Thanks
>
> Vijay
>
>
>
>
> ___
> 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
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Vijay K Pandey
Thanks, but I have gone through this before and I don't see any issue in the 
DRL & DSL file I wrote. Also within the eclipse plug-in, "Rete View" comes up 
fine for the DRL but while running as java application, "Unable to expand:" 
error comes.


From: rules-users-boun...@lists.jboss.org 
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Premkumar Stephen
Sent: Friday, August 14, 2009 11:53 AM
To: Rules Users List
Subject: Re: [rules-users] Drools 5 - Not sure why this simple DSL not working

http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html
 Section 4.10.2

2009/8/14 Vijay K Pandey mailto:vpan...@mdes.ms.gov>>

Hi,



I am trying to get a very simple DSL working but all the time it gives the 
error of Unable to expand: If I take the DSL away everything runs fine, not 
sure whats going on.



So what I did is strip away all other stuff and just added a plain simple DSL 
-- but still the same error



Unable to expand: LOGGING



DSLR file Contents:



package test.rules

dialect "mvel"



expander testing.dsl



rule "TestingCheck"



  when

  then

LOGGING

end



DSL file content

[consequence][]LOGGING=System.out.println("hello");



ChangeSet XML file (test_changeset.xml)



   

   

   

   





I am loading the changeset set via



KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"), 
ResourceType.CHANGE_SET);



Any hint what is going wrong?



Thanks

Vijay



___
rules-users mailing list
rules-users@lists.jboss.org<mailto: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] Drools 5 - Not sure why this simple DSL not working

2009-08-14 Thread Premkumar Stephen
http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.htmlSection
4.10.2


2009/8/14 Vijay K Pandey 

>  Hi,
>
>
>
> I am trying to get a very simple DSL working but all the time it gives the
> error of *Unable to expand:* If I take the DSL away everything runs fine,
> not sure whats going on.
>
>
>
> So what I did is strip away all other stuff and just added a plain simple
> DSL -- but still the same error
>
>
>
> *Unable to expand: LOGGING*
>
>
>
> *DSLR file Contents:*
>
>
>
> package test.rules
>
> dialect "mvel"
>
>
>
> expander testing.dsl
>
>
>
> rule "TestingCheck"
>
>
>
>   when
>
>   then
>
> *LOGGING *
>
> end
>
>
>
> *DSL file content*
>
> [consequence][]LOGGING=System.out.println("hello");
>
>
>
> *ChangeSet XML file (test_changeset.xml)*
>
> 
>  xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
>
>  xs:schemaLocation='http://drools.org/drools-5.0/change-set
> drools-change-set-5.0.xsd'
> >
>
>
>
>
>
>
>
>
>
> 
>
>
>
> *I am loading the changeset set via*
>
>
>
> KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>
> kbuilder.add(ResourceFactory.newClassPathResource("test_changeset.xml"),
> ResourceType.CHANGE_SET);
>
>
>
> Any hint what is going wrong?
>
>
>
> Thanks
>
> Vijay
>
>
>
> ___
> 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