[rules-users] mapping different DRL files to same DSL file (Domain specific Language)

vijay nooka vijay_3562003 at yahoo.co.in
Sat Jun 23 07:32:48 EDT 2007


hi,

 working on DomainSpecificLanguage....i am having 4 DRL files having Same
English Text sending different values and having one DSL file.....i am
reading all DRL files with a same DSL file....expecting the output for 4
fires..but its not...giving only one out put( expecting firing once).... 

u will be more clear with this:

lets have DRL1, DRL2, DRL3, DRL4 and one DSL file with name DSLforALL

PackageBuilder builder = new PackageBuilder();

Reader source1 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL1.drl" ) ); 
Reader dsl1 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );

Reader source2 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL2.drl" ) ); 
Reader dsl2 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );

Reader source3 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL3.drl" ) ); 
Reader dsl3 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );
   		
Reader source4 = new InputStreamReader(
DroolsTest.class.getResourceAsStream( "DRL4.drl" ) ); 
Reader dsl4 = new InputStreamReader( DroolsTest.class.getResourceAsStream(
"DSLforALL.dsl" ) );

builder.addPackageFromDrl( source1, dsl1 );
builder.addPackageFromDrl( source2, dsl2 );
builder.addPackageFromDrl( source3, dsl3 );
builder.addPackageFromDrl( source4, dsl4 );


Package pkg = builder.getPackage();
    		
    		
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
 ruleBase.addPackage(pkg);
    		
    	
WorkingMemory workingMemory = ruleBase.newWorkingMemory();


  each DRL file sending different values to the Same DSL file...so we are
expecting the Out put for four Scenarios....but its not.... its firing only
once for one Scenario....what do u say for this...kindly help

Thanks

Vijay
    



-- 
View this message in context: http://www.nabble.com/mapping-different-DRL-files-to-same-DSL-file-%28Domain-specific-Language%29-tf3968837.html#a11265453
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list